odhcpd
odhcpd copied to clipboard
dhcpv6: RA - Fix preferred lifetime
Comments welcome.
Would appreciate input from @dedeckeh and @PolynomialDivision who seem most familiar with the RA bits.
Tested on 23.05.0
Example Data
Set preferred_lifetime to 7m in GUI (without setting ra_useleasetime)
The following are ICMP Options from ICMPv6 RA packets.
Before patch:
ICMPv6 Option (Prefix information : fd51:1c2a:8909::/64)
Type: Prefix information (3)
Length: 4 (32 bytes)
Prefix Length: 64
Flag: 0xc0, On-link flag(L), Autonomous address-configuration flag(A)
Valid Lifetime: Infinity (4294967295)
Preferred Lifetime: Infinity (4294967295)
Reserved
Prefix: fd51:1c2a:8909::
After patch:
ICMPv6 Option (Prefix information : fd51:1c2a:8909::/64)
Type: Prefix information (3)
Length: 4 (32 bytes)
Prefix Length: 64
Flag: 0xc0, On-link flag(L), Autonomous address-configuration flag(A)
Valid Lifetime: Infinity (4294967295)
Preferred Lifetime: 420
Reserved
Prefix: fd51:1c2a:8909::