svn commit: r201569 - user/luigi/ipfw3-head/sys/net

Luigi Rizzo luigi at FreeBSD.org
Tue Jan 5 11:30:08 UTC 2010


Author: luigi
Date: Tue Jan  5 11:30:06 2010
New Revision: 201569
URL: http://svn.freebsd.org/changeset/base/201569

Log:
  adjust if_bridge and if_ethersubr to the new tagging for dummynet

Modified:
  user/luigi/ipfw3-head/sys/net/if_bridge.c
  user/luigi/ipfw3-head/sys/net/if_ethersubr.c

Modified: user/luigi/ipfw3-head/sys/net/if_bridge.c
==============================================================================
--- user/luigi/ipfw3-head/sys/net/if_bridge.c	Tue Jan  5 11:00:31 2010	(r201568)
+++ user/luigi/ipfw3-head/sys/net/if_bridge.c	Tue Jan  5 11:30:06 2010	(r201569)
@@ -135,7 +135,6 @@ __FBSDID("$FreeBSD$");
 #include <net/route.h>
 #include <netinet/ip_fw.h>
 #include <netinet/ipfw/ip_fw_private.h>
-#include <netinet/ip_dummynet.h>
 
 /*
  * Size of the route hash table.  Must be a power of two.
@@ -3051,15 +3050,15 @@ bridge_pfil(struct mbuf **mp, struct ifn
 		if (mtag == NULL) {
 			args.rule.slot = 0;
 		} else {
-			struct dn_pkt_tag *dn_tag;
+			struct ipfw_rule_ref *r;
 
 			/* XXX can we free the tag after use ? */
 			mtag->m_tag_id = PACKET_TAG_NONE;
-			dn_tag = (struct dn_pkt_tag *)(mtag + 1);
+			r = (struct ipfw_rule_ref *)(mtag + 1);
 			/* packet already partially processed ? */
-			if (dn_tag->rule.slot != 0 && V_fw_one_pass)
+			if (r->info & IPFW_ONEPASS)
 				goto ipfwpass;
-			args.rule = dn_tag->rule;
+			args.rule = *r;
 		}
 
 		args.m = *mp;

Modified: user/luigi/ipfw3-head/sys/net/if_ethersubr.c
==============================================================================
--- user/luigi/ipfw3-head/sys/net/if_ethersubr.c	Tue Jan  5 11:00:31 2010	(r201568)
+++ user/luigi/ipfw3-head/sys/net/if_ethersubr.c	Tue Jan  5 11:30:06 2010	(r201569)
@@ -72,7 +72,6 @@
 #include <netinet/if_ether.h>
 #include <netinet/ip_fw.h>
 #include <netinet/ipfw/ip_fw_private.h>
-#include <netinet/ip_dummynet.h>
 #include <netinet/ip_var.h>
 #endif
 #ifdef INET6
@@ -474,15 +473,15 @@ ether_ipfw_chk(struct mbuf **m0, struct 
 	if (mtag == NULL) {
 		args.rule.slot = 0;
 	} else {
-		struct dn_pkt_tag *dn_tag;
+		/* dummynet packet, already partially processed */
+		struct ipfw_rule_ref *r;
 
 		/* XXX can we free it after use ? */
 		mtag->m_tag_id = PACKET_TAG_NONE;
-		dn_tag = (struct dn_pkt_tag *)(mtag + 1);
-		if (dn_tag->rule.slot != 0 && V_fw_one_pass)
-			/* dummynet packet, already partially processed */
+		r = (struct ipfw_rule_ref *)(mtag + 1);
+		if (r->info & IPFW_ONEPASS)
 			return (1);
-		args.rule = dn_tag->rule;
+		args.rule = *r;
 	}
 
 	/*


More information about the svn-src-user mailing list