mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-22 16:44:32 +01:00
Do not allow 'ipfw fwd' command when IPFIREWALL_FORWARD is not compiled into
the kernel. Return EINVAL instead.
This commit is contained in:
parent
f91248c1ad
commit
bda337d05e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=135168
@ -2955,9 +2955,13 @@ check_ipfw_struct(struct ip_fw *rule, int size)
|
||||
goto check_action;
|
||||
|
||||
case O_FORWARD_IP:
|
||||
#ifdef IPFIREWALL_FORWARD
|
||||
if (cmdlen != F_INSN_SIZE(ipfw_insn_sa))
|
||||
goto bad_size;
|
||||
goto check_action;
|
||||
#else
|
||||
return EINVAL;
|
||||
#endif
|
||||
|
||||
case O_DIVERT:
|
||||
case O_TEE:
|
||||
|
Loading…
Reference in New Issue
Block a user