Repository : ssh://git@open-mesh.org/batman-adv
On branch : next
commit 11be1ac9cacdf843cdaaa0ae9f4dfe7206ac6d35 Author: Cong Wang cwang@twopensource.com Date: Thu May 22 11:57:17 2014 -0700
batman-adv: 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@intel.com Tested-by: Jet Chen jet.chen@intel.com Cc: David S. Miller davem@davemloft.net Cc: Steffen Klassert steffen.klassert@secunet.com Cc: Antonio Quartulli antonio@open-mesh.com Cc: Marek Lindner mareklindner@neomailbox.ch Signed-off-by: Cong Wang xiyou.wangcong@gmail.com Signed-off-by: Cong Wang cwang@twopensource.com Signed-off-by: David S. Miller davem@davemloft.net Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
11be1ac9cacdf843cdaaa0ae9f4dfe7206ac6d35 hard-interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hard-interface.c b/hard-interface.c index b851cc5..fbda6b5 100644 --- a/hard-interface.c +++ b/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 */