Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jul 2014 15:58:43 GMT
From:      dpl@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r271606 - soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw
Message-ID:  <201407301558.s6UFwh4M035657@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
-}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407301558.s6UFwh4M035657>