From: Krzysztof Halasa <khc@pm.waw.pl>
To: Patrick McHardy <kaber@trash.net>
Cc: David Miller <davem@davemloft.net>,
lkml <linux-kernel@vger.kernel.org>,
netdev@vger.kernel.org,
Netfilter Development Mailinglist
<netfilter-devel@lists.netfilter.org>
Subject: Re: Broken commit: [NETFILTER]: ipt_REJECT: remove largely duplicate route_reverse function
Date: Wed, 29 Nov 2006 00:56:35 +0100 [thread overview]
Message-ID: <m3slg3ktvw.fsf@defiant.localdomain> (raw)
In-Reply-To: <456CAE0D.2080209@trash.net> (Patrick McHardy's message of "Tue, 28 Nov 2006 22:45:49 +0100")
Patrick McHardy <kaber@trash.net> writes:
> It might be the case that your network device has a
> hard_header_len > LL_MAX_HEADER, which could trigger
> a corruption.
Hmm... GRE tunnels add 24 bytes... I just noticed the following code in
include/linux/netdevice.h:
/*
* Compute the worst case header length according to the protocols
* used.
*/
#if !defined(CONFIG_AX25) && !defined(CONFIG_AX25_MODULE) && !defined(CONFIG_TR)
#define LL_MAX_HEADER 32
#else
#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
#define LL_MAX_HEADER 96
#else
#define LL_MAX_HEADER 48
#endif
#endif
#if !defined(CONFIG_NET_IPIP) && \
!defined(CONFIG_IPV6) && !defined(CONFIG_IPV6_MODULE)
#define MAX_HEADER LL_MAX_HEADER
#else
#define MAX_HEADER (LL_MAX_HEADER + 48)
#endif
I don't use AX25, Token Ring, the old IPIP tunnels nor IPv6 here, but
I wonder if GRE tunnel (which is basically another, more compatible
form of IPIP) need the same treatment as IPIP.
I've confirmed that REJECTs over GRE tunnel caused that corruption.
> Please try this patch on top of the REJECT patch (ideally after
> verifying that the REJECT patch is really introducing the
> corruption).
That was certain. The patch fixed the problem, confirmed with current
git tree as well. Thanks for looking at it.
I'm not sure about LL_MAX_HEADER (and/or MAX_HEADER) though. Should it
be changed as well?
There are many devices adding data to header space, perhaps tacking
devices doesn't count as the skb is being linearized in
dev->hard_start_xmit() or equivalent path?
--
Krzysztof Halasa
next prev parent reply other threads:[~2006-11-29 2:09 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-28 18:30 Broken commit: [NETFILTER]: ipt_REJECT: remove largely duplicate route_reverse function Krzysztof Halasa
2006-11-28 19:58 ` Patrick McHardy
2006-11-28 20:48 ` Krzysztof Halasa
2006-11-28 21:45 ` Patrick McHardy
2006-11-28 23:56 ` Krzysztof Halasa [this message]
2006-11-29 2:28 ` Patrick McHardy
2006-11-29 4:25 ` David Miller
2006-11-29 4:38 ` Herbert Xu
2006-11-29 4:44 ` David Miller
2006-11-29 4:56 ` Herbert Xu
2006-11-29 5:04 ` David Miller
2006-11-29 6:51 ` Herbert Xu
2006-12-01 4:22 ` David Miller
2006-12-01 4:37 ` Herbert Xu
2006-12-12 1:33 ` David Miller
2006-11-29 7:35 ` Jarek Poplawski
2006-11-29 15:06 ` Krzysztof Halasa
2006-11-29 15:16 ` Krzysztof Halasa
2006-11-30 8:31 ` Jarek Poplawski
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=m3slg3ktvw.fsf@defiant.localdomain \
--to=khc@pm.waw.pl \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@lists.netfilter.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).