[VLAN]: Allow VLAN interface on top of bridge interface

When a VLAN interface is created on top of a bridge interface and
netfilter is enabled to see the bridged packets, the packets can be
corrupted when passing through the netfilter code. This is caused by the
VLAN driver not setting the 'protocol' and 'nh' members of the sk_buff
structure. In general, this is no problem as the VLAN interface is mostly
connected to a physical ethernet interface which does not use the
'protocol' and 'nh' members. For a bridge interface, however, these
members do matter.

Signed-off-by: Jerome Borsboom <j.borsboom@erasmusmc.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Jerome Borsboom and committed by David S. Miller 279e172a 09fe3ef4

+3
+3
net/8021q/vlan_dev.c
··· 380 } else { 381 vhdr->h_vlan_encapsulated_proto = htons(len); 382 } 383 } 384 385 /* Before delegating work to the lower layer, enter our MAC-address */
··· 380 } else { 381 vhdr->h_vlan_encapsulated_proto = htons(len); 382 } 383 + 384 + skb->protocol = htons(ETH_P_8021Q); 385 + skb->nh.raw = skb->data; 386 } 387 388 /* Before delegating work to the lower layer, enter our MAC-address */