mirror of
https://passt.top/passt
synced 2024-12-22 05:35:23 +00:00
ndp: Make route lifetime a #define
Currently we open-code the lifetime of the route we advertise via NDP to be 65535s (the maximum). Change it to a #define. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
36c070e6e3
commit
a60703e899
4
ndp.c
4
ndp.c
@ -33,6 +33,8 @@
|
||||
#include "tap.h"
|
||||
#include "log.h"
|
||||
|
||||
#define RT_LIFETIME 65535
|
||||
|
||||
#define RS 133
|
||||
#define RA 134
|
||||
#define NS 135
|
||||
@ -229,7 +231,7 @@ static void ndp_ra(const struct ctx *c, const struct in6_addr *dst)
|
||||
.icmp6_code = 0,
|
||||
.icmp6_hop_limit = 255,
|
||||
/* RFC 8319 */
|
||||
.icmp6_rt_lifetime = htons_constant(65535),
|
||||
.icmp6_rt_lifetime = htons_constant(RT_LIFETIME),
|
||||
.icmp6_addrconf_managed = 1,
|
||||
},
|
||||
.prefix_info = {
|
||||
|
Loading…
Reference in New Issue
Block a user