dhcpv6: restart DHCPv6 on receipt of RA containing a new prefix
When the upstream DHCPv6 server does not provide IA_NA or IA_PD options, odhcp6c
enters into stateless mode, which will not be exited from until SIGUSR2 signal
is received.
This change enforces DHCPv6 restart on receipt of a RA that:
a) advertises the presence of DHCPv6 server on the network, containing
either M or O flags
b) has a PI (prefix information) option that contains a new prefix
thus allowing the switch to DHCPv6 stateful mode when RA PI options suggest that
the upstream DHCPv6 server now manages a new prefix.
Restart is useful even when DHCPv6 client is already in stateful mode, so the
DHCPv6 server will be able to refresh the client's IA_NA and IA_PD options
before renewal timeout is triggered, hence avoiding the usage of potentially
deprecated addresses.
Signed-off-by: Alin Nastac <[email protected]>
Signed-off-by: Paul Donald <[email protected]>
Link: https://github.com/openwrt/odhcp6c/pull/119
Signed-off-by: Álvaro Fernández Rojas <[email protected]>