From: Patrick McHardy <kaber@trash.net>
To: Bart De Schuymer <bdschuym@pandora.be>
Cc: Lennert Buytenhek <buytenh@wantstofly.org>,
"David S. Miller" <davem@davemloft.net>,
netdev@oss.sgi.com, snort2004@mail.ru
Subject: Re: [PATCH][BRIDGE-NF] Fix wrong use of skb->protocol
Date: Fri, 31 Dec 2004 01:33:15 +0100 [thread overview]
Message-ID: <41D49E4B.2020007@trash.net> (raw)
In-Reply-To: <1104448248.15601.55.camel@localhost.localdomain>
Bart De Schuymer wrote:
> Hi Lennert,
>
> skb->protocol is not set for locally generated packets when the packet
> is still in the IP stack. I don't know what happens with it after the IP
> stack is finished with the packet.
It is set shortly before the packet leaves the IP stack,
in ip_finish_output. This is after LOCAL_OUT, but before
POST_ROUTING. So your fix looks fine.
> The comment in skbuff.h says "packet protocol from driver", from which I
> tend to conclude that skb->protocol is only set by drivers when a packet
> enters the box. Too bad stuff like this isn't clearly spelled out, the
> FIXME for the dst field has been sitting there for probably more than a
> year too. Anyway, it wouldn't hurt if the skb->protocol field always
> held the right value.
The IP stack knows it's IP anyway :) After that it has to
hold the right value.
Regards
Patrick
next prev parent reply other threads:[~2004-12-31 0:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-30 18:55 [PATCH][BRIDGE-NF] Fix wrong use of skb->protocol Bart De Schuymer
2004-12-30 22:24 ` Lennert Buytenhek
2004-12-30 23:10 ` Bart De Schuymer
2004-12-31 0:33 ` Patrick McHardy [this message]
2004-12-31 8:33 ` Lennert Buytenhek
2004-12-31 10:51 ` Bart De Schuymer
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=41D49E4B.2020007@trash.net \
--to=kaber@trash.net \
--cc=bdschuym@pandora.be \
--cc=buytenh@wantstofly.org \
--cc=davem@davemloft.net \
--cc=netdev@oss.sgi.com \
--cc=snort2004@mail.ru \
/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).