From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Ensure that we really have route changes in update_route
Date: Tue, 10 May 2011 11:22:37 +0200 [thread overview]
Message-ID: <1305019357-27050-3-git-send-email-sven@narfation.org> (raw)
In-Reply-To: <1305019357-27050-1-git-send-email-sven@narfation.org>
The debug output of update_route has tests for "route deleted" and "route
added". All other situations are handled as "route changed". This is not
true because neigh_node and curr_router could be both NULL.
The function is not called in this situation, but the code might be
interpreted wrong when reading it without this test.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
routing.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/routing.c b/routing.c
index 8c403ce..3f8355c 100644
--- a/routing.c
+++ b/routing.c
@@ -109,7 +109,7 @@ static void update_route(struct bat_priv *bat_priv,
tt_buff, tt_buff_len);
/* route changed */
- } else {
+ } else if (neigh_node && curr_router) {
bat_dbg(DBG_ROUTES, bat_priv,
"Changing route towards: %pM "
"(now via %pM - was via %pM)\n",
--
1.7.5.1
next prev parent reply other threads:[~2011-05-10 9:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-10 9:22 [B.A.T.M.A.N.] Random bat_dbg cleanup patches Sven Eckelmann
2011-05-10 9:22 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Remove unreachable code from gw_election Sven Eckelmann
2011-05-10 9:22 ` Sven Eckelmann [this message]
2011-05-22 10:29 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Ensure that we really have route changes in update_route 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=1305019357-27050-3-git-send-email-sven@narfation.org \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/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