diff options
author | glebius <glebius@FreeBSD.org> | 2004-09-05 20:06:50 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2004-09-05 20:06:50 +0000 |
commit | 2087edb93832a47d6a043b58602f699b1b2967a4 (patch) | |
tree | 1c8d3d9b950d1077fe13c7037bf24c7e9a40ba40 /sys/netinet/ip_fw2.c | |
parent | d8beb8f72bea3807fa2992f5acc45c7581379094 (diff) | |
download | FreeBSD-src-2087edb93832a47d6a043b58602f699b1b2967a4.zip FreeBSD-src-2087edb93832a47d6a043b58602f699b1b2967a4.tar.gz |
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)
Diffstat (limited to 'sys/netinet/ip_fw2.c')
-rw-r--r-- | sys/netinet/ip_fw2.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c index 2cb6c85..9a46ce7 100644 --- a/sys/netinet/ip_fw2.c +++ b/sys/netinet/ip_fw2.c @@ -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: |