]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
net: bridge: fix dest lookup when vlan proto doesn't match
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Thu, 13 Jul 2017 13:09:10 +0000 (16:09 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Jul 2017 15:19:23 +0000 (08:19 -0700)
commit31a4562d7408493c6377933ff2f7d7302dbdea80
tree66129e7691e6c3f56c9f30457107a98c6b734fd7
parent40fbbce007cb458da4c15cbf53beacf6b755cedc
net: bridge: fix dest lookup when vlan proto doesn't match

With 802.1ad support the vlan_ingress code started checking for vlan
protocol mismatch which causes the current tag to be inserted and the
bridge vlan protocol & pvid to be set. The vlan tag insertion changes
the skb mac_header and thus the lookup mac dest pointer which was loaded
prior to calling br_allowed_ingress in br_handle_frame_finish is VLAN_HLEN
bytes off now, pointing to the last two bytes of the destination mac and
the first four of the source mac causing lookups to always fail and
broadcasting all such packets to all ports. Same thing happens for locally
originated packets when passing via br_dev_xmit. So load the dest pointer
after the vlan checks and possible skb change.

Fixes: 8580e2117c06 ("bridge: Prepare for 802.1ad vlan filtering support")
Reported-by: Anitha Narasimha Murthy <anitha@cumulusnetworks.com>
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Acked-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_device.c
net/bridge/br_input.c