diff options
| author | Qing Li <qingli@FreeBSD.org> | 2009-09-05 20:35:18 +0000 |
|---|---|---|
| committer | Qing Li <qingli@FreeBSD.org> | 2009-09-05 20:35:18 +0000 |
| commit | 69406c163245c81c31f74ddc9442b122aff522cd (patch) | |
| tree | 351f7cf79b98b23c9b4c4747ce2a9bc4a8e437fa /sys/netinet6 | |
| parent | 3d2a8d364d9f966b48815cca11b4629fe80c4ee2 (diff) | |
Notes
Diffstat (limited to 'sys/netinet6')
| -rw-r--r-- | sys/netinet6/in6.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 9521e8e7a5e6..c832305b1622 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1192,9 +1192,10 @@ in6_purgeaddr(struct ifaddr *ifa) /* * Remove the loopback route to the interface address. - * The check for the current setting of "nd6_useloopback" is not needed. + * The check for the current setting of "nd6_useloopback" + * is not needed. */ - if (!(ia->ia_ifp->if_flags & IFF_LOOPBACK)) { + { struct rt_addrinfo info; struct sockaddr_dl null_sdl; @@ -1767,7 +1768,9 @@ in6_ifinit(struct ifnet *ifp, struct in6_ifaddr *ia, /* * add a loopback route to self */ - if (V_nd6_useloopback && !(ifp->if_flags & IFF_LOOPBACK)) { + if (!(ia->ia_flags & IFA_ROUTE) + && (V_nd6_useloopback + || (ifp->if_flags & IFF_LOOPBACK))) { struct rt_addrinfo info; struct rtentry *rt = NULL; static struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK}; @@ -1788,7 +1791,7 @@ in6_ifinit(struct ifnet *ifp, struct in6_ifaddr *ia, RT_REMREF(rt); RT_UNLOCK(rt); } else if (error != 0) - log(LOG_INFO, "in6_ifinit: insertion failed\n"); + log(LOG_INFO, "in6_ifinit: error = %d, insertion failed\n", error); } /* Add ownaddr as loopback rtentry, if necessary (ex. on p2p link). */ |
