ndp: Set (ICMP) hop limit to 255 in router advertisement

Found while re-reading this part, zero works as well, but a
host might legitimately refuse a value that's below a given
threshold.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-10-21 12:12:14 +02:00
parent a620de294d
commit bf68270898

1
ndp.c
View file

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