From 1cf69fc5b7ffac3193ad8fa4439586c865c5acab Mon Sep 17 00:00:00 2001
From: Andreas Pape <ap...@phoenixcontact.com>
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 <ap...@phoenixcontact.com>
---
 net/batman-adv/routing.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

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))
                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
___________________________________________________________________
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. 
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten 
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. 
Das unerlaubte Kopieren, jegliche anderweitige Verwendung sowie die unbefugte 
Weitergabe dieser Mail ist nicht gestattet.
----------------------------------------------------------------------------------------------------
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure, distribution or other use of the material or parts thereof 
is strictly forbidden.
___________________________________________________________________

Reply via email to