From: Colin McInnes Date: Sat, 22 Feb 2025 13:37:59 +0000 (-0600) Subject: Only drop IPv4 LL addresses if configured to handle them (#464) X-Git-Tag: v10.2.1~4 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=0a38e02a894af79c6f5cdc1ede0c2cc6184dca59;p=thirdparty%2Fdhcpcd.git Only drop IPv4 LL addresses if configured to handle them (#464) --- diff --git a/src/dhcp.c b/src/dhcp.c index 3b8f0198..3de4bfce 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -2170,7 +2170,8 @@ dhcp_finish_dad(struct interface *ifp, struct in_addr *ia) #ifdef IPV4LL /* Stop IPv4LL now we have a working DHCP address */ - if (!IN_LINKLOCAL(ntohl(ia->s_addr))) + if ((!IN_LINKLOCAL(ntohl(ia->s_addr))) + && (ifp->options->options & DHCPCD_IPV4LL)) ipv4ll_drop(ifp); #endif @@ -3329,7 +3330,8 @@ dhcp_handledhcp(struct interface *ifp, struct bootp *bootp, size_t bootp_len, switch (tmp) { case 0: LOGDHCP(LOG_WARNING, "IPv4LL disabled from"); - ipv4ll_drop(ifp); + if (ifp->options->options & DHCPCD_IPV4LL) + ipv4ll_drop(ifp); #ifdef ARP arp_drop(ifp); #endif