diff options
author | Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de> | 2011-10-30 11:22:43 -0400 |
---|---|---|
committer | Sven Eckelmann <sven@narfation.org> | 2011-11-20 07:08:35 -0500 |
commit | 76e8d7b0d1b0091929e8cd18551a87b6bb6ef2c1 (patch) | |
tree | 30b2e7650d62277cfb63dfe8145f4b372b47af4c /net/batman-adv/bitarray.c | |
parent | 8b7342d673d31e7aa60baae35321c11532275cdb (diff) |
batman-adv: Fix range check for expected packets
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@intra2net.com>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/bitarray.c')
-rw-r--r-- | 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 0be9ff346fa0..9bc63b209b3f 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, | |||
155 | /* sequence number is much newer, probably missed a lot of packets */ | 155 | /* sequence number is much newer, probably missed a lot of packets */ |
156 | 156 | ||
157 | if ((seq_num_diff >= TQ_LOCAL_WINDOW_SIZE) | 157 | if ((seq_num_diff >= TQ_LOCAL_WINDOW_SIZE) |
158 | || (seq_num_diff < EXPECTED_SEQNO_RANGE)) { | 158 | && (seq_num_diff < EXPECTED_SEQNO_RANGE)) { |
159 | bat_dbg(DBG_BATMAN, bat_priv, | 159 | bat_dbg(DBG_BATMAN, bat_priv, |
160 | "We missed a lot of packets (%i) !\n", | 160 | "We missed a lot of packets (%i) !\n", |
161 | seq_num_diff - 1); | 161 | seq_num_diff - 1); |