1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

gnrc/ipv6: fix: Avoid overflow if prefix already expired

Check similarly to `_handle_pfx_timeout`
This commit is contained in:
xnumad 2024-01-25 19:50:22 +01:00
parent f68f5121c0
commit 1e4a85f1e6

View File

@ -158,7 +158,7 @@ void gnrc_ipv6_nib_pl_print(gnrc_ipv6_nib_pl_t *entry)
printf(" expires %lu sec", (entry->valid_until - now) / MS_PER_SEC);
}
if (entry->pref_until < UINT32_MAX) {
printf(" deprecates %lu sec", (entry->pref_until - now) / MS_PER_SEC);
printf(" deprecates %lu sec", (now >= entry->pref_until ? 0 : entry->pref_until - now) / MS_PER_SEC);
}
puts("");
}