Commit 7b955a9f authored by Simon Wunderlich's avatar Simon Wunderlich Committed by Antonio Quartulli

batman-adv: always run purge_orig_neighbors

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
7351a482
("batman-adv: split out router from orig_node")
Signed-off-by: default avatarSimon Wunderlich <simon@open-mesh.com>
Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: default avatarAntonio Quartulli <antonio@meshcoding.com>
parent 000c8dff
...@@ -862,7 +862,7 @@ static bool batadv_purge_orig_node(struct batadv_priv *bat_priv, ...@@ -862,7 +862,7 @@ static bool batadv_purge_orig_node(struct batadv_priv *bat_priv,
{ {
struct batadv_neigh_node *best_neigh_node; struct batadv_neigh_node *best_neigh_node;
struct batadv_hard_iface *hard_iface; struct batadv_hard_iface *hard_iface;
bool changed; bool changed_ifinfo, changed_neigh;
if (batadv_has_timed_out(orig_node->last_seen, if (batadv_has_timed_out(orig_node->last_seen,
2 * BATADV_PURGE_TIMEOUT)) { 2 * BATADV_PURGE_TIMEOUT)) {
...@@ -872,10 +872,10 @@ static bool batadv_purge_orig_node(struct batadv_priv *bat_priv, ...@@ -872,10 +872,10 @@ static bool batadv_purge_orig_node(struct batadv_priv *bat_priv,
jiffies_to_msecs(orig_node->last_seen)); jiffies_to_msecs(orig_node->last_seen));
return true; return true;
} }
changed = batadv_purge_orig_ifinfo(bat_priv, orig_node); changed_ifinfo = 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);
if (!changed) if (!changed_ifinfo && !changed_neigh)
return false; return false;
/* first for NULL ... */ /* first for NULL ... */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment