summaryrefslogtreecommitdiffstats
path: root/sys/netpfil/ipfw/ip_fw_sockopt.c
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-08-25 10:40:54 -0300
committerRenato Botelho <renato@netgate.com>2016-08-25 10:40:54 -0300
commit5f4dbd408a354e294fdffc23ee889af03b7cfc28 (patch)
tree2d140e0691c400a324f9da94ed1282ab1a1c8710 /sys/netpfil/ipfw/ip_fw_sockopt.c
parentff37ccbef82fdcee6f5306945547bc8541986a03 (diff)
parent986f593e4573a0f751ae6fa39b49e0a0dcbefbf8 (diff)
downloadFreeBSD-src-5f4dbd408a354e294fdffc23ee889af03b7cfc28.zip
FreeBSD-src-5f4dbd408a354e294fdffc23ee889af03b7cfc28.tar.gz
Merge remote-tracking branch 'origin/stable/11' into devel-11
Diffstat (limited to 'sys/netpfil/ipfw/ip_fw_sockopt.c')
-rw-r--r--sys/netpfil/ipfw/ip_fw_sockopt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netpfil/ipfw/ip_fw_sockopt.c b/sys/netpfil/ipfw/ip_fw_sockopt.c
index 52dfe7c..43ff56a 100644
--- a/sys/netpfil/ipfw/ip_fw_sockopt.c
+++ b/sys/netpfil/ipfw/ip_fw_sockopt.c
@@ -1414,8 +1414,10 @@ manage_sets(struct ip_fw_chain *chain, ip_fw3_opheader *op3,
if (rh->range.head.length != sizeof(ipfw_range_tlv))
return (1);
- if (rh->range.set >= IPFW_MAX_SETS ||
- rh->range.new_set >= IPFW_MAX_SETS)
+ /* enable_sets() expects bitmasks. */
+ if (op3->opcode != IP_FW_SET_ENABLE &&
+ (rh->range.set >= IPFW_MAX_SETS ||
+ rh->range.new_set >= IPFW_MAX_SETS))
return (EINVAL);
ret = 0;
OpenPOWER on IntegriCloud