[Bridge] VLAN handling in br_netfilter.c:br_nf_pre_routing

Jon Sjoberg jsjoberg at djasolutions.com
Tue Aug 15 20:31:21 PDT 2006


Hi all,

Noticed that br_nf_pre_routing has some code to handle VLANs, but does not
update the nh header.  This appears to cause the IP validity checks to fail
(i.e. "if (iph->ihl < 5...").

There is a check:
if (skb->protocol == __constant_htons(ETH_P_8021Q)){
sk_pull(skb, VLAN_HLEN);
}

If this was changed to:
if (skb->protocol == __constant_htons(ETH_P_8021Q)){
sk_pull(skb, VLAN_HLEN);
skb->nh.raw += VLAN_HLEN;
}

the checks pass.  Note that this updated behavior is already doen elsewhere
in the code.

Thanks,
Jon
----------------------------------------------------------------
Jon Sjoberg
DJA Solutions
E-mail: jsjoberg at djasolutions.com
Phone: 978.448.3659




More information about the Bridge mailing list