Fix command: ipfw set (enable|disable) N (where N > 4).
enable_sets() expects set bitmasks, not set numbers. MFC after: 3 days
This commit is contained in:
parent
40de550ba7
commit
e7560c836f
@ -1420,8 +1420,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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user