]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP: Don't exit on static DaD failure if master or using IPv6.
authorRoy Marples <roy@marples.name>
Wed, 2 Oct 2019 16:06:18 +0000 (17:06 +0100)
committerRoy Marples <roy@marples.name>
Wed, 2 Oct 2019 16:06:18 +0000 (17:06 +0100)
As RA and DHCPv6 work fine too.

src/dhcp.c

index fd4ee9f428f23e9a688c2bc66847279367905475..76ead6dcfc83c746247962cad552a6b63393a93e 100644 (file)
@@ -2043,7 +2043,8 @@ dhcp_addr_duplicated(struct interface *ifp, struct in_addr *ia)
        if (opts & (DHCPCD_STATIC | DHCPCD_INFORM)) {
                state->reason = "EXPIRE";
                script_runreason(ifp, state->reason);
-               if (!(ctx->options & DHCPCD_MASTER))
+#define NOT_ONLY_SELF (DHCPCD_MASTER | DHCPCD_IPV6RS | DHCPCD_DHCP6)
+               if (!(ctx->options & NOT_ONLY_SELF))
                        eloop_exit(ifp->ctx->eloop, EXIT_FAILURE);
                return deleted;
        }