From dan@kulesh.obluda.cz  Sat Jul  2 02:39:05 2005
Return-Path: <dan@kulesh.obluda.cz>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id B8A7016A41C
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  2 Jul 2005 02:39:05 +0000 (GMT)
	(envelope-from dan@kulesh.obluda.cz)
Received: from kulesh.obluda.cz (kulesh.obluda.cz [193.179.22.243])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8698343D49
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  2 Jul 2005 02:39:04 +0000 (GMT)
	(envelope-from dan@kulesh.obluda.cz)
Received: from kulesh.obluda.cz (localhost.eunet.cz [127.0.0.1])
	by kulesh.obluda.cz (8.13.3/8.13.3) with ESMTP id j622d1Rh000810
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 2 Jul 2005 04:39:02 +0200 (CEST)
	(envelope-from dan@kulesh.obluda.cz)
Received: (from root@localhost)
	by kulesh.obluda.cz (8.13.3/8.13.1/Submit) id j622d1f9000809;
	Sat, 2 Jul 2005 04:39:01 +0200 (CEST)
	(envelope-from dan)
Message-Id: <200507020239.j622d1f9000809@kulesh.obluda.cz>
Date: Sat, 2 Jul 2005 04:39:01 +0200 (CEST)
From: Dan Lukes <dan@obluda.cz>
Reply-To: Dan Lukes <dan@obluda.cz>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [ PATCH ] ip_mroute abends kernel when interface detached
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         82882
>Category:       kern
>Synopsis:       [patch] ip_mroute abends kernel when interface detached
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bms
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 02 02:40:14 GMT 2005
>Closed-Date:    Sat Oct 07 10:45:15 GMT 2006
>Last-Modified:  Sat Oct  7 10:50:22 GMT 2006
>Originator:     Dan Lukes
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
Obludarium
>Environment:
System: FreeBSD 5.4-STABLE i386
src/sys/netinet/ip_mroute.c,v 1.106.2.3 2004/10/09 15:12:04 rwatson

>Description:
	MROUTE code didn't care about interface deletion. It's maintain it's
own copy of ifp within it's table. Using it copy after interface detached
may cause kernel abend or other malfunction.

>How-To-Repeat:
	ifconfig vlan666 create
	ifconfig vlan666 127.0.0.5/32 vlan 666 vlandev <a parent interface>
	run a mroute daemon which add vlan666 as vif to kernel
	ifconfig vlan666 destroy
	now shutdown the mrouted - kernel abend during MRT_DEL_VIF (or MRT_DONE)

>Fix:

	ip_mroute should monitor if_detach interface event invoked by if.c:if_detach()
	It should delete delte destryed interface from it's tables

--- ip_mroute.patch begins here ---
--- sys/netinet/ip_mroute.c.ORIG	Tue Nov 30 14:58:31 2004
+++ sys/netinet/ip_mroute.c	Sat Jul  2 04:11:13 2005
@@ -124,6 +124,8 @@
 
 static u_char		nexpire[MFCTBLSIZ];
 
+static eventhandler_tag if_detach_event_tag = NULL;
+
 static struct callout expire_upcalls_ch;
 
 #define		EXPIRE_TIMEOUT	(hz / 4)	/* 4x / second		*/
@@ -268,8 +270,10 @@
 
 static int get_sg_cnt(struct sioc_sg_req *);
 static int get_vif_cnt(struct sioc_vif_req *);
+static void if_detached_event(void *arg __unused, struct ifnet *);
 static int ip_mrouter_init(struct socket *, int);
 static int add_vif(struct vifctl *);
+static int del_vif_locked(vifi_t);
 static int del_vif(vifi_t);
 static int add_mfc(struct mfcctl2 *);
 static int del_mfc(struct mfcctl2 *);
@@ -619,6 +623,29 @@
 
 static struct mtx mrouter_mtx;		/* used to synch init/done work */
 
