From: Simon Wunderlich simon@open-mesh.com
The current code will not execute batadv_purge_orig_neighbors() when an orig_ifinfo has already been purged. However we need to run it in any case. Fix that.
This is a regression introduced by de6bcc76ea84fecb136f8c8f5ba1862e4a13f06b ("batman-adv: split out router from orig_node")
Signed-off-by: Simon Wunderlich simon@open-mesh.com --- originator.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/originator.c b/originator.c index 2fd6678..3821981 100644 --- a/originator.c +++ b/originator.c @@ -854,7 +854,7 @@ static bool batadv_purge_orig_node(struct batadv_priv *bat_priv, { struct batadv_neigh_node *best_neigh_node; struct batadv_hard_iface *hard_iface; - bool changed; + bool changed, changed_neigh;
if (batadv_has_timed_out(orig_node->last_seen, 2 * BATADV_PURGE_TIMEOUT)) { @@ -865,7 +865,8 @@ static bool batadv_purge_orig_node(struct batadv_priv *bat_priv, return true; } changed = batadv_purge_orig_ifinfo(bat_priv, orig_node); - changed = changed || batadv_purge_orig_neighbors(bat_priv, orig_node); + changed_neigh = batadv_purge_orig_neighbors(bat_priv, orig_node); + changed |= changed_neigh;
if (!changed) return false;