PERFORCE change 142838 for review

Gleb Kurtsou gk at FreeBSD.org
Tue Jun 3 18:00:40 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=142838

Change 142838 by gk at gk_h1 on 2008/06/03 17:59:53

	fix bugs: ipfw was disabled. malloc(M_WAITOK) is ok in ipfw_*hook

Affected files ...

.. //depot/projects/soc2008/gk_l2filter/sys-netinet/ip_fw_pfil.c#4 edit

Differences ...

==== //depot/projects/soc2008/gk_l2filter/sys-netinet/ip_fw_pfil.c#4 (text+ko) ====

@@ -547,15 +547,15 @@
 	struct pfil_head *pfh_inet, *pfh_ether;
 
 	pfh_inet = pfil_head_get(PFIL_TYPE_AF, AF_INET);
-	if (pfh_inet == NULL) {
+	if (pfh_inet != NULL) {
 		pfil_add_hook(ipfw_check_in, NULL, PFIL_IN | PFIL_WAITOK, pfh_inet);
 		pfil_add_hook(ipfw_check_out, NULL, PFIL_OUT | PFIL_WAITOK, pfh_inet);
 	}
 
 	pfh_ether = pfil_head_get(PFIL_TYPE_IFT, IFT_ETHER);
 	if (pfh_ether != NULL) {
-		pfil_add_hook(ipfw_ether_check_in, NULL, PFIL_IN, pfh_ether);
-		pfil_add_hook(ipfw_ether_check_out, NULL, PFIL_OUT, pfh_ether);
+		pfil_add_hook(ipfw_ether_check_in, NULL, PFIL_IN | PFIL_WAITOK, pfh_ether);
+		pfil_add_hook(ipfw_ether_check_out, NULL, PFIL_OUT | PFIL_WAITOK, pfh_ether);
 	}
 
 	if (pfh_inet == NULL || pfh_ether == NULL)


More information about the p4-projects mailing list