mirror of
https://github.com/torvalds/linux.git
synced 2024-10-31 17:21:49 +00:00
batman-adv: free neighbors when an interface is deactivated
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>
This commit is contained in:
parent
f987ed6ebd
commit
1a241a57be
@ -224,10 +224,15 @@ static bool purge_orig_neighbors(struct bat_priv *bat_priv,
|
||||
if ((time_after(jiffies,
|
||||
neigh_node->last_valid + PURGE_TIMEOUT * HZ)) ||
|
||||
(neigh_node->if_incoming->if_status == IF_INACTIVE) ||
|
||||
(neigh_node->if_incoming->if_status == IF_NOT_IN_USE) ||
|
||||
(neigh_node->if_incoming->if_status == IF_TO_BE_REMOVED)) {
|
||||
|
||||
if (neigh_node->if_incoming->if_status ==
|
||||
IF_TO_BE_REMOVED)
|
||||
if ((neigh_node->if_incoming->if_status ==
|
||||
IF_INACTIVE) ||
|
||||
(neigh_node->if_incoming->if_status ==
|
||||
IF_NOT_IN_USE) ||
|
||||
(neigh_node->if_incoming->if_status ==
|
||||
IF_TO_BE_REMOVED))
|
||||
bat_dbg(DBG_BATMAN, bat_priv,
|
||||
"neighbor purge: originator %pM, "
|
||||
"neighbor: %pM, iface: %s\n",
|
||||
|
Loading…
Reference in New Issue
Block a user