From: Simon Wunderlich <sw@simonwunderlich.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Simon Wunderlich <simon@open-mesh.com>
Subject: [B.A.T.M.A.N.] [PATCH-maintv3 3/4] batman-adv: always run purge_orig_neighbors
Date: Wed, 26 Mar 2014 15:46:23 +0100 [thread overview]
Message-ID: <1395845184-15186-4-git-send-email-sw@simonwunderlich.de> (raw)
In-Reply-To: <1395845184-15186-1-git-send-email-sw@simonwunderlich.de>
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>
---
Changes to PATCHv1:
* check two change variables separately
---
originator.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/originator.c b/originator.c
index 25df60d..47b0886 100644
--- a/originator.c
+++ b/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 ... */
--
1.7.10.4
next prev parent reply other threads:[~2014-03-26 14:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-26 14:46 [B.A.T.M.A.N.] [PATCH-maintv3 0/4] fix multiif regressions Simon Wunderlich
2014-03-26 14:46 ` [B.A.T.M.A.N.] [PATCH-maintv3 1/4] batman-adv: fix neigh_ifinfo imbalance Simon Wunderlich
2014-03-29 12:01 ` Marek Lindner
2014-03-26 14:46 ` [B.A.T.M.A.N.] [PATCH-maintv3 2/4] batman-adv: fix neigh reference imbalance Simon Wunderlich
2014-03-31 9:25 ` Marek Lindner
2014-03-26 14:46 ` Simon Wunderlich [this message]
2014-03-31 9:28 ` [B.A.T.M.A.N.] [PATCH-maintv3 3/4] batman-adv: always run purge_orig_neighbors Marek Lindner
2014-03-26 14:46 ` [B.A.T.M.A.N.] [PATCH-maintv3 4/4] batman-adv: fix removing neigh_ifinfo Simon Wunderlich
2014-03-31 9:32 ` Marek Lindner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1395845184-15186-4-git-send-email-sw@simonwunderlich.de \
--to=sw@simonwunderlich.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=simon@open-mesh.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox