mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-14 14:55:41 +00:00
Jump to common action checks after doing specific once. This fixes adding
of divert rules, which I break in previous commit. Pointy hat to: glebius
This commit is contained in:
parent
75be8d597f
commit
1af305441d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=141383
@ -3127,10 +3127,14 @@ check_ipfw_struct(struct ip_fw *rule, int size)
|
||||
case O_TEE:
|
||||
if (ip_divert_ptr == NULL)
|
||||
return EINVAL;
|
||||
else
|
||||
goto check_size;
|
||||
case O_NETGRAPH:
|
||||
case O_NGTEE:
|
||||
if (!NG_IPFW_LOADED)
|
||||
return EINVAL;
|
||||
else
|
||||
goto check_size;
|
||||
case O_FORWARD_MAC: /* XXX not implemented yet */
|
||||
case O_CHECK_STATE:
|
||||
case O_COUNT:
|
||||
@ -3138,6 +3142,7 @@ check_ipfw_struct(struct ip_fw *rule, int size)
|
||||
case O_DENY:
|
||||
case O_REJECT:
|
||||
case O_SKIPTO:
|
||||
check_size:
|
||||
if (cmdlen != F_INSN_SIZE(ipfw_insn))
|
||||
goto bad_size;
|
||||
check_action:
|
||||
|
Loading…
Reference in New Issue
Block a user