diff options
| author | Qing Li <qingli@FreeBSD.org> | 2011-10-17 03:35:24 +0000 |
|---|---|---|
| committer | Qing Li <qingli@FreeBSD.org> | 2011-10-17 03:35:24 +0000 |
| commit | 2b0521092eac4d6829a42b03270a14f8105e725e (patch) | |
| tree | c6812bd729ef205a6b29712547b3de2ec979eee2 /sys/netinet6 | |
| parent | 30211bfc373cdbe680b6df6cf356eefb7185e933 (diff) | |
Notes
Diffstat (limited to 'sys/netinet6')
| -rw-r--r-- | sys/netinet6/in6.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 5e1c07884918..04a3bf09df62 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1805,14 +1805,17 @@ in6_ifinit(struct ifnet *ifp, struct in6_ifaddr *ia, if (error != 0) return (error); ia->ia_flags |= IFA_ROUTE; + /* + * Handle the case for ::1 . + */ + if (ifp->if_flags & IFF_LOOPBACK) + ia->ia_flags |= IFA_RTSELF; } /* * add a loopback route to self */ - if (!(ia->ia_flags & IFA_RTSELF) - && (V_nd6_useloopback - && !(ifp->if_flags & IFF_LOOPBACK))) { + if (!(ia->ia_flags & IFA_RTSELF) && V_nd6_useloopback) { error = ifa_add_loopback_route((struct ifaddr *)ia, (struct sockaddr *)&ia->ia_addr); if (error == 0) |
