1
0
mirror of https://passt.top/passt synced 2024-06-30 15:02:40 +00:00

ndp: Set router lifetime to 9000s instead of 3600s

Seen while testing: lifetime expires while we're flooding a tap
interface with UDP packets, the router advertisement comes too late,
and the kernel drops the default router in the namespace. This
should only affect testing, so go for the maximum allowed value,
that is, 9000 seconds.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-09-27 00:13:16 +02:00
parent dd581730e5
commit 4b0ccb8323

2
ndp.c
View File

@ -100,7 +100,7 @@ int ndp(struct ctx *c, struct ethhdr *eh, size_t len)
info("NDP: received RS, sending RA");
ihr->icmp6_type = RA;
ihr->icmp6_code = 0;
ihr->icmp6_rt_lifetime = htons(3600);
ihr->icmp6_rt_lifetime = htons(9000);
ihr->icmp6_addrconf_managed = 1;
p = (unsigned char *)(ihr + 1);