odhcp6c icon indicating copy to clipboard operation
odhcp6c copied to clipboard

restart DHCPv6 transaction on receival of RA who contains a new prefix

Open alinnastac opened this issue 2 years ago • 6 comments

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 avatar May 15 '23 11:05 alinnastac

@alinnastac: Any progress about your PR?

Neustradamus avatar Apr 22 '25 09:04 Neustradamus

@alphix any thoughts on coding style?

systemcrash avatar Oct 08 '25 11:10 systemcrash

@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)

Alphix avatar Oct 08 '25 12:10 Alphix

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.

systemcrash avatar Oct 08 '25 14:10 systemcrash

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

Alphix avatar Oct 08 '25 15:10 Alphix

For information, I have sent an e-mail to @alinnastac yesterday about this PR.

Neustradamus avatar Oct 19 '25 14:10 Neustradamus

@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.

systemcrash avatar Nov 11 '25 19:11 systemcrash

@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 :)

Alphix avatar Nov 12 '25 23:11 Alphix

Superseeded by https://github.com/openwrt/odhcp6c/pull/119

Noltari avatar Nov 13 '25 07:11 Noltari