PERFORCE change 152406 for review

Gleb Kurtsou gk at FreeBSD.org
Mon Nov 3 03:19:19 PST 2008


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

Change 152406 by gk at gk_h1 on 2008/11/03 11:18:47

	cleanup

Affected files ...

.. //depot/projects/soc2008/gk_l2filter/sys-netinet/ip_fw2.c#18 edit
.. //depot/projects/soc2008/gk_l2filter/sys-netinet/ip_fw_pfil.c#10 edit
.. //depot/projects/soc2008/gk_l2filter/sys-pf/net/pf.c#11 edit

Differences ...

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

@@ -176,8 +176,6 @@
 static __inline int ether_addr_allow_dyn(ipfw_ether_addr *want, ipfw_ether_addr *a)
 {
 	if ((a->flags & IPFW_EA_CHECK) == 0) {
-		if (want->flags & IPFW_EA_CHECK)
-			printf("ipfw: no tag: %6D (want %6D)\n", a->octet, ":", want->octet, ":");
 		return (1);
 	}
 	return (ether_addr_allow(want, a));
@@ -1243,12 +1241,10 @@
 	 * mbuf has mtag_ether_header.
 	 */
 	if (dir == MATCH_NONE ||
-			!ether_addr_allow_dyn(&q->id.src_ether,
-			(dir == MATCH_FORWARD ? &pkt->src_ether : &pkt->dst_ether)) ||
-			!ether_addr_allow_dyn(&q->id.dst_ether,
-			(dir == MATCH_FORWARD ? &pkt->dst_ether : &pkt->src_ether))) {
-		printf("XXX IPFW DYN RULE: dropped by mac: %6D -> %6D\n",
-				&pkt->src_ether.octet, ":", &pkt->dst_ether.octet, ":");
+	    !ether_addr_allow_dyn(&q->id.src_ether,
+	    (dir == MATCH_FORWARD ? &pkt->src_ether : &pkt->dst_ether)) ||
+	    !ether_addr_allow_dyn(&q->id.dst_ether,
+	    (dir == MATCH_FORWARD ? &pkt->dst_ether : &pkt->src_ether))) {
 		q = NULL;
 		dir = MATCH_NONE;
 		goto done;
@@ -3190,11 +3186,6 @@
 
 					match = lookup_table(chain, cmd->arg1, pa, 
 						(ha.flags ? &ha : NULL), &v);
-					printf("ipfw: %s arp: %s: op = %d: %6D(%d) %s\n",
-						(match ? "pass" : "drop"),
-						cmd->opcode == O_ARP_DST_LOOKUP ? "dst" : "src",
-						op, ha.octet, ":", ha.flags, 
-						inet_ntoa(*(struct in_addr *)&pa));
 					if (!match)
 					    break;
 					if (cmdlen == F_INSN_SIZE(ipfw_insn_u32))

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

@@ -457,12 +457,6 @@
 	args.inp = inp;
 	error = ip_fw_chk_ptr(&args);
 	*m0 = args.m;
-#ifdef XXXGK
-	printf("IN  %6D -> %6D: %s\n", 
-			args.eh->ether_shost, ":", 
-			args.eh->ether_dhost, ":",
-			(error == IP_FW_PASS ? "passed" : "droped"));
-#endif
 
 	if (error == IP_FW_PASS)
 		return 0;
@@ -505,12 +499,6 @@
 	args.inp = inp;
 	error = ip_fw_chk_ptr(&args);
 	*m0 = args.m;
-#ifdef XXXGK
-	printf("OUT %6D -> %6D: %s\n", 
-			args.eh->ether_shost, ":", 
-			args.eh->ether_dhost, ":",
-			(error == IP_FW_PASS ? "passed" : "droped"));
-#endif
 
 	if (error == IP_FW_PASS)
 		return 0;

==== //depot/projects/soc2008/gk_l2filter/sys-pf/net/pf.c#11 (text+ko) ====

@@ -712,7 +712,6 @@
 	if ((state->local_flags & PFSTATE_ETHER) == 0)
 		return (1);
 #else
-	/* XXX only FreeBSD is supported */
 	if ((state->rule.ptr->rule_flag & PFRULE_ETHERSTATE) == 0)
 		return (1);
 #endif


More information about the p4-projects mailing list