]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: bridge: restore vlan tag when refragmenting
authorFlorian Westphal <fw@strlen.de>
Fri, 5 Jun 2015 11:27:13 +0000 (13:27 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 12 Jun 2015 12:16:55 +0000 (14:16 +0200)
commit7f2c1a11a256a8da8549909cb836abe4e7c33720
tree552f6c80a7f142bc38d645a9e2874ebce433ccd8
parent32e1dea7b47a0acedb4798b5e41cdc6768aeb7a7
netfilter: bridge: restore vlan tag when refragmenting

If bridge netfilter is used with both
bridge-nf-call-iptables and bridge-nf-filter-vlan-tagged enabled
then ip fragments in VLAN frames are sent without the vlan header.

This has never worked reliably.  Turns out this relied on pre-3.5
behaviour where skb frag_list was used to store ip fragments;
ip_fragment() then re-used these skbs.

But since commit ed1d25054a74ad555b46cbd4a113b2723bedbe6b
("ipv4: use skb coalescing in defragmentation") this is no longer
the case.  ip_do_fragment now needs to allocate new skbs, but these
don't contain the vlan tag information anymore.

Fix it by storing vlan information of the ressembled skb in the
br netfilter percpu frag area, and restore them for each of the
fragments.

Fixes: ed1d25054a74ad5 ("ipv4: use skb coalescing in defragmentation")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/bridge/br_netfilter.c