}
}
}
+#else
+ UNUSED(cmd);
+ UNUSED(ifp);
+ UNUSED(addr);
+ UNUSED(flags);
#endif
}
state->offer = read_lease(ifp);
/* Check the saved lease matches the type we want */
if (state->offer) {
- struct ipv4_addr *ia;
+#ifdef IN_IFF_DUPLICATED
struct in_addr addr;
+ struct ipv4_addr *ia;
addr.s_addr = state->offer->yiaddr;
ia = ipv4_iffindaddr(ifp, &addr, NULL);
+#endif
+
if ((IS_BOOTP(ifp, state->offer) &&
!(ifo->options & DHCPCD_BOOTP)) ||
#ifdef IN_IFF_DUPLICATED
rta = RTA_NEXT(rta, len);
}
ipv4_handleifa(ctx, nlm->nlmsg_type, NULL, ifp->name,
- &addr, &net, &dest);
+ &addr, &net, &dest, ifa->ifa_flags);
break;
#endif
#ifdef INET6
for (ifa = ifaddrs; ifa; ifa = ifa->ifa_next) {
if (ifa->ifa_addr == NULL)
continue;
+ if ((ifp = if_find(ifs, ifa->ifa_name)) == NULL)
+ continue;
switch(ifa->ifa_addr->sa_family) {
#ifdef INET
case AF_INET:
#endif
#ifdef INET6
case AF_INET6:
- TAILQ_FOREACH(ifp, ifs, next) {
- if (strcmp(ifp->name, ifa->ifa_name) == 0)
- break;
- }
- if (ifp == NULL)
- break; /* Should be impossible */
sin6 = (struct sockaddr_in6 *)(void *)ifa->ifa_addr;
net6 = (struct sockaddr_in6 *)(void *)ifa->ifa_netmask;
#ifdef __KAME__