projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbdc0ad
)
batman: fix a bogus warning from batadv_is_on_batman_iface()
author
Cong Wang
<
[email protected]
>
Thu, 22 May 2014 18:57:17 +0000
(11:57 -0700)
committer
David S. Miller
<
[email protected]
>
Thu, 22 May 2014 21:23:00 +0000
(17:23 -0400)
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 <
[email protected]
>
Tested-by: Jet Chen <
[email protected]
>
Cc: David S. Miller <
[email protected]
>
Cc: Steffen Klassert <
[email protected]
>
Cc: Antonio Quartulli <
[email protected]
>
Cc: Marek Lindner <
[email protected]
>
Signed-off-by: Cong Wang <
[email protected]
>
Signed-off-by: Cong Wang <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/batman-adv/hard-interface.c
patch
|
blob
|
history
diff --git
a/net/batman-adv/hard-interface.c
b/net/batman-adv/hard-interface.c
index b851cc58085330acbab02848fedf3cb01751a060..fbda6b54baffccf798375cb8add49bb179738386 100644
(file)
--- 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 */