aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet6/in6.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6/in6.c')
-rw-r--r--sys/netinet6/in6.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index b0b25854027f..9521e8e7a5e6 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1201,8 +1201,8 @@ in6_purgeaddr(struct ifaddr *ifa)
bzero(&null_sdl, sizeof(null_sdl));
null_sdl.sdl_len = sizeof(null_sdl);
null_sdl.sdl_family = AF_LINK;
- null_sdl.sdl_type = V_loif->if_type;
- null_sdl.sdl_index = V_loif->if_index;
+ null_sdl.sdl_type = ia->ia_ifp->if_type;
+ null_sdl.sdl_index = ia->ia_ifp->if_index;
bzero(&info, sizeof(info));
info.rti_flags = ia->ia_flags | RTF_HOST | RTF_STATIC;
info.rti_info[RTAX_DST] = (struct sockaddr *)&ia->ia_addr;
@@ -1782,9 +1782,9 @@ in6_ifinit(struct ifnet *ifp, struct in6_ifaddr *ia,
if (error == 0 && rt != NULL) {
RT_LOCK(rt);
((struct sockaddr_dl *)rt->rt_gateway)->sdl_type =
- rt->rt_ifp->if_type;
+ ifp->if_type;
((struct sockaddr_dl *)rt->rt_gateway)->sdl_index =
- rt->rt_ifp->if_index;
+ ifp->if_index;
RT_REMREF(rt);
RT_UNLOCK(rt);
} else if (error != 0)
@@ -2495,6 +2495,9 @@ in6_lltable_dump(struct lltable *llt, struct sysctl_req *wr)
} ndpc;
int i, error;
+ if (ifp->if_flags & IFF_LOOPBACK)
+ return 0;
+
LLTABLE_LOCK_ASSERT();
error = 0;