summaryrefslogtreecommitdiffstats
path: root/ipv6nd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-07-26 20:52:31 +0000
committerRoy Marples <roy@marples.name>2016-07-26 20:52:31 +0000
commite83c4813f3eadaf21b58a59378fc5b90886f2010 (patch)
tree3e44c3743fddb26114f07583b7217274989a91d9 /ipv6nd.c
parent2cac4f87c91b594dbc710e3caf736f683adcf12d (diff)
downloaddhcpcd-e83c4813f3eadaf21b58a59378fc5b90886f2010.tar.xz
Simplify handling of IPv6 address from kernel messages, similar to IPv4.
While here, drop the flags argument from the ifa routines. Instead, grab it in the main ifa handler - it was only for IPv6 addresses in Linux anyway.
Diffstat (limited to 'ipv6nd.c')
-rw-r--r--ipv6nd.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/ipv6nd.c b/ipv6nd.c
index b0b65629..95eda6b2 100644
--- a/ipv6nd.c
+++ b/ipv6nd.c
@@ -1306,17 +1306,14 @@ ipv6nd_env(char **env, const char *prefix, const struct interface *ifp)
}
void
-ipv6nd_handleifa(struct dhcpcd_ctx *ctx, int cmd, const char *ifname,
- const struct in6_addr *addr, int flags)
+ipv6nd_handleifa(int cmd, struct ipv6_addr *addr)
{
struct ra *rap;
- if (ctx->ipv6 == NULL)
- return;
- TAILQ_FOREACH(rap, ctx->ipv6->ra_routers, next) {
- if (strcmp(rap->iface->name, ifname))
+ TAILQ_FOREACH(rap, addr->iface->ctx->ipv6->ra_routers, next) {
+ if (rap->iface != addr->iface)
continue;
- ipv6_handleifa_addrs(cmd, &rap->addrs, addr, flags);
+ ipv6_handleifa_addrs(cmd, &rap->addrs, addr);
}
}