[Bridge] VLAN handling in br_netfilter.c:br_nf_pre_routing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux