Date: Thu, 12 Jun 2014 09:06:05 GMT From: dpl@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r269433 - soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw Message-ID: <201406120906.s5C965sU041118@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dpl Date: Thu Jun 12 09:06:05 2014 New Revision: 269433 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=269433 Log: Added rule_deny(). Modified: soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw/ip_fw2.c soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw/ip_rules.h Modified: soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw/ip_fw2.c Thu Jun 12 08:47:17 2014 (r269432) +++ soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw/ip_fw2.c Thu Jun 12 09:06:05 2014 (r269433) @@ -1711,26 +1711,7 @@ break; case O_SKIPTO: - IPFW_INC_RULE_COUNTER(f, pktlen); - f_pos = jump_fast(chain, f, cmd->arg1, tablearg, 0); - /* - * Skip disabled rules, and re-enter - * the inner loop with the correct - * f_pos, f, l and cmd. - * Also clear cmdlen and skip_or - */ - for (; f_pos < chain->n_rules - 1 && - (V_set_disable & - (1 << chain->map[f_pos]->set)); - f_pos++) - ; - /* Re-enter the inner loop at the skipto rule. */ - f = chain->map[f_pos]; - l = f->cmd_len; - cmd = f->cmd; - match = 1; - cmdlen = 0; - skip_or = 0; + rule_skipto(&match, &l, &cmd, &skip_or, &f_pos, f, pktlen, chain, cmd, tablearg); continue; break; /* not reached */ @@ -1862,9 +1843,7 @@ /* FALLTHROUGH */ #endif case O_DENY: - retval = IP_FW_DENY; - l = 0; /* exit inner loop */ - done = 1; /* exit outer loop */ + rule_deny(&l, &done, &retval); break; case O_FORWARD_IP: Modified: soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw/ip_rules.h ============================================================================== --- soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw/ip_rules.h Thu Jun 12 08:47:17 2014 (r269432) +++ soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw/ip_rules.h Thu Jun 12 09:06:05 2014 (r269433) @@ -959,6 +959,9 @@ inline void rule_deny(int *l, int *done, int *retval) { + *retval = IP_FW_DENY; + *l = 0; /* exit inner loop */ + *done = 1; /* exit outer loop */ } inline void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406120906.s5C965sU041118>