From: Bart De Schuymer <bdschuym-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org>
To: "David S. Miller" <davem-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: ebtables-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
netdev-VZNHf3L845pBDgjK7y7TUQ@public.gmane.org
Subject: Re: [PATCH] 2.6.3 fix vlan-encapsulated fragmented IP traffic
Date: Mon, 1 Mar 2004 08:06:29 +0100 [thread overview]
Message-ID: <200403010806.29759.bdschuym@pandora.be> (raw)
In-Reply-To: <20040229215421.0ca987e8.davem-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
On Monday 01 March 2004 06:54, David S. Miller wrote:
> Can you explain the 'mtu' fiddling a little bit? I think it's correct...
> but you know :)
Between the Ethernet header and the IP header, there will be put a
vlan-header. This is done in br_dev_queue_push_xmit(), with
nf_bridge_maybe_copy_header(). By changing the mtu we make sure the IP
packets arre small enough to allow the vlan header to be added.
> The one case I'm concerned about is when the device does hw acceleration
> of vlan tagging (ie. therefore things are transparent supposedly), is
> the 'mtu' adjustment thing correct in that case?
I don't think that's a problem. We only have this problem when the vlan-tagged
IP packet enters the bridge as a whole, so the incoming bridge port doesn't
strip the vlan header. Therefore, the outgoing bridge port shouldn't be
adding the vlan-header, as it's already supposed to be there.
The difference between the slow_path and the normal path in ip_fragment() is
that in the normal path we can use the skbuffs of the fragments and these
already have enough space for the vlan header and the IP fragment size is
small enough. In the slow_path the skbuffs are constructed and then we need
these special measures.
> I'm applying this for now, as I can't come up with a better fix either.
> If we find a problem with this change, we'll fix that up.
>
> I'm really concerned, btw, that this is going to propagate to other places
> as well, what if something that gets handled this way gets sent over an
> IPIP tunnel via some route, and then IPIP has to make all of these crazy
> adjustments too? That's going too far and we'll have to find a better
> way if that is the case.
I'm not sure how IPIP tunnels are implemented, but I'm assuming they strip the
first IP header like the vlan code strips the vlan header when a vlan-packet
arrives on a vlan-enabled device. Then there should be no problem with this.
Even if it's done differently, I don't _think_ it will give a problem.
The problem is caused purely by the fact that the bridge-nf code
(br_netfilter.c) skb_pulls the packet by 4 bytes if it's an IP packet inside
a vlan-header, allowing the IP packet to be filtered by iptables, and as far
as the IP code and iptables is concerned, there is no vlan-header. So we need
to give the IP code a little help.
Extra code, analogous to the code for vlan, would need to be added in
nf_bridge_pad() if we were to allow filtering IP packets inside a bridged
IPIP packet, of course.
cheers,
Bart
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
next prev parent reply other threads:[~2004-03-01 7:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-29 18:14 [PATCH] 2.6.3 fix vlan-encapsulated fragmented IP traffic Bart De Schuymer
2004-03-01 5:54 ` David S. Miller
[not found] ` <20040229215421.0ca987e8.davem-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2004-03-01 7:06 ` Bart De Schuymer [this message]
2004-03-01 8:35 ` David S. Miller
[not found] ` <20040301003525.522d6db2.davem-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2004-03-01 18:47 ` 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=200403010806.29759.bdschuym@pandora.be \
--to=bdschuym-lpo8gxj9n8azioh1ieqzka@public.gmane.org \
--cc=davem-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=ebtables-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=netdev-VZNHf3L845pBDgjK7y7TUQ@public.gmane.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).