Skip to content

Commit fd65e5a

Browse files
Nikolay Aleksandrovdavem330
authored andcommitted
net: bridge: clear bridge's private skb space on xmit
We need to clear all of the bridge private skb variables as they can be stale due to the packet being recirculated through the stack and then transmitted through the bridge device. Similar memset is already done on bridge's input. We've seen cases where proxyarp_replied was 1 on routed multicast packets transmitted through the bridge to ports with neigh suppress which were getting dropped. Same thing can in theory happen with the port isolation bit as well. Fixes: 821f1b2 ("bridge: add new BR_NEIGH_SUPPRESS port flag to suppress arp and nd flood") Signed-off-by: Nikolay Aleksandrov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ae79dbf commit fd65e5a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/bridge/br_device.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
3636
const unsigned char *dest;
3737
u16 vid = 0;
3838

39+
memset(skb->cb, 0, sizeof(struct br_input_skb_cb));
40+
3941
rcu_read_lock();
4042
nf_ops = rcu_dereference(nf_br_ops);
4143
if (nf_ops && nf_ops->br_dev_xmit_hook(skb)) {

0 commit comments

Comments
 (0)