diff options
author | Cong Wang <cwang@twopensource.com> | 2014-05-22 11:57:17 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-12-06 15:55:39 -0800 |
commit | 5376f5d39c51b6ed6d787095729464000c9d35e8 (patch) | |
tree | b4345cbf092372de5c98915fbccbfbfbb9ade994 /net | |
parent | 21f8af9f8850890a5b00cf746d4035f82be43c53 (diff) | |
download | linux-stable-5376f5d39c51b6ed6d787095729464000c9d35e8.tar.gz linux-stable-5376f5d39c51b6ed6d787095729464000c9d35e8.tar.bz2 linux-stable-5376f5d39c51b6ed6d787095729464000c9d35e8.zip |
batman: fix a bogus warning from batadv_is_on_batman_iface()
commit b6ed5498601df40489606dbc14a9c7011c16630b upstream.
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/batman-adv/hard-interface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c index b851cc580853..fbda6b54baff 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 */ |