Fix ipfw rule validation partially broken by r248552.
Pointed by: avg MFC with: r248552
This commit is contained in:
parent
c686ee4685
commit
4037b82802
@ -672,10 +672,6 @@ check_ipfw_struct(struct ip_fw *rule, int size)
|
||||
case O_IPID:
|
||||
case O_IPTTL:
|
||||
case O_IPLEN:
|
||||
case O_DSCP:
|
||||
if (cmdlen != F_INSN_SIZE(ipfw_insn_u32) + 1)
|
||||
goto bad_size;
|
||||
break;
|
||||
case O_TCPDATALEN:
|
||||
case O_TCPWIN:
|
||||
case O_TAGGED:
|
||||
@ -683,6 +679,11 @@ check_ipfw_struct(struct ip_fw *rule, int size)
|
||||
goto bad_size;
|
||||
break;
|
||||
|
||||
case O_DSCP:
|
||||
if (cmdlen != F_INSN_SIZE(ipfw_insn_u32) + 1)
|
||||
goto bad_size;
|
||||
break;
|
||||
|
||||
case O_MAC_TYPE:
|
||||
case O_IP_SRCPORT:
|
||||
case O_IP_DSTPORT: /* XXX artificial limit, 30 port pairs */
|
||||
|
Loading…
x
Reference in New Issue
Block a user