[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1322317612-7770-11-git-send-email-lindner_marek@yahoo.de>
Date: Sat, 26 Nov 2011 22:26:52 +0800
From: Marek Lindner <lindner_marek@...oo.de>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, b.a.t.m.a.n@...ts.open-mesh.org,
Simon Wunderlich <simon.wunderlich@...03.tu-chemnitz.de>,
Simon Wunderlich <siwu@....tu-chemnitz.de>,
Sven Eckelmann <sven@...fation.org>
Subject: [PATCH 10/10] batman-adv: Fix range check for expected packets
From: Simon Wunderlich <simon.wunderlich@...03.tu-chemnitz.de>
The check for new packets in the future used a wrong binary operator,
which makes the check expression always true and accepting too many
packets.
Reported-by: Thomas Jarosch <thomas.jarosch@...ra2net.com>
Signed-off-by: Simon Wunderlich <siwu@....tu-chemnitz.de>
Signed-off-by: Sven Eckelmann <sven@...fation.org>
---
net/batman-adv/bitarray.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/batman-adv/bitarray.c b/net/batman-adv/bitarray.c
index 0be9ff3..9bc63b2 100644
--- a/net/batman-adv/bitarray.c
+++ b/net/batman-adv/bitarray.c
@@ -155,7 +155,7 @@ int bit_get_packet(void *priv, unsigned long *seq_bits,
/* sequence number is much newer, probably missed a lot of packets */
if ((seq_num_diff >= TQ_LOCAL_WINDOW_SIZE)
- || (seq_num_diff < EXPECTED_SEQNO_RANGE)) {
+ && (seq_num_diff < EXPECTED_SEQNO_RANGE)) {
bat_dbg(DBG_BATMAN, bat_priv,
"We missed a lot of packets (%i) !\n",
seq_num_diff - 1);
--
1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists