Rework r281868 to not skip RTM announces for tunneling interfaces.
This is direct commit to stable/10. Tested by: tuexen@
This commit is contained in:
parent
8707ccbe03
commit
200ce7d836
@ -155,29 +155,28 @@ in6_ifaddloop(struct ifaddr *ifa)
|
|||||||
|
|
||||||
ia = ifa2ia6(ifa);
|
ia = ifa2ia6(ifa);
|
||||||
ifp = ifa->ifa_ifp;
|
ifp = ifa->ifa_ifp;
|
||||||
if (nd6_need_cache(ifp) == 0)
|
/*
|
||||||
return;
|
* initialize for rtmsg generation
|
||||||
IF_AFDATA_LOCK(ifp);
|
*/
|
||||||
ifa->ifa_rtrequest = nd6_rtrequest;
|
bzero(&gateway, sizeof(gateway));
|
||||||
ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR |
|
gateway.sdl_len = sizeof(gateway);
|
||||||
LLE_EXCLUSIVE), (struct sockaddr *)&ia->ia_addr);
|
gateway.sdl_family = AF_LINK;
|
||||||
IF_AFDATA_UNLOCK(ifp);
|
if (nd6_need_cache(ifp) != 0) {
|
||||||
if (ln != NULL) {
|
IF_AFDATA_LOCK(ifp);
|
||||||
ln->la_expire = 0; /* for IPv6 this means permanent */
|
ifa->ifa_rtrequest = nd6_rtrequest;
|
||||||
ln->ln_state = ND6_LLINFO_REACHABLE;
|
ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR |
|
||||||
/*
|
LLE_EXCLUSIVE), (struct sockaddr *)&ia->ia_addr);
|
||||||
* initialize for rtmsg generation
|
IF_AFDATA_UNLOCK(ifp);
|
||||||
*/
|
if (ln != NULL) {
|
||||||
bzero(&gateway, sizeof(gateway));
|
ln->la_expire = 0; /* for IPv6 this means permanent */
|
||||||
gateway.sdl_len = sizeof(gateway);
|
ln->ln_state = ND6_LLINFO_REACHABLE;
|
||||||
gateway.sdl_family = AF_LINK;
|
|
||||||
gateway.sdl_nlen = 0;
|
|
||||||
gateway.sdl_alen = 6;
|
|
||||||
memcpy(gateway.sdl_data, &ln->ll_addr.mac_aligned,
|
|
||||||
sizeof(ln->ll_addr));
|
|
||||||
LLE_WUNLOCK(ln);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
gateway.sdl_alen = 6;
|
||||||
|
memcpy(gateway.sdl_data, &ln->ll_addr.mac_aligned,
|
||||||
|
sizeof(ln->ll_addr));
|
||||||
|
LLE_WUNLOCK(ln);
|
||||||
|
}
|
||||||
|
}
|
||||||
bzero(&rt, sizeof(rt));
|
bzero(&rt, sizeof(rt));
|
||||||
rt.rt_gateway = (struct sockaddr *)&gateway;
|
rt.rt_gateway = (struct sockaddr *)&gateway;
|
||||||
memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask));
|
memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user