[linux-next] LinuxNextTracking branch, master, updated. next-20140523

batman at open-mesh.org batman at open-mesh.org
Sat May 24 00:18:45 CEST 2014


The following commit has been merged in the master branch:
commit b6ed5498601df40489606dbc14a9c7011c16630b
Author: Cong Wang <cwang at twopensource.com>
Date:   Thu May 22 11:57:17 2014 -0700

    batman: fix a bogus warning from batadv_is_on_batman_iface()
    
    batman tries to search dev->iflink to check if it's a batman interface,
    but ->iflink could be 0, which is not a valid ifindex. It should just
    avoid iflink == 0 case.
    
    Reported-by: Jet Chen <jet.chen at intel.com>
    Tested-by: Jet Chen <jet.chen at intel.com>
    Cc: David S. Miller <davem at davemloft.net>
    Cc: Steffen Klassert <steffen.klassert at secunet.com>
    Cc: Antonio Quartulli <antonio at open-mesh.com>
    Cc: Marek Lindner <mareklindner at neomailbox.ch>
    Signed-off-by: Cong Wang <xiyou.wangcong at gmail.com>
    Signed-off-by: Cong Wang <cwang at twopensource.com>
    Signed-off-by: David S. Miller <davem at davemloft.net>

diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index b851cc5..fbda6b5 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -83,7 +83,7 @@ static bool batadv_is_on_batman_iface(const struct net_device *net_dev)
 		return true;
 
 	/* no more parents..stop recursion */
-	if (net_dev->iflink == net_dev->ifindex)
+	if (net_dev->iflink == 0 || net_dev->iflink == net_dev->ifindex)
 		return false;
 
 	/* recurse over the parent device */

-- 
LinuxNextTracking


More information about the linux-merge mailing list