mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
netlink: call IPv6 hook when adding IPv4 addresses.
This provides compatibility with ifioctl() version of SIOCAIFADDR. This change is temporary until the IPv4/IPv6 address handling code is moved to netinet[6].
This commit is contained in:
parent
e3f7081b1c
commit
050815ae7f
|
@ -1155,7 +1155,12 @@ handle_newaddr_inet(struct nlmsghdr *hdr, struct nl_parsed_ifa *attrs,
|
|||
if (attrs->ifa_dst != NULL)
|
||||
req.ifra_dstaddr = *((struct sockaddr_in *)attrs->ifa_dst);
|
||||
|
||||
return (in_control(NULL, SIOCAIFADDR, &req, ifp, curthread));
|
||||
int error = in_control(NULL, SIOCAIFADDR, &req, ifp, curthread);
|
||||
#ifdef INET6
|
||||
if (error == 0 && !(if_flags & IFF_UP) && (if_getflags(ifp) & IFF_UP))
|
||||
in6_if_up(ifp);
|
||||
#endif
|
||||
return (error);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Reference in a new issue