From patchwork Fri Feb 12 13:54:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andreas Pape X-Patchwork-Id: 5037 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=62.157.123.121; helo=mail2.phoenixcontact.com; envelope-from=apape@phoenixcontact.com; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=none header.from=phoenixcontact.com Received: from mail2.phoenixcontact.com (mail2.phoenixcontact.com [62.157.123.121]) by open-mesh.org (Postfix) with ESMTPS id 616E081D02 for ; Fri, 12 Feb 2016 14:54:18 +0100 (CET) To: b.a.t.m.a.n@lists.open-mesh.org MIME-Version: 1.0 X-KeepSent: 4C91F5B8:1DBDF49E-C1257F57:004C552D; type=4; name=$KeepSent X-Mailer: IBM Notes Release 9.0.1FP4 June 08, 2015 From: Andreas Pape Message-ID: Date: Fri, 12 Feb 2016 14:54:15 +0100 X-MIMETrack: Serialize by ntm_grab.EXE on nemex02/spoke/SRV/DE/Phoenix Contact at 12.02.2016 14:54:10, Serialize complete at 12.02.2016 14:54:10, Itemize by ntm_grab.EXE on nemex02/spoke/SRV/DE/Phoenix Contact at 12.02.2016 14:54:10, Serialize by Router on nemex02/spoke/SRV/DE/Phoenix Contact at 12.02.2016 14:54:10 content-transfer-encoding: quoted-printable Subject: [B.A.T.M.A.N.] [PATCH 4/4] batman-adv: free skb when dropping broadcast packet received from another backbone gw X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Feb 2016 13:54:18 -0000 From 1cf69fc5b7ffac3193ad8fa4439586c865c5acab Mon Sep 17 00:00:00 2001 From: Andreas Pape Date: Fri, 12 Feb 2016 14:00:53 +0100 Subject: [PATCH 4/4] batman-adv: free skb when dropping broadcast packet received from another backbone gw skb should be freed in batadv_recv_bcast_packet if packet shall be dropped due to reception from another backbone gateway of the same backbone. Signed-off-by: Andreas Pape --- net/batman-adv/routing.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) goto rx_success; -- 1.7.0.4 .................................................................. PHOENIX CONTACT ELECTRONICS GmbH Sitz der Gesellschaft / registered office of the company: 31812 Bad Pyrmont USt-Id-Nr.: DE811742156 Amtsgericht Hannover HRB 100528 / district court Hannover HRB 100528 Geschäftsführer / Executive Board: Roland Bent, Dr. Martin Heubeck diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index 4dd646a..128ed28 100644 --- a/net/batman-adv/routing.c +++ b/net/batman-adv/routing.c @@ -1104,8 +1104,10 @@ int batadv_recv_bcast_packet(struct sk_buff *skb, /* don't hand the broadcast up if it is from an originator * from the same backbone. */ - if (batadv_bla_is_backbone_gw(skb, orig_node, hdr_size)) - goto out; + if (batadv_bla_is_backbone_gw(skb, orig_node, hdr_size)) { + kfree_skb(skb); + goto rx_success; + } if (batadv_dat_snoop_incoming_arp_request(bat_priv, skb, hdr_size))