As noted in https://github.com/openwrt/openwrt/issues/21048, if the
ipv6_only_preferred option isn't set (or is set to zero), odhcpd will
still include the IPv6-Only Preferred option (with a zero value) in
DHCPv4 replies, while it should not return the option at all.
Closes: https://github.com/openwrt/openwrt/issues/21048
Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/341
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
break;
case DHCPV4_OPT_IPV6_ONLY_PREFERRED:
- iov[IOV_IPV6_ONLY_PREF].iov_len = sizeof(reply_ipv6_only);
+ if (iface->dhcpv4_v6only_wait)
+ iov[IOV_IPV6_ONLY_PREF].iov_len = sizeof(reply_ipv6_only);
break;
case DHCPV4_OPT_CAPTIVE_PORTAL: