Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/sys/netinet Pull up revision 1.34 (requested by itojun ...



details:   https://anonhg.NetBSD.org/src/rev/1bb053b05e01
branches:  netbsd-1-6
changeset: 530458:1bb053b05e01
user:      grant <grant%NetBSD.org@localhost>
date:      Mon Jun 30 02:16:24 2003 +0000

description:
Pull up revision 1.34 (requested by itojun in ticket #1341):

purge rti structure (in igmp.c) for removed ifp on if_detach().

diffstat:

 sys/netinet/igmp.c |  30 +++++++++++++++++++++++++++---
 1 files changed, 27 insertions(+), 3 deletions(-)

diffs (62 lines):

diff -r 1d86e79ca8f0 -r 1bb053b05e01 sys/netinet/igmp.c
--- a/sys/netinet/igmp.c        Mon Jun 30 02:14:17 2003 +0000
+++ b/sys/netinet/igmp.c        Mon Jun 30 02:16:24 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: igmp.c,v 1.28 2002/05/12 20:33:50 matt Exp $   */
+/*     $NetBSD: igmp.c,v 1.28.4.1 2003/06/30 02:16:24 grant Exp $      */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: igmp.c,v 1.28 2002/05/12 20:33:50 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: igmp.c,v 1.28.4.1 2003/06/30 02:16:24 grant Exp $");
 
 #include "opt_mrouting.h"
 
@@ -71,7 +71,8 @@
 
 void igmp_sendpkt __P((struct in_multi *, int));
 static int rti_fill __P((struct in_multi *));
-static struct router_info * rti_find __P((struct ifnet *));
+static struct router_info *rti_find __P((struct ifnet *));
+static void rti_delete(struct ifnet *);
 
 void
 igmp_init()
@@ -127,6 +128,21 @@
        return (rti);
 }
 
+static void
+rti_delete(ifp)
+       struct ifnet *ifp;
+{
+       struct router_info *rti;
+
+       LIST_FOREACH(rti, &rti_head, rti_link) {
+               if (rti->rti_ifp == ifp) {
+                       LIST_REMOVE(rti, rti_link);
+                       pool_put(&igmp_rti_pool, rti);
+                       return;
+               }
+       }
+}
+
 void
 #if __STDC__
 igmp_input(struct mbuf *m, ...)
@@ -562,3 +578,11 @@
 
        ++igmpstat.igps_snd_reports;
 }
+
+void
+igmp_purgeif(ifp)
+       struct ifnet *ifp;
+{
+
+       rti_delete(ifp);
+}



Home | Main Index | Thread Index | Old Index