]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Only drop IPv4 LL addresses if configured to handle them (#464)
authorColin McInnes <colin.mcinnes@vecima.com>
Sat, 22 Feb 2025 13:37:59 +0000 (07:37 -0600)
committerGitHub <noreply@github.com>
Sat, 22 Feb 2025 13:37:59 +0000 (13:37 +0000)
src/dhcp.c

index 3b8f0198ef1dd41aa6d3f78d8a7a7f7d2a45e039..3de4bfce556506aebec8c1f5dcd7b1dfbb180472 100644 (file)
@@ -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