socsvn commit: r271606 - soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw

dpl at FreeBSD.org dpl at FreeBSD.org
Wed Jul 30 15:58:44 UTC 2014


Author: dpl
Date: Wed Jul 30 15:58:42 2014
New Revision: 271606
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271606

Log:
  Removed unneeded rule.
  

Modified:
  soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c
  soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h

Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c
==============================================================================
--- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c	Wed Jul 30 14:52:26 2014	(r271605)
+++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c	Wed Jul 30 15:58:42 2014	(r271606)
@@ -663,7 +663,21 @@
 		IPFW_PF_RUNLOCK(chain);
 		return (IP_FW_PASS);	/* accept */
 	}
-	getfpos(args, chain, &f_pos);
+	if (args->rule.slot) {
+		/*
+		 * Packet has already been tagged as a result of a previous
+		 * match on rule args->rule aka args->rule_id (PIPE, QUEUE,
+		 * REASS, NETGRAPH, DIVERT/TEE...)
+		 * Validate the slot and continue from the next one
+		 * if still present, otherwise do a lookup.
+		 */
+		f_pos = (args->rule.chain_id == chain->id) ?
+		    args->rule.slot :
+		    ipfw_find_rule(chain, args->rule.rulenum,
+			args->rule.rule_id);
+	} else {
+		f_pos = 0;
+	}
 
 	/*
 	 * Now scan the rules, and parse microinstructions for each rule.

Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h
==============================================================================
--- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h	Wed Jul 30 14:52:26 2014	(r271605)
+++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h	Wed Jul 30 15:58:42 2014	(r271606)
@@ -1924,28 +1924,3 @@
 	}
 	*done = 1;	/* exit outer loop */
 }
-
-/*
- * Function to be called just after
- * lockcheckvnet();
- */
-static IPFW_RULES_INLINE int
-getfpos(struct ip_fw_args *args, struct ip_fw_chain *chain, int *f_pos)
-{
-	if (args->rule.slot) {
-		/*
-		 * Packet has already been tagged as a result of a previous
-		 * match on rule args->rule aka args->rule_id (PIPE, QUEUE,
-		 * REASS, NETGRAPH, DIVERT/TEE...)
-		 * Validate the slot and continue from the next one
-		 * if still present, otherwise do a lookup.
-		 */
-		*f_pos = (args->rule.chain_id == chain->id) ?
-		    args->rule.slot :
-		    ipfw_find_rule(chain, args->rule.rulenum,
-			args->rule.rule_id);
-	} else {
-		*f_pos = 0;
-	}
-	return (*f_pos);
-}


More information about the svn-soc-all mailing list