1 From: Andreas Pape <apape@phoenixcontact.com>
2 Date: Fri, 19 May 2017 10:01:42 +0200
3 Subject: [PATCH] batman-adv: fix memory leak when dropping packet from other gateway
5 The skb must be released in the receive handler since b91a2543b4c1
6 ("batman-adv: Consume skb in receive handlers"). Just returning NET_RX_DROP
7 will no longer automatically free the memory. This results in memory leaks
8 when unicast packets from other backbones must be dropped because they
9 share a common backbone.
11 Fixes: bfe2a1971f43 ("batman-adv: drop unicast packets from other backbone gw")
12 Signed-off-by: Andreas Pape <apape@phoenixcontact.com>
13 [sven@narfation.org: adjust commit message]
14 Signed-off-by: Sven Eckelmann <sven@narfation.org>
16 Origin: upstream, https://git.open-mesh.org/batman-adv.git/commit/a58feb79ed1447e3e83f3b0b1a23779886869f39
18 net/batman-adv/routing.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
21 diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
22 index 5190683424b89d1fa7c86895000bc6656e6a65dd..213cc01ad00392f7cbd4efd9d4796f76691d2d9e 100644
23 --- a/net/batman-adv/routing.c
24 +++ b/net/batman-adv/routing.c
25 @@ -988,7 +988,7 @@ int batadv_recv_unicast_packet(struct sk_buff *skb,
26 batadv_dbg(BATADV_DBG_BLA, bat_priv,
27 "Dropped unicast pkt received from another backbone gw %pM.\n",