diff options
| author | Roy Marples <roy@marples.name> | 2019-09-04 04:34:23 +0300 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2019-09-04 04:34:23 +0300 |
| commit | 0b16497865120127396b6506542a5a169c4d2d4e (patch) | |
| tree | f04c62761d9183418dbecac6e50a87ed8d7e76ee /src/ipv6.c | |
| parent | 114f0990f24aa0054ac3d1fb24a2d9fe1307fa16 (diff) | |
| download | dhcpcd-0b16497865120127396b6506542a5a169c4d2d4e.tar.xz | |
Solaris: Sending NA now seems to work!
Diffstat (limited to 'src/ipv6.c')
| -rw-r--r-- | src/ipv6.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -629,7 +629,7 @@ ipv6_addaddr1(struct ipv6_addr *ia, const struct timespec *now) uint32_t pltime, vltime; __printflike(1, 2) void (*logfunc)(const char *, ...); #ifdef ND6_ADVERTISE - bool vltime_was_zero; + bool vltime_was_zero = ia->prefix_vltime == 0; #endif #ifdef __sun struct ipv6_state *state; @@ -641,7 +641,11 @@ ipv6_addaddr1(struct ipv6_addr *ia, const struct timespec *now) if (ia->flags & IPV6_AF_DADCOMPLETED) { logdebugx("%s: IP address %s already exists", ia->iface->name, ia->saddr); +#ifdef ND6_ADVERTISE + goto advertise; +#else return 0; +#endif } #endif @@ -707,9 +711,6 @@ ipv6_addaddr1(struct ipv6_addr *ia, const struct timespec *now) " seconds", ifp->name, ia->prefix_pltime, ia->prefix_vltime); -#ifdef ND6_ADVERTISE - vltime_was_zero = ia->prefix_vltime == 0; -#endif if (if_address6(RTM_NEWADDR, ia) == -1) { logerr(__func__); /* Restore real pltime and vltime */ @@ -774,6 +775,7 @@ ipv6_addaddr1(struct ipv6_addr *ia, const struct timespec *now) #endif #ifdef ND6_ADVERTISE +advertise: /* Re-advertise the preferred address to be safe. */ if (!vltime_was_zero) ipv6nd_advertise(ia); |
