Date: Sun, 8 Nov 2015 12:24:20 +0000 (UTC) From: "Alexander V. Chernikov" <melifaro@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290543 - head/sys/netpfil/ipfw Message-ID: <201511081224.tA8COK66051842@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: melifaro Date: Sun Nov 8 12:24:19 2015 New Revision: 290543 URL: https://svnweb.freebsd.org/changeset/base/290543 Log: Fix setfib target. Problem was introduced in r272840 when converting tablearg value to 0. Submitted by: Denis Schneider <v1ne2go at gmail> Modified: head/sys/netpfil/ipfw/ip_fw2.c head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Sun Nov 8 09:37:26 2015 (r290542) +++ head/sys/netpfil/ipfw/ip_fw2.c Sun Nov 8 12:24:19 2015 (r290543) @@ -2476,7 +2476,7 @@ do { \ uint32_t fib; IPFW_INC_RULE_COUNTER(f, pktlen); - fib = TARG(cmd->arg1, fib) & 0x7FFFF; + fib = TARG(cmd->arg1, fib) & 0x7FFF; if (fib >= rt_numfibs) fib = 0; M_SETFIB(m, fib); Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Sun Nov 8 09:37:26 2015 (r290542) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Sun Nov 8 12:24:19 2015 (r290543) @@ -1497,9 +1497,9 @@ check_ipfw_rule_body(ipfw_insn *cmd, int if (cmdlen != F_INSN_SIZE(ipfw_insn)) goto bad_size; if ((cmd->arg1 != IP_FW_TARG) && - ((cmd->arg1 & 0x7FFFF) >= rt_numfibs)) { + ((cmd->arg1 & 0x7FFF) >= rt_numfibs)) { printf("ipfw: invalid fib number %d\n", - cmd->arg1 & 0x7FFFF); + cmd->arg1 & 0x7FFF); return EINVAL; } goto check_action;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511081224.tA8COK66051842>