]> git.ipfire.org Git - thirdparty/dhcpcd.git/commit
Respect IPV6_PREFERRED_ONLY flag on DHS_NONE state
authorTaoyu Li <taoyl@google.com>
Tue, 12 Mar 2024 02:38:28 +0000 (11:38 +0900)
committerRoy Marples <roy@marples.name>
Tue, 2 Apr 2024 09:07:39 +0000 (10:07 +0100)
commitfaa3f54eba5dd572946461242039959cd9f723eb
tree118529f43dacde5f98162a44ae4c493c25d1ebcb
parent9f8bb1fc12347d2d52de41fe24ba8c1ac468f134
Respect IPV6_PREFERRED_ONLY flag on DHS_NONE state

Current IPv6_PREFERRED_ONLY (option 108) handling code is only effective
when current state is DHS_DISCOVER and DHS_REBOOT. However, when we
receive multiple ACKs upon our REQUEST, the first ACK will trigger the
use_v6only code path and dhcp_drop() us into DHS_NONE state, as a result
the option 108 on the second ACK won't be handled correctly and we'll
bind to the lease instead.

This patch fixes the issue by adding DHS_NONE as a state to respect
option 108 as well.
src/dhcp.c