From: Matt Mackall <mpm@selenic.com>
To: Ramagudi Naziir <naziirr@gmail.com>
Cc: linux-kernel@vger.kernel.org, jason.wessel@windriver.com
Subject: Re: a problem with NETPOLL/KGDBoE
Date: Wed, 19 Dec 2007 11:28:39 -0600 [thread overview]
Message-ID: <20071219172838.GO19691@waste.org> (raw)
In-Reply-To: <dfb262380712190822l48f706b5k345762e233b693ae@mail.gmail.com>
On Wed, Dec 19, 2007 at 06:22:55PM +0200, Ramagudi Naziir wrote:
> On 12/6/07, Matt Mackall <mpm@selenic.com> wrote:
> > netpoll will ignore incoming UDP -from- the wrong port/ip/mac, since
> > it's otherwise bypassing the firewall layer.
> ...
> > I forget how to deal
> > with the source address issue in connection with GDB, perhaps Jason
> > will remind us.
>
> I have checked it out.
> Seems like there is absolutely no way to configure the source
> port gdb uses for the udp connection. So one must invoke a
> "target remote udp:ip:port" command, see what was the
> chosen source port (tcpdump/netstat), and reconfigure kgdb on the target.
> While this works, it is rather awkward.
>
> Do you think there is/can be another way to solve this issue
> (like allowing NETPOLL to listen to a wildcard udp source port) ?
Here are the checks from net/core/netpoll.c:__netpoll_rx:
if (np->local_ip && np->local_ip != ntohl(iph->daddr))
goto out;
if (np->remote_ip && np->remote_ip != ntohl(iph->saddr))
goto out;
if (np->local_port && np->local_port != ntohs(uh->dest))
goto out;
In other words, we DON'T check remote_port and we don't check the
local_port, local_ip, or remote_ip if they're zero. Sorry for the
earlier confusion.
My hazy memory here is that my version of kgdboe took the first packet
it got and set remote_port from it so that it could reply. Not sure
whether that got copied as I can't seem to find the relevant bits in
the latest -mm.
--
Mathematics is the supreme nostalgia of our time.
prev parent reply other threads:[~2007-12-19 17:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-06 18:22 Ramagudi Naziir
2007-12-06 18:34 ` Matt Mackall
2007-12-06 19:13 ` Ramagudi Naziir
2007-12-19 16:22 ` Ramagudi Naziir
2007-12-19 16:35 ` Jason Wessel
2007-12-19 16:43 ` Ramagudi Naziir
2007-12-19 17:28 ` Matt Mackall [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071219172838.GO19691@waste.org \
--to=mpm@selenic.com \
--cc=jason.wessel@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=naziirr@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®