]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: fix memory leak when dropping packet from other gateway
authorAndreas Pape <apape@phoenixcontact.com>
Fri, 19 May 2017 08:01:42 +0000 (10:01 +0200)
committerSimon Wunderlich <sw@simonwunderlich.de>
Fri, 19 May 2017 10:20:28 +0000 (12:20 +0200)
commitb4f4f277e380e5ced3660c757a7c176c199d9d84
tree2be4b87236d4a54c721e96ec1a226d4852f88b15
parent63c1fbce4d48ce9025a8b2a7a30e0b59ab8f332a
batman-adv: fix memory leak when dropping packet from other gateway

The skb must be released in the receive handler since 4d4bc9bb3e60
("batman-adv: Consume skb in receive handlers"). Just returning NET_RX_DROP
will no longer automatically free the memory. This results in memory leaks
when unicast packets from other backbones must be dropped because they
share a common backbone.

Fixes: 15fdc2bbf9a8 ("batman-adv: drop unicast packets from other backbone gw")
Signed-off-by: Andreas Pape <apape@phoenixcontact.com>
[sven@narfation.org: adjust commit message]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/routing.c