Skip to content

Commit

Permalink
ip_napt_maint: Fix timestamp overflow handling
Browse files Browse the repository at this point in the history
s_last_now was not being updated once overflow happened.
  • Loading branch information
rojer committed Apr 16, 2022
1 parent fb1f355 commit 2e90450
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/ipv4/ip4_napt.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,15 +959,14 @@ ip_napt_maint(void)
* but it's fine for our purposes. */
t->last = now;
}
/* Skip until next tick, nothing to be done here anyway. */
return;
}
ip_napt_gc(now, false /* make_room */);
s_last_now = now;
}

static void
ip_napt_tmr(void *arg) {
ip_napt_tmr(void *arg)
{
ip_napt_maint();
sys_timeout(NAPT_TMR_INTERVAL, ip_napt_tmr, arg);
}
Expand Down

0 comments on commit 2e90450

Please sign in to comment.