Repository : ssh://git@diktynna/batman-adv
On branch : master
commit adc3eb89868e6ffc3d37e42b929eef55da2e1f8f Merge: 56db7c05 0aac7a9f Author: Sven Eckelmann sven@narfation.org Date: Sat Mar 5 09:09:33 2022 +0100
Merge branch 'maint'
adc3eb89868e6ffc3d37e42b929eef55da2e1f8f net/batman-adv/hard-interface.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-)
diff --cc net/batman-adv/hard-interface.c index b25afc7f,35fadb92..83fb51b6 --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c @@@ -162,12 -162,15 +162,15 @@@ static bool batadv_is_on_batman_iface(c
parent_net = batadv_getlink_net(net_dev, net);
+ /* iflink to itself, most likely physical device */ + if (net == parent_net && iflink == net_dev->ifindex) + return false; + /* recurse over the parent device */ - parent_dev = __dev_get_by_index((struct net *)parent_net, - dev_get_iflink(net_dev)); + parent_dev = __dev_get_by_index((struct net *)parent_net, iflink); - /* if we got a NULL parent_dev there is something broken.. */ if (!parent_dev) { - pr_err("Cannot find parent device\n"); + pr_warn("Cannot find parent device. Skipping batadv-on-batadv check for %s\n", + net_dev->name); return false; }