]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
sun: Don't define IN_IFF_TENTATIVE or IN_IFF_DETACHED
authorRoy Marples <roy@marples.name>
Thu, 25 Apr 2019 12:04:45 +0000 (12:04 +0000)
committerRoy Marples <roy@marples.name>
Thu, 25 Apr 2019 12:04:45 +0000 (12:04 +0000)
Let's not pretend these exist and adjust existing #ifdefs
to compensate.

src/dhcp.c
src/ipv4.h
src/ipv4ll.c

index e13d1b4b56767f22fc6b2e2a3d241ee8ef5892f5..f24d14f603bd15f3e482b4973a4951e130ae097d 100644 (file)
@@ -2077,7 +2077,7 @@ dhcp_arp_probed(struct arp_state *astate)
            ifp->name, inet_ntoa(astate->addr));
        if (!(ifo->options & DHCPCD_INFORM))
                dhcp_bind(ifp);
-#ifndef IN_IFF_TENTATIVE
+#ifndef IN_IFF_DUPLICATED
        else {
                struct bootp *bootp;
                size_t len;
@@ -2431,7 +2431,7 @@ dhcp_arp_address(struct interface *ifp)
        if (astate == NULL)
                return -1;
 
-#ifdef IN_IFF_TENTATIVE
+#ifdef IN_IFF_NOTUSEABLE
        if (ia == NULL || ia->addr_flags & IN_IFF_NOTUSEABLE) {
                state->state = DHS_PROBE;
                if (ia == NULL) {
index 496b8ecd23a2d743e8c500d479adef98499a1a3e..506d83b5c2a282e094ab93c1649cfdd9ac4baad8 100644 (file)
@@ -62,9 +62,8 @@
     * While it supports DaD, to seems to only expose IFF_DUPLICATE
     * so we have no way of knowing if it's tentative or not.
     * I don't even know if Solaris has any special treatment for tentative. */
-#  define IN_IFF_TENTATIVE     0
 #  define IN_IFF_DUPLICATED    0x02
-#  define IN_IFF_DETACHED      0
+#  define IN_IFF_NOTUSEABLE    IN_IFF_DUPLICATED
 #endif
 
 #ifdef IN_IFF_TENTATIVE
index 51cd4f5b2d169c2f061f71166b4466876b7ea900..29eaf1df2629fdf8e3c45c54d3ed7eeed5adb282 100644 (file)
@@ -232,7 +232,7 @@ static void
 ipv4ll_probe(void *arg)
 {
 
-#ifdef IN_IFF_TENTATIVE
+#ifdef IN_IFF_DUPLICATED
        ipv4ll_probed(arg);
 #else
        arp_probe(arg);
@@ -404,7 +404,7 @@ ipv4ll_start(void *arg)
        if (ia == NULL)
                ia = ipv4_iffindlladdr(ifp);
 
-#ifdef IN_IFF_TENTATIVE
+#ifdef IN_IFF_DUPLICATED
        if (ia != NULL && ia->addr_flags & IN_IFF_DUPLICATED) {
                ipv4_deladdr(ia, 0);
                ia = NULL;
@@ -419,6 +419,8 @@ ipv4ll_start(void *arg)
                            ifp->name, inet_ntoa(ia->addr));
                        return;
                }
+#endif
+#ifdef IN_IFF_DUPLICATED
                loginfox("%s: using IPv4LL address %s", ifp->name, ia->saddr);
 #endif
                ipv4ll_probed(astate);
@@ -429,7 +431,7 @@ ipv4ll_start(void *arg)
        if (state->pickedaddr.s_addr == INADDR_ANY)
                state->pickedaddr.s_addr = ipv4ll_pickaddr(astate);
        astate->addr = state->pickedaddr;
-#ifdef IN_IFF_TENTATIVE
+#ifdef IN_IFF_DUPLICATED
        ipv4ll_probed(astate);
 #else
        arp_probe(astate);