hardif_disable_interface() calls purge_orig_ref() to immediately free all neighbors associated with the interface that is going down. purge_orig_neighbors() checked if the interface status is IF_INACTIVE which is set to IF_NOT_IN_USE shortly before calling purge_orig_ref().
Signed-off-by: Marek Lindner lindner_marek@yahoo.de --- batman-adv/hard-interface.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/batman-adv/hard-interface.c b/batman-adv/hard-interface.c index 4f95777..52b2b72 100644 --- a/batman-adv/hard-interface.c +++ b/batman-adv/hard-interface.c @@ -398,7 +398,6 @@ void hardif_disable_interface(struct batman_if *batman_if)
kfree(batman_if->packet_buff); batman_if->packet_buff = NULL; - batman_if->if_status = IF_NOT_IN_USE;
/* delete all references to this batman_if */ purge_orig_ref(bat_priv); @@ -410,6 +409,7 @@ void hardif_disable_interface(struct batman_if *batman_if) softif_destroy(batman_if->soft_iface);
batman_if->soft_iface = NULL; + batman_if->if_status = IF_NOT_IN_USE; }
static struct batman_if *hardif_add_interface(struct net_device *net_dev)