Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 ifidex2ifnet could contain NULL after if_detach...
details: https://anonhg.NetBSD.org/src/rev/6f157064ce06
branches: trunk
changeset: 513153:6f157064ce06
user: itojun <itojun%NetBSD.org@localhost>
date: Wed Jul 25 06:59:51 2001 +0000
description:
ifidex2ifnet could contain NULL after if_detach(). sync with kame
diffstat:
sys/netinet6/in6.c | 4 +++-
sys/netinet6/nd6.c | 6 +++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diffs (38 lines):
diff -r dcf6efed506d -r 6f157064ce06 sys/netinet6/in6.c
--- a/sys/netinet6/in6.c Wed Jul 25 06:05:16 2001 +0000
+++ b/sys/netinet6/in6.c Wed Jul 25 06:59:51 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in6.c,v 1.46 2001/07/18 13:12:27 itojun Exp $ */
+/* $NetBSD: in6.c,v 1.47 2001/07/25 06:59:51 itojun Exp $ */
/* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */
/*
@@ -267,6 +267,8 @@
if (idx < 0 || if_index < idx)
return -1;
ifp = ifindex2ifnet[idx];
+ if (!ifp)
+ return -1;
for (ifa = ifp->if_addrlist.tqh_first; ifa; ifa = ifa->ifa_list.tqe_next)
{
diff -r dcf6efed506d -r 6f157064ce06 sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c Wed Jul 25 06:05:16 2001 +0000
+++ b/sys/netinet6/nd6.c Wed Jul 25 06:59:51 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nd6.c,v 1.50 2001/07/20 20:26:35 itojun Exp $ */
+/* $NetBSD: nd6.c,v 1.51 2001/07/25 06:59:52 itojun Exp $ */
/* $KAME: nd6.c,v 1.151 2001/06/19 14:24:41 sumikawa Exp $ */
/*
@@ -183,6 +183,10 @@
if (ND.basereachable)
return;
+#ifdef DIAGNOSTIC
+ if (!ifindex2ifnet[ifp->if_index])
+ panic("nd6_ifattach: ifindex2ifnet is NULL");
+#endif
ND.linkmtu = ifindex2ifnet[ifp->if_index]->if_mtu;
ND.chlim = IPV6_DEFHLIM;
ND.basereachable = REACHABLE_TIME;
Home |
Main Index |
Thread Index |
Old Index