aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/batman-adv/routing.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index b1824bba09b3..840e2c64a301 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -234,17 +234,14 @@ int window_protected(struct bat_priv *bat_priv, int32_t seq_num_diff,
234{ 234{
235 if ((seq_num_diff <= -TQ_LOCAL_WINDOW_SIZE) || 235 if ((seq_num_diff <= -TQ_LOCAL_WINDOW_SIZE) ||
236 (seq_num_diff >= EXPECTED_SEQNO_RANGE)) { 236 (seq_num_diff >= EXPECTED_SEQNO_RANGE)) {
237 if (has_timed_out(*last_reset, RESET_PROTECTION_MS)) { 237 if (!has_timed_out(*last_reset, RESET_PROTECTION_MS))
238
239 *last_reset = jiffies;
240 bat_dbg(DBG_BATMAN, bat_priv,
241 "old packet received, start protection\n");
242
243 return 0;
244 } else {
245 return 1; 238 return 1;
246 } 239
240 *last_reset = jiffies;
241 bat_dbg(DBG_BATMAN, bat_priv,
242 "old packet received, start protection\n");
247 } 243 }
244
248 return 0; 245 return 0;
249} 246}
250 247