1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-01 08:27:59 +00:00

Recover normal behavior: return EINVAL to attempt to add a divert rule

when module is built without IPDIVERT.

Silence from:	andre
Approved by:	julian (mentor)
This commit is contained in:
Gleb Smirnoff 2004-09-05 20:06:50 +00:00
parent 690be704f3
commit f46a6aac29
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=134823

View File

@ -2959,6 +2959,11 @@ check_ipfw_struct(struct ip_fw *rule, int size)
goto bad_size;
goto check_action;
case O_DIVERT:
case O_TEE:
#ifndef IPDIVERT
return EINVAL;
#endif
case O_FORWARD_MAC: /* XXX not implemented yet */
case O_CHECK_STATE:
case O_COUNT:
@ -2966,8 +2971,6 @@ check_ipfw_struct(struct ip_fw *rule, int size)
case O_DENY:
case O_REJECT:
case O_SKIPTO:
case O_DIVERT:
case O_TEE:
if (cmdlen != F_INSN_SIZE(ipfw_insn))
goto bad_size;
check_action: