mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 22:51:42 +00:00
bridge: Fix skb leak when multicast parsing fails on TX
On the bridge TX path we're leaking an skb when br_multicast_rcv returns an error. Reported-by: David Lamparter <equinox@diac24.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a3bdb549e3
commit
6d1d1d398c
@ -48,8 +48,10 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
|
||||
rcu_read_lock();
|
||||
if (is_multicast_ether_addr(dest)) {
|
||||
if (br_multicast_rcv(br, NULL, skb))
|
||||
if (br_multicast_rcv(br, NULL, skb)) {
|
||||
kfree_skb(skb);
|
||||
goto out;
|
||||
}
|
||||
|
||||
mdst = br_mdb_get(br, skb);
|
||||
if (mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb))
|
||||
|
Loading…
Reference in New Issue
Block a user