summaryrefslogtreecommitdiffstats
path: root/ipv6.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-09-16 15:49:01 +0000
committerRoy Marples <roy@marples.name>2016-09-16 15:49:01 +0000
commitb0601fe4165e342848c344faf2e08720db5fa271 (patch)
tree35a23064feb1fe237cbc934fa2f0cf55c0e8f0b3 /ipv6.c
parentba13abcc97a2f606a2d7ea85832cd90e7a3cad06 (diff)
downloaddhcpcd-b0601fe4165e342848c344faf2e08720db5fa271.tar.xz
One BSD in the future will include address flags in ifa_msghdr.
A libc in the future will include address flags in ifaddrs. Although this does make the code a bit more #ifdef messy, the end result is a smaller binary, and less ioctls to make.
Diffstat (limited to 'ipv6.c')
-rw-r--r--ipv6.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/ipv6.c b/ipv6.c
index 61bc3c63..a49cffd0 100644
--- a/ipv6.c
+++ b/ipv6.c
@@ -1060,13 +1060,12 @@ ipv6_getstate(struct interface *ifp)
void
ipv6_handleifa(struct dhcpcd_ctx *ctx,
int cmd, struct if_head *ifs, const char *ifname,
- const struct in6_addr *addr, uint8_t prefix_len)
+ const struct in6_addr *addr, uint8_t prefix_len, int addrflags)
{
struct interface *ifp;
struct ipv6_state *state;
struct ipv6_addr *ia;
struct ll_callback *cb;
- int flags;
#if 0
char dbuf[INET6_ADDRSTRLEN];
@@ -1148,15 +1147,7 @@ ipv6_handleifa(struct dhcpcd_ctx *ctx,
ia->acquired = ia->created;
TAILQ_INSERT_TAIL(&state->addrs, ia, next);
}
- flags = if_addrflags6(ia);
- if (flags == -1) {
- if (errno != EADDRNOTAVAIL)
- logger(ia->iface->ctx, LOG_ERR,
- "%s: %s: if_addrflags6: %m",
- ia->iface->name, ia->saddr);
- return;
- }
- ia->addr_flags = flags;
+ ia->addr_flags = addrflags;
#ifdef IPV6_MANAGETEMPADDR
if (ia->addr_flags & IN6_IFF_TEMPORARY)
ia->flags |= IPV6_AF_TEMPORARY;