diff options
author | ume <ume@FreeBSD.org> | 2001-08-04 17:10:14 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2001-08-04 17:10:14 +0000 |
commit | 215c0c107efbdc79c1fc7eb07321d5285fc338d2 (patch) | |
tree | 7b7ce4133ecd9652e3448fa7d662f6e27859de96 /sys/netinet6/in6_ifattach.c | |
parent | edba6eee5eb38b18947df183e9a90212979525ed (diff) | |
download | FreeBSD-src-215c0c107efbdc79c1fc7eb07321d5285fc338d2.zip FreeBSD-src-215c0c107efbdc79c1fc7eb07321d5285fc338d2.tar.gz |
When running aplication joined multicast address,
removing network card, and kill aplication.
imo_membership[].inm_ifp refer interface pointer
after removing interface.
When kill aplication, release socket,and imo_membership.
imo_membership use already not exist interface pointer.
Then, kernel panic.
PR: 29345
Submitted by: Inoue Yuichi <inoue@nd.net.fujitsu.co.jp>
Obtained from: KAME
MFC after: 3 days
Diffstat (limited to 'sys/netinet6/in6_ifattach.c')
-rw-r--r-- | sys/netinet6/in6_ifattach.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index 516826d..3e41bd7 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -47,10 +47,12 @@ #include <netinet/in.h> #include <netinet/in_var.h> #include <netinet/if_ether.h> +#include <netinet/in_pcb.h> #include <netinet/ip6.h> #include <netinet6/ip6_var.h> #include <netinet6/in6_var.h> +#include <netinet6/in6_pcb.h> #include <netinet6/in6_ifattach.h> #include <netinet6/ip6_var.h> #include <netinet6/nd6.h> @@ -72,6 +74,9 @@ int ip6_auto_linklocal = 1; /* enable by default */ struct callout in6_tmpaddrtimer_ch; +extern struct inpcbinfo udbinfo; +extern struct inpcbinfo ripcbinfo; + static int get_rand_ifid __P((struct ifnet *, struct in6_addr *)); static int generate_tmp_ifid __P((u_int8_t *, const u_int8_t *, u_int8_t *)); static int get_hw_ifid __P((struct ifnet *, struct in6_addr *)); @@ -942,6 +947,8 @@ in6_ifdetach(ifp) } /* leave from all multicast groups joined */ + in6_pcbpurgeif0(LIST_FIRST(udbinfo.listhead), ifp); + in6_pcbpurgeif0(LIST_FIRST(ripcbinfo.listhead), ifp); for (in6m = LIST_FIRST(&in6_multihead); in6m; in6m = in6m_next) { in6m_next = LIST_NEXT(in6m, in6m_entry); if (in6m->in6m_ifp != ifp) |