Skip to content

Commit 1a241a5

Browse files
author
Marek Lindner
committed
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>
1 parent f987ed6 commit 1a241a5

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎net/batman-adv/originator.c‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,15 @@ static bool purge_orig_neighbors(struct bat_priv *bat_priv,
224224
if ((time_after(jiffies,
225225
neigh_node->last_valid + PURGE_TIMEOUT * HZ)) ||
226226
(neigh_node->if_incoming->if_status == IF_INACTIVE) ||
227+
(neigh_node->if_incoming->if_status == IF_NOT_IN_USE) ||
227228
(neigh_node->if_incoming->if_status == IF_TO_BE_REMOVED)) {
228229

229-
if (neigh_node->if_incoming->if_status ==
230-
IF_TO_BE_REMOVED)
230+
if ((neigh_node->if_incoming->if_status ==
231+
IF_INACTIVE) ||
232+
(neigh_node->if_incoming->if_status ==
233+
IF_NOT_IN_USE) ||
234+
(neigh_node->if_incoming->if_status ==
235+
IF_TO_BE_REMOVED))
231236
bat_dbg(DBG_BATMAN, bat_priv,
232237
"neighbor purge: originator %pM, "
233238
"neighbor: %pM, iface: %s\n",

0 commit comments

Comments
 (0)