From: Roy Marples Date: Fri, 22 Jul 2016 21:01:24 +0000 (+0000) Subject: Match if_address X-Git-Tag: v6.11.2~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8ba305d61b182969a89aa34d0d8d0107f79331c;p=thirdparty%2Fdhcpcd.git Match if_address --- diff --git a/if-sun.c b/if-sun.c index 5f6d5ed8..36ba24c5 100644 --- a/if-sun.c +++ b/if-sun.c @@ -1285,8 +1285,12 @@ if_address6(unsigned char cmd, const struct ipv6_addr *ia) struct sockaddr_in6 *sin6_addr, *sin6_mask; struct priv *priv; + /* Either remove the alias or ensure it exists. */ + if (if_plumb(cmd, ia->iface->ctx, AF_INET, ia->alias) == -1) + return -1; + if (cmd == RTM_DELADDR) - return if_plumb(cmd, ia->iface->ctx, AF_INET6, ia->alias); + return 0; if (cmd != RTM_NEWADDR) { errno = EINVAL;