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
7351a4822d
("batman-adv: split out router from orig_node")

Signed-off-by: Simon Wunderlich <simon@open-mesh.com>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
This commit is contained in:
Simon Wunderlich 2014-03-26 15:46:23 +01:00 committed by Antonio Quartulli
parent 000c8dff97
commit 7b955a9fc1

View File

@ -862,7 +862,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_ifinfo, changed_neigh;
if (batadv_has_timed_out(orig_node->last_seen,
2 * BATADV_PURGE_TIMEOUT)) {
@ -872,10 +872,10 @@ static bool batadv_purge_orig_node(struct batadv_priv *bat_priv,
jiffies_to_msecs(orig_node->last_seen));
return true;
}
changed = batadv_purge_orig_ifinfo(bat_priv, orig_node);
changed = changed || batadv_purge_orig_neighbors(bat_priv, orig_node);
changed_ifinfo = batadv_purge_orig_ifinfo(bat_priv, orig_node);
changed_neigh = batadv_purge_orig_neighbors(bat_priv, orig_node);
if (!changed)
if (!changed_ifinfo && !changed_neigh)
return false;
/* first for NULL ... */