Re: IGMP+WiFi panic on recent kernel - in igmp_fasttimo()

From: Sam Leffler <sam_at_freebsd.org>
Date: Sat, 14 Mar 2009 14:06:46 -0700
This patches avoids the crash.  Not sure how ifma_protospec is supposed 
to be handled so I'm not committing it.

    Sam


Index: in.c
===================================================================
--- in.c	(revision 189750)
+++ in.c	(working copy)
_at__at_ -1040,7 +1040,8 _at__at_
 	 */
 	IF_ADDR_LOCK(ifp);
 	TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
-		if (ifma->ifma_addr->sa_family != AF_INET)
+		if (ifma->ifma_addr->sa_family != AF_INET ||
+		    ifma->ifma_protospec == NULL)
 			continue;
 		inm = (struct in_multi *)ifma->ifma_protospec;
 		LIST_INSERT_HEAD(&purgeinms, inm, inm_link);
Index: igmp.c
===================================================================
--- igmp.c	(revision 189750)
+++ igmp.c	(working copy)
_at__at_ -623,7 +623,8 _at__at_
 	if (igi->igi_version == IGMP_VERSION_3) {
 		IF_ADDR_LOCK(ifp);
 		TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
-			if (ifma->ifma_addr->sa_family != AF_INET)
+			if (ifma->ifma_addr->sa_family != AF_INET ||
+			    ifma->ifma_protospec == NULL)
 				continue;
 			inm = (struct in_multi *)ifma->ifma_protospec;
 			if (inm->inm_state == IGMP_LEAVING_MEMBER) {
Received on Sat Mar 14 2009 - 20:06:48 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:44 UTC