summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSimon Wunderlich <simon@open-mesh.com>2014-03-26 15:46:23 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-31 13:20:38 -0700
commitc53de6e7451ac60f18754e81962651fdfafa4226 (patch)
tree4b14b249f79ba3c3b7d32d5be8567860bc930f97 /net
parentea859052dd85388cbfd20bf252d4db92123344b9 (diff)
downloadlwn-c53de6e7451ac60f18754e81962651fdfafa4226.tar.gz
lwn-c53de6e7451ac60f18754e81962651fdfafa4226.zip
batman-adv: always run purge_orig_neighbors
[ Upstream commit 7b955a9fc164487d7c51acb9787f6d1b01b35ef6 ] 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 7351a4822d42827ba0110677c0cbad88a3d52585 ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/batman-adv/originator.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index 25df60ded7d2..47b08860679f 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -857,7 +857,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)) {
@@ -867,10 +867,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 ... */