From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Adam Osuchowski <adwol@zonk.pl>
Cc: bridge@lists.linux-foundation.org
Subject: Re: [Bridge] [BUG] Dropping fragmented IP packets within VLAN frames on bridge
Date: Fri, 25 May 2007 11:00:13 -0700 [thread overview]
Message-ID: <20070525110013.1d2242e8@oldman> (raw)
In-Reply-To: <20070525174925.41bd6b2e@zonk.pl>
On Fri, 25 May 2007 19:49:25 +0200
Adam Osuchowski <adwol@zonk.pl> wrote:
> Stephen Hemminger wrote:
> > It would be better to account for the tag in the length check.
> > Something like
> > if (skb->protocol == htons(ETH_P_IP) &&
> > skb->len > skb->dev->mtu - (IS_VLAN_IP(skb) ? VLAN_HLEN : 0) &&
> > !skb_is_gso(skb))
> > return ip_fragment ...
>
> It isn't good solution because one of IS_VLAN_IP() necessary condition is
>
> skb->protocol == htons(ETH_P_8021Q)
>
> which is, of course, mutually exclusive with
>
> skb->protocol == htons(ETH_P_IP)
>
> from br_nf_dev_queue_xmit(). IMHO, one should check length of ETH_P_IP
> and ETH_P_8021Q frames separately:
>
> if (((skb->protocol == htons(ETH_P_IP) && skb->len > skb->dev->mtu) ||
> (IS_VLAN_IP(skb) && skb->len > skb->dev->mtu - VLAN_HLEN)) &&
> !skb_is_gso(skb))
> return ip_fragment ...
There is a function in br_forward.c that handles VLAN packet length
maybe use that
next prev parent reply other threads:[~2007-05-25 18:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-25 8:17 [Bridge] [BUG] Dropping fragmented IP packets within VLAN frames on bridge Adam Osuchowski
2007-05-25 15:59 ` Stephen Hemminger
2007-05-25 17:49 ` Adam Osuchowski
2007-05-25 18:00 ` Stephen Hemminger [this message]
2007-05-25 18:17 ` Adam Osuchowski
2007-05-25 18:28 ` Stephen Hemminger
2007-05-25 18:49 ` Adam Osuchowski
2007-05-26 8:13 ` Patrick McHardy
2007-05-26 14:20 ` Ingo Oeser
2007-05-26 15:05 ` Patrick McHardy
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=20070525110013.1d2242e8@oldman \
--to=shemminger@linux-foundation.org \
--cc=adwol@zonk.pl \
--cc=bridge@lists.linux-foundation.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