From: Simon Wunderlich Date: Sun, 30 Oct 2011 15:22:43 +0000 (+0100) Subject: batman-adv: Fix range check for expected packets X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=76e8d7b0d1b0091929e8cd18551a87b6bb6ef2c1;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: Simon Wunderlich Signed-off-by: Sven Eckelmann --- 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, /* 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);