From: Mitchell Blank Jr <mitch@sfgoth.com>
To: Phil Oester <kernel@linuxace.com>
Cc: shemminger@osdl.org, linux-net@vger.kernel.org,
linux-kernel@vger.kernel.org, netdev@oss.sgi.com
Subject: Re: Recent select() handling change breaks Poptop
Date: Mon, 6 Dec 2004 21:48:40 -0800 [thread overview]
Message-ID: <20041207054840.GD61527@gaz.sfgoth.com> (raw)
In-Reply-To: <20041207045302.GA23746@linuxace.com>
(adding netdev to cc:)
Phil Oester wrote:
> > 2. a "tcpdump -nvv" of its udp traffic (ideally captured from a seperate
> > server, but from the server would probably be OK too)
>
> PPTP uses TCP 1723 and GRE (proto 47), so there is no udp traffic involved.
> I suspect the change was made to all datagram traffic with the assumption
> that UDP was the only protocol impacted. Perhaps GRE was not considered?
Yeah, it looks like the problem for sure. The patch modifies the
structure "inet_dgram_ops" to use udp_poll(), but looking farther down:
static struct inet_protosw inetsw_array[] =
[...]
.type = SOCK_DGRAM,
.protocol = IPPROTO_UDP,
.prot = &udp_prot,
.ops = &inet_dgram_ops,
[...]
.type = SOCK_RAW,
.protocol = IPPROTO_IP, /* wild card */
.prot = &raw_prot,
.ops = &inet_dgram_ops,
[...]
so it looks like udp_poll() will end up getting used for both SOCK_DGRAM
and SOCK_RAW inet sockets; obviously Poptop is using the latter and failing
as a result. No need for the strace/tcpdump data I guess.
The fix is to just make a copy of the inet_dgram_ops called inet_udp_ops
and make the udp_poll() change only in that one (and obviously change the
SOCK_DGRAM case there to use &inet_udp_ops). I don't have time right this
second to spin a patch, but could you try that out and see if it fixes
your problem.
-Mitch
next parent reply other threads:[~2004-12-07 5:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20041207003525.GA22933@linuxace.com>
[not found] ` <20041207025218.GB61527@gaz.sfgoth.com>
[not found] ` <20041207045302.GA23746@linuxace.com>
2004-12-07 5:48 ` Mitchell Blank Jr [this message]
2004-12-07 15:08 ` [PATCH] fix select() for SOCK_RAW sockets Mitchell Blank Jr
2004-12-07 17:28 ` Phil Oester
2004-12-07 17:35 ` YOSHIFUJI Hideaki / 吉藤英明
2004-12-07 18:01 ` [PATCH] fix select() for SOCK_RAW sockets (ipv6) Stephen Hemminger
2004-12-07 18:48 ` David S. Miller
2004-12-07 18:56 ` Stephen Hemminger
2004-12-08 7:58 ` YOSHIFUJI Hideaki / 吉藤英明
2004-12-07 17:45 ` [PATCH] fix select() for SOCK_RAW sockets Stephen Hemminger
2004-12-08 5:28 ` David S. Miller
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=20041207054840.GD61527@gaz.sfgoth.com \
--to=mitch@sfgoth.com \
--cc=kernel@linuxace.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net@vger.kernel.org \
--cc=netdev@oss.sgi.com \
--cc=shemminger@osdl.org \
/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;
as well as URLs for NNTP newsgroup(s).