summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2015-06-05 07:23:32 +0000
committerae <ae@FreeBSD.org>2015-06-05 07:23:32 +0000
commit200ce7d83609576bee49855a6c2967c380f9052b (patch)
treee38e8a2e1eaa019de44507fa829d5381d4b7ccda /sys/netinet6
parent8707ccbe035f3ab6a96b2f85dd98050e3d57733d (diff)
downloadFreeBSD-src-200ce7d83609576bee49855a6c2967c380f9052b.zip
FreeBSD-src-200ce7d83609576bee49855a6c2967c380f9052b.tar.gz
Rework r281868 to not skip RTM announces for tunneling interfaces.
This is direct commit to stable/10. Tested by: tuexen@
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/in6.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 9a5a6ed..db1db84 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -155,29 +155,28 @@ in6_ifaddloop(struct ifaddr *ifa)
ia = ifa2ia6(ifa);
ifp = ifa->ifa_ifp;
- if (nd6_need_cache(ifp) == 0)
- return;
- IF_AFDATA_LOCK(ifp);
- ifa->ifa_rtrequest = nd6_rtrequest;
- ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR |
- LLE_EXCLUSIVE), (struct sockaddr *)&ia->ia_addr);
- IF_AFDATA_UNLOCK(ifp);
- if (ln != NULL) {
- ln->la_expire = 0; /* for IPv6 this means permanent */
- ln->ln_state = ND6_LLINFO_REACHABLE;
- /*
- * initialize for rtmsg generation
- */
- bzero(&gateway, sizeof(gateway));
- gateway.sdl_len = sizeof(gateway);
- 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);
+ /*
+ * initialize for rtmsg generation
+ */
+ bzero(&gateway, sizeof(gateway));
+ gateway.sdl_len = sizeof(gateway);
+ gateway.sdl_family = AF_LINK;
+ if (nd6_need_cache(ifp) != 0) {
+ IF_AFDATA_LOCK(ifp);
+ ifa->ifa_rtrequest = nd6_rtrequest;
+ ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR |
+ LLE_EXCLUSIVE), (struct sockaddr *)&ia->ia_addr);
+ IF_AFDATA_UNLOCK(ifp);
+ if (ln != NULL) {
+ ln->la_expire = 0; /* for IPv6 this means permanent */
+ ln->ln_state = ND6_LLINFO_REACHABLE;
+
+ gateway.sdl_alen = 6;
+ memcpy(gateway.sdl_data, &ln->ll_addr.mac_aligned,
+ sizeof(ln->ll_addr));
+ LLE_WUNLOCK(ln);
+ }
}
-
bzero(&rt, sizeof(rt));
rt.rt_gateway = (struct sockaddr *)&gateway;
memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask));
OpenPOWER on IntegriCloud