diff options
author | qingli <qingli@FreeBSD.org> | 2011-10-05 16:27:11 +0000 |
---|---|---|
committer | qingli <qingli@FreeBSD.org> | 2011-10-05 16:27:11 +0000 |
commit | d9f932fe21c5bbfac0e824f26de1265d4f60f020 (patch) | |
tree | 49a265b52233ee17f927ad9dfc494dc7ecdd4d0f /sys/netinet6 | |
parent | 1448b25b0d172e1ba1ee2b75fb8e3a0e63babbdd (diff) | |
download | FreeBSD-src-d9f932fe21c5bbfac0e824f26de1265d4f60f020.zip FreeBSD-src-d9f932fe21c5bbfac0e824f26de1265d4f60f020.tar.gz |
The IFA_RTSELF instead of the IFA_ROUTE flag should be checked to
determine if a loopback route should be installed for an interface
IPv6 address. Another condition is the address must not belong to a
looopback interface.
Reviewed by: hrs
MFC after: 3 days
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/in6.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 9bf7a8f..5e1c078 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1810,9 +1810,9 @@ in6_ifinit(struct ifnet *ifp, struct in6_ifaddr *ia, /* * add a loopback route to self */ - if (!(ia->ia_flags & IFA_ROUTE) + if (!(ia->ia_flags & IFA_RTSELF) && (V_nd6_useloopback - || (ifp->if_flags & IFF_LOOPBACK))) { + && !(ifp->if_flags & IFF_LOOPBACK))) { error = ifa_add_loopback_route((struct ifaddr *)ia, (struct sockaddr *)&ia->ia_addr); if (error == 0) |