+static void
+if_detached_event(void *arg __unused, struct ifnet *ifp)
+{
+    vifi_t vifi;
+
+    mtx_lock(&mrouter_mtx);
+
+    if (ip_mrouter == NULL) {
+	mtx_unlock(&mrouter_mtx);
+    }
+
+    VIF_LOCK();
+    /*
+     * For each phyint in use, disable promiscuous reception of all IP
+     * multicasts.
+     */
+    for (vifi = 0; vifi < numvifs; vifi++)
+	if (viftable[vifi].v_ifp == ifp)
+	    del_vif_locked(vifi);
+    VIF_UNLOCK();
+    mtx_unlock(&mrouter_mtx);
+}
+                        
 /*
  * Enable multicast routing
  */
@@ -642,6 +669,11 @@
 	return EADDRINUSE;
     }
 
+    if_detach_event_tag = EVENTHANDLER_REGISTER(ifnet_departure_event, 
+        if_detached_event, NULL, EVENTHANDLER_PRI_ANY);
+    if (if_detach_event_tag == NULL)
+	return (ENOMEM);
+
     callout_reset(&expire_upcalls_ch, EXPIRE_TIMEOUT, expire_upcalls, NULL);
 
     callout_reset(&bw_upcalls_ch, BW_UPCALLS_PERIOD,
@@ -716,6 +748,7 @@
     numvifs = 0;
     pim_assert = 0;
     VIF_UNLOCK();
+    EVENTHANDLER_DEREGISTER(ifnet_departure_event, if_detach_event_tag);
 
     /*
      * Free all multicast forwarding cache entries.
@@ -1050,19 +1083,17 @@
  * Delete a vif from the vif table
  */
 static int
-del_vif(vifi_t vifi)
+del_vif_locked(vifi_t vifi)
 {
     struct vif *vifp;
 
-    VIF_LOCK();
+    VIF_LOCK_ASSERT();
 
     if (vifi >= numvifs) {
-	VIF_UNLOCK();
 	return EINVAL;
     }
     vifp = &viftable[vifi];
     if (vifp->v_lcl_addr.s_addr == INADDR_ANY) {
-	VIF_UNLOCK();
 	return EADDRNOTAVAIL;
     }
 
@@ -1101,9 +1132,19 @@
 	    break;
     numvifs = vifi;
 
+    return 0;
+}
+
+static int
+del_vif(vifi_t vifi)
+{
+    int cc;
+
+    VIF_LOCK();
+    cc = del_vif_locked(vifi);
     VIF_UNLOCK();
 
-    return 0;
+    return cc;
 }
 
 /*
--- ip_mroute.patch ends here ---


>Release-Note:
>Audit-Trail:

From: Dan Lukes <dan@obluda.cz>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: i386/82882: [ PATCH ] ip_mroute abends kernel when interface
 detached
Date: Sat, 02 Jul 2005 10:40:41 +0200

 	I'm sorry, the category for this PR should be 'kern', not 'i386'
 
 						Dan
 
Responsible-Changed-From-To: freebsd-i386->yar 
Responsible-Changed-By: yar 
Responsible-Changed-When: Sat Jul 2 10:27:54 GMT 2005 
Responsible-Changed-Why:  
Over to me. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=82882 

From: Dan Lukes <dan@obluda.cz>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/82882: [ PATCH ] ip_mroute abends kernel when interface
 detached
Date: Sun, 03 Jul 2005 09:55:53 +0200

 	One more problem ?
 
 	mfctable[i].mfc_stall contain chain of rte. rte->ifp also caches 
 reference to (posible destroyed) interface.
 
 	We should remove those records also as part of if_detached_event() 
 work. Isn't it ?
 
 					Dan
 
 
 -- 
 Dan Lukes                                   SISAL MFF UK
 AKA: dan@obluda.cz, dan@freebsd.cz,dan@kolej.mff.cuni.cz

From: "Yar Tikhiy" <yar@comp.chem.msu.su>
To: <bug-followup@FreeBSD.org>,
	<dan@obluda.cz>
Cc:  
Subject: Re: kern/82882: [ PATCH ] ip_mroute abends kernel when interface detached
Date: Wed, 31 Aug 2005 18:42:27 +0400

 I've found out that this problem is known and on the to-do list of our
 networking gurus.
 
 For reference, here's the current list of PR's related to the issue of IP
 multicast and interfaces:
 
 PR kern/77665
 PR kern/78227
 PR kern/82882
 
 They are not duplicate though, so I'll keep this PR open for now and
 update its status accordingly.

From: Bruce M Simpson <bms@incunabulum.net>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/82882: [patch] ip_mroute abends kernel when interface detached
Date: Mon, 25 Sep 2006 18:18:23 +0100

 This is totally reproducable on 7-CURRENT.
 
 To do this I use a slightly modified form of the test case supplied in 
 PR 100532.
 
 BMS
Responsible-Changed-From-To: yar->bms 
Responsible-Changed-By: bms 
Responsible-Changed-When: Mon Sep 25 19:14:16 UTC 2006 
Responsible-Changed-Why:  
I'll take this 

http://www.freebsd.org/cgi/query-pr.cgi?pr=82882 
State-Changed-From-To: open->analyzed 
State-Changed-By: bms 
State-Changed-When: Thu Sep 28 11:18:19 UTC 2006 
State-Changed-Why:  
patch coming up 

http://www.freebsd.org/cgi/query-pr.cgi?pr=82882 

From: Bruce M Simpson <bms@incunabulum.net>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/82882: [patch] ip_mroute abends kernel when interface detached
Date: Thu, 28 Sep 2006 12:59:24 +0100

 Resolving.
 
 Multicast interface detach cleanup:
 
 Facts of the matter:
    M:1 cardinality
 vif ----- ifp
    M:1 cardinality
 mfc --- vif
    M:1 cardinality
 mbuf -- mfc->mfc_stall (ifp) -- mfc->mfc_parent
 
 The Cure:
 1. Take VIF and MFC locks.
 2. Walk vifs and match key on ifnet.
 3. Walk mfcs and match key on vif.
 4. Free any pending packets for this mfc.
 5. Free any mfcs bound to the vif.
 6. Free the vif bound to the ifnet.
 7. Release VIF and MFC locks.
 
 Detailed 'how to reproduce' steps follow below.
 
 ---8<---8<---8<---8<---
 
 sandbox# ifconfig ed1 up
 sandbox# ifconfig vlan0 create
 sandbox# ifconfig vlan0 vlandev ed1 vlan 1
 sandbox# ifconfig vlan0 10.0.0.1/24
 sandbox# netstat -g
 Virtual Interface Table is empty
 sandbox# vmstat -m | grep mroutetbl
 sandbox# /bugs/mrouter_test_2
 Waiting 10s before terminate.
 ^Z
 sandbox# netstat -g
 
 Virtual Interface Table
  Vif   Thresh   Rate   Local-Address   Remote-Address    Pkts-In   Pkts-Out
   0         1      0   10.0.0.1                                0          0
   1         1      0   192.168.253.250                         0          0
 
 IPv4 Multicast Forwarding Cache
  Origin          Group             Packets In-Vif  Out-Vifs:Ttls
  10.0.0.1        239.1.2.3               0    0    0:4 1:4
 
 No IPv6 multicast routing compiled into this system.
 IPv4/IPv6 Multicast Group Memberships
 Group                   Gateway                 Netif
 224.0.0.1               01:00:5e:00:00:01       ed0
 224.0.0.1               <none>                  lo0
 224.0.0.1               01:00:5e:00:00:01       vlan0
 
 sandbox# vmstat -m | grep mroutetbl
     mroutetbl     1     1K       -        1  128
 sandbox# ifconfig vlan0 destroy
 <At this point without the patch the machine will panic>
 
 sandbox# vmstat -m | grep mroutetbl
     mroutetbl     0     0K       -        1  128
 sandbox# netstat -g
 
 Virtual Interface Table
  Vif   Thresh   Rate   Local-Address   Remote-Address    Pkts-In   Pkts-Out
   1         1      0   192.168.253.250                         0          0
 
 Multicast Routing Table is empty
 
 No IPv6 multicast routing compiled into this system.
 IPv4/IPv6 Multicast Group Memberships
 Group                   Gateway                 Netif
 224.0.0.1               01:00:5e:00:00:01       ed0
 224.0.0.1               <none>                  lo0
 sandbox# fg
 /bugs/mrouter_test_2
 sandbox# vmstat -m | grep mroutetbl
     mroutetbl     0     0K       -        1  128
 sandbox# netstat -g
 
 Virtual Interface Table is empty
 
 Multicast Routing Table is empty
 
 No IPv6 multicast routing compiled into this system.
 IPv4/IPv6 Multicast Group Memberships
 Group                   Gateway                 Netif
 224.0.0.1               01:00:5e:00:00:01       ed0
 224.0.0.1               <none>                  lo0
 
 ---8<---8<---8<---8<---
 
 Test case code and patch coming next.
 

From: Bruce M Simpson <bms@incunabulum.net>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/82882: [patch] ip_mroute abends kernel when interface detached
Date: Thu, 28 Sep 2006 13:01:29 +0100

 This is a multi-part message in MIME format.
 --------------030709000903080805010209
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Test case attached.
 
 
 --------------030709000903080805010209
 Content-Type: text/x-csrc;
  name="mrouter_test_2.c"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="mrouter_test_2.c"
 
 /*
  * This is a cleaned up and modified form of the test case
  * in FreeBSD problem report kern/100532  -bms
  */
 
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <net/route.h>
 #include <netinet/in.h>
 #include <netinet/ip_mroute.h>
 
 #include <stddef.h>
 #include <stdarg.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <err.h>
 #include <errno.h>
 
 /* XXX requires interfaces below are configured appropriately in sandbox */
 #define MYDELAY		10
 #define NUM_OF_IFS	2
 #define VIF_ADDR_0	"10.0.0.1"
 #define VIF_ADDR_1	"192.168.253.250"
 #define TEST_GROUP	"239.1.2.3"
 #define TEST_TTL	4
 
 static char *if_addr[NUM_OF_IFS] = { VIF_ADDR_0, VIF_ADDR_1 };
 
 int
 main(int argc, char *argv[])
 {
 	struct vifctl	 vc;
 	struct mfcctl2	 mfc;
 	int		 mrouter_version = 1;
 	int		 num_of_ifs = 2;
 	int		 s, i;
 
 	if ((s = socket(PF_INET, SOCK_RAW, IPPROTO_IGMP)) < 0) {
 		err(-1, "Cannot open socket.");
 	}
 
 	/* Initialize MROUTING. */
 	if (setsockopt(s, IPPROTO_IP, MRT_INIT,
 		       (void *)&mrouter_version, sizeof(int)) < 0) {
 		close(s);
 		err(-1, "MRT_INIT returned an error.");
 	}
 	bzero(&vc, sizeof(vc));
 
 	/* Add some VIFs. */
 	for (i = 0; i < num_of_ifs; i++) {
 		vc.vifc_flags = 0;
 		vc.vifc_vifi = i;
 		vc.vifc_threshold = 1;
 		vc.vifc_rate_limit = 0;
 		vc.vifc_lcl_addr.s_addr = inet_addr(if_addr[i]);
 		if (setsockopt(s, IPPROTO_IP, MRT_ADD_VIF,
 			       (void *)&vc, sizeof(vc)) < 0) {
 			close(s);
 			err(-1, "Cannot add VIF.");
 		}
 	}
 
 	/* Add a route. */
 	bzero(&mfc, sizeof(struct mfcctl2));
 	mfc.mfcc_origin.s_addr = inet_addr(if_addr[0]);
 	mfc.mfcc_mcastgrp.s_addr = inet_addr(TEST_GROUP);
 	mfc.mfcc_parent = 0;
 	mfc.mfcc_ttls[0] = TEST_TTL;
 	mfc.mfcc_ttls[1] = TEST_TTL;
 	mfc.mfcc_flags[0] = MRT_MFC_FLAGS_DISABLE_WRONGVIF;
 	mfc.mfcc_flags[1] = MRT_MFC_FLAGS_DISABLE_WRONGVIF;
 	mfc.mfcc_rp.s_addr = INADDR_ANY;
 
 	if (setsockopt(s, IPPROTO_IP, MRT_ADD_MFC,
 		       (void *)&mfc, sizeof(mfc)) < 0) {
 		close(s);
 		err(-1, "Cannot add MFC.");
 	}
 
 	fprintf(stdout, "Waiting %ds before terminate.\n", MYDELAY);
 	sleep(MYDELAY);
 
 	if (setsockopt(s, IPPROTO_IP, MRT_DONE, NULL, 0) < 0) {
 		close(s);
 		perror("setsockopt(MRT_DONE)");
 		exit(-1);
 	}
 
 	close(s);
 
 	exit(0);
 }
 
 --------------030709000903080805010209--

From: Bruce M Simpson <bms@incunabulum.net>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/82882: [patch] ip_mroute abends kernel when interface detached
Date: Thu, 28 Sep 2006 13:02:23 +0100

 This is a multi-part message in MIME format.
 --------------000202010805020306020606
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Fix for 7-CURRENT attached.
 
 --------------000202010805020306020606
 Content-Type: text/x-patch;
  name="mroutedetachfix.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="mroutedetachfix.diff"
 
 ==== //depot/user/bms/nethead/sys/netinet/ip_mroute.c#1 - /home/bms/fp4/nethead/sys/netinet/ip_mroute.c ====
 --- /tmp/tmp.36329.0	Thu Sep 28 13:01:53 2006
 +++ /home/bms/fp4/nethead/sys/netinet/ip_mroute.c	Thu Sep 28 12:43:14 2006
 @@ -124,6 +124,10 @@
   * to cover not only the specific data structure but also related data
   * structures.  It may be better to add more fine-grained locking later;
   * it's not clear how performance-critical this code is.
 + *
 + * XXX: This module could particularly benefit from being cleaned
 + *      up to use the <sys/queue.h> macros.
 + *
   */
  
  static struct mrtstat	mrtstat;
 @@ -160,6 +164,8 @@
  
  static u_char		nexpire[MFCTBLSIZ];
  
 +static eventhandler_tag if_detach_event_tag = NULL;
 +
  static struct callout expire_upcalls_ch;
  
  #define		EXPIRE_TIMEOUT	(hz / 4)	/* 4x / second		*/
 @@ -304,8 +310,10 @@
  
  static int get_sg_cnt(struct sioc_sg_req *);
  static int get_vif_cnt(struct sioc_vif_req *);
 +static void if_detached_event(void *arg __unused, struct ifnet *);
  static int ip_mrouter_init(struct socket *, int);
  static int add_vif(struct vifctl *);
 +static int del_vif_locked(vifi_t);
  static int del_vif(vifi_t);
  static int add_mfc(struct mfcctl2 *);
  static int del_mfc(struct mfcctl2 *);
 @@ -652,6 +660,66 @@
  
  static struct mtx mrouter_mtx;		/* used to synch init/done work */
  
 +static void
 +if_detached_event(void *arg __unused, struct ifnet *ifp)
 +{
 +    vifi_t vifi;
 +    int i;
 +    struct mfc *mfc;
 +    struct mfc *nmfc;
 +    struct mfc **ppmfc;	/* Pointer to previous node's next-pointer */
 +    struct rtdetq *pq;
 +    struct rtdetq *npq;
 +
 +    mtx_lock(&mrouter_mtx);
 +    if (ip_mrouter == NULL) {
 +	mtx_unlock(&mrouter_mtx);
 +    }
 +
 +    /*
 +     * Tear down multicast forwarder state associated with this ifnet.
 +     * 1. Walk the vif list, matching vifs against this ifnet.
 +     * 2. Walk the multicast forwarding cache (mfc) looking for
 +     *    inner matches with this vif's index.
 +     * 3. Free any pending mbufs for this mfc.
 +     * 4. Free the associated mfc entry and state associated with this vif.
 +     *    Be very careful about unlinking from a singly-linked list whose
 +     *    "head node" is a pointer in a simple array.
 +     * 5. Free vif state. This should disable ALLMULTI on the interface.
 +     */
 +    VIF_LOCK();
 +    MFC_LOCK();
 +    for (vifi = 0; vifi < numvifs; vifi++) {
 +	if (viftable[vifi].v_ifp != ifp)
 +		continue;
 +	for (i = 0; i < MFCTBLSIZ; i++) {
 +	    ppmfc = &mfctable[i];
 +	    for (mfc = mfctable[i]; mfc != NULL; ) {
 +		nmfc = mfc->mfc_next;
 +		if (mfc->mfc_parent == vifi) {
 +		    for (pq = mfc->mfc_stall; pq != NULL; ) {
 +			npq = pq->next;
 +			m_freem(pq->m);
 +			free(pq, M_MRTABLE);
 +			pq = npq;
 +		    }
 +		    free_bw_list(mfc->mfc_bw_meter);
 +		    free(mfc, M_MRTABLE);
 +		    *ppmfc = nmfc;
 +		} else {
 +		    ppmfc = &mfc->mfc_next;
 +		}
 +		mfc = nmfc;
 +	    }
 +	}
 +	del_vif_locked(vifi);
 +    }
 +    MFC_UNLOCK();
 +    VIF_UNLOCK();
 +
 +    mtx_unlock(&mrouter_mtx);
 +}
 +                        
  /*
   * Enable multicast routing
   */
 @@ -675,6 +743,11 @@
  	return EADDRINUSE;
      }
  
 +    if_detach_event_tag = EVENTHANDLER_REGISTER(ifnet_departure_event, 
 +        if_detached_event, NULL, EVENTHANDLER_PRI_ANY);
 +    if (if_detach_event_tag == NULL)
 +	return (ENOMEM);
 +
      callout_reset(&expire_upcalls_ch, EXPIRE_TIMEOUT, expire_upcalls, NULL);
  
      callout_reset(&bw_upcalls_ch, BW_UPCALLS_PERIOD,
 @@ -749,6 +822,7 @@
      numvifs = 0;
      pim_assert = 0;
      VIF_UNLOCK();
 +    EVENTHANDLER_DEREGISTER(ifnet_departure_event, if_detach_event_tag);
  
      /*
       * Free all multicast forwarding cache entries.
 @@ -1086,19 +1160,17 @@
   * Delete a vif from the vif table
   */
  static int
 -del_vif(vifi_t vifi)
 +del_vif_locked(vifi_t vifi)
  {
      struct vif *vifp;
  
 -    VIF_LOCK();
 +    VIF_LOCK_ASSERT();
  
      if (vifi >= numvifs) {
 -	VIF_UNLOCK();
  	return EINVAL;
      }
      vifp = &viftable[vifi];
      if (vifp->v_lcl_addr.s_addr == INADDR_ANY) {
 -	VIF_UNLOCK();
  	return EADDRNOTAVAIL;
      }
  
 @@ -1137,9 +1209,19 @@
  	    break;
      numvifs = vifi;
  
 +    return 0;
 +}
 +
 +static int
 +del_vif(vifi_t vifi)
 +{
 +    int cc;
 +
 +    VIF_LOCK();
 +    cc = del_vif_locked(vifi);
      VIF_UNLOCK();
  
 -    return 0;
 +    return cc;
  }
  
  /*
 
 --------------000202010805020306020606--
State-Changed-From-To: analyzed->patched 
State-Changed-By: bms 
State-Changed-When: Thu Sep 28 12:22:27 UTC 2006 
State-Changed-Why:  
fix integrated, pending mfc. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=82882 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/82882: commit references a PR
Date: Thu, 28 Sep 2006 12:21:22 +0000 (UTC)

 bms         2006-09-28 12:21:09 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/netinet          ip_mroute.c 
   Log:
   Fix the IPv4 multicast routing detach path. On interface detach whilst
   the MROUTER is running, the system would panic as described in the PR.
   
   The fix in the PR is a good start, however, the other state associated
   with the multicast forwarding cache has to be freed in order to avoid
   leaking memory and other possible panics.
   
   More care and attention is needed in this area.
   
   PR:             kern/82882
   MFC after:      1 week
   
   Revision  Changes    Path
   1.119     +87 -5     src/sys/netinet/ip_mroute.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: bms 
State-Changed-When: Sat Oct 7 10:45:03 UTC 2006 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=82882 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/82882: commit references a PR
Date: Sat,  7 Oct 2006 10:45:31 +0000 (UTC)

 bms         2006-10-07 10:45:05 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     sys/netinet          ip_mroute.c 
   Log:
   MFC: Fix the IPv4 multicast routing detach path. On interface detach whilst
   the MROUTER is running, the system would panic as described in the PR.
   
   The fix in the PR is a good start, however, the other state associated
   with the multicast forwarding cache has to be freed in order to avoid
   leaking memory and other possible panics.
   
   More care and attention is needed in this area.
   
   PR:             kern/82882
   Approved by:    re (rwatson)
   Revs:           1.119 src/sys/netinet/ip_mroute.c
   
   Revision   Changes    Path
   1.111.2.3  +87 -5     src/sys/netinet/ip_mroute.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
