diff options
| author | Roy Marples <roy@marples.name> | 2019-04-25 12:04:45 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2019-04-25 12:04:45 +0000 |
| commit | e7313fa747543c551b48f98b1f31a54945b0b38a (patch) | |
| tree | 784da04549621cfd0bfef13f6acda49ff69cd54a | |
| parent | b995aecb8dcfedae41c81a637e97411b179203ff (diff) | |
| download | dhcpcd-e7313fa747543c551b48f98b1f31a54945b0b38a.tar.xz | |
sun: Don't define IN_IFF_TENTATIVE or IN_IFF_DETACHED
Let's not pretend these exist and adjust existing #ifdefs
to compensate.
| -rw-r--r-- | src/dhcp.c | 4 | ||||
| -rw-r--r-- | src/ipv4.h | 3 | ||||
| -rw-r--r-- | src/ipv4ll.c | 8 |
3 files changed, 8 insertions, 7 deletions
@@ -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) { @@ -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 diff --git a/src/ipv4ll.c b/src/ipv4ll.c index 51cd4f5b..29eaf1df 100644 --- a/src/ipv4ll.c +++ b/src/ipv4ll.c @@ -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); |
