restart DHCPv6 transaction on receival of RA who contains a new prefix
When upstream DHCPv6 server does not provide IA_NA or IA_PD options, odhcp6c enters in stateless mode, which will not be exited from until SIGUSR2 signal is received.
This change enforce DHCPv6 transaction restart on receival of a RA that: a) advertise the presence of DHCPv6 server in the network, either by containing 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 upstream DHCPv6 server now manages a new prefix.
Transaction restart is useful even when DHCPv6 client is already in stateful mode, so DHCPv6 server will be able to refresh client's IA_NA and IA_PD options before renewal timeout is triggered, hence avoiding usage of potentially deprecated addresses.
@alinnastac: Any progress about your PR?
@alphix any thoughts on coding style?
@Alphix any thoughts on coding style?
@systemcrash Other than what I pointed out above, looks good to me (obvs. haven't tested it or dug deep into the code to see if it appears to do the right thing)
I don't think we will hear more from @alinnastac so we could at least merge this and improve upon it later down the road.
I don't think we will hear more from @alinnastac so we could at least merge this and improve upon it later down the road.
Yeah
For information, I have sent an e-mail to @alinnastac yesterday about this PR.
@Alphix if you want I'll chaperone this in as a new PR so we can make amendments since alinnastac is out of the picture.
Half of it is implicitly handled by the prpl patch-set, and the RA behaviour is trivial to verify.
@Alphix if you want I'll chaperone this in as a new PR so we can make amendments since alinnastac is out of the picture.
You know the odhcp6c codebase better than me, but there's nothing in this PR that looks obviously incorrect and @alinnastac has produced good stuff in the past, so....go ahead :)
Superseeded by https://github.com/openwrt/odhcp6c/pull/119