From 80bb90314c85a31d554f094801cf75aaddb03c5a Mon Sep 17 00:00:00 2001 From: Colin McInnes Date: Thu, 13 Feb 2025 21:24:41 -0600 Subject: [PATCH] Only drop IPv4 LL addresses if configured to handle them --- src/dhcp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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