diff options
author | Gao Feng <gfree.wind@vip.163.com> | 2017-05-31 16:55:43 +0800 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-06-19 19:09:19 +0200 |
commit | e15b9c50c4555e30be3c4f26aab7aeb10aee7aa6 (patch) | |
tree | c81500d3a9649ce0c42c033bbf34b25d10c4affd /net/bridge/netfilter/ebt_snat.c | |
parent | 7866cc57b51c1e118e5d78d1a8f721f378eec5c4 (diff) | |
download | linux-stable-e15b9c50c4555e30be3c4f26aab7aeb10aee7aa6.tar.gz linux-stable-e15b9c50c4555e30be3c4f26aab7aeb10aee7aa6.tar.bz2 linux-stable-e15b9c50c4555e30be3c4f26aab7aeb10aee7aa6.zip |
netfilter: ebt: Use new helper ebt_invalid_target to check target
Use the new helper function ebt_invalid_target instead of the old
macro INVALID_TARGET and other duplicated codes to enhance the readability.
Signed-off-by: Gao Feng <gfree.wind@vip.163.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/bridge/netfilter/ebt_snat.c')
-rw-r--r-- | net/bridge/netfilter/ebt_snat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/netfilter/ebt_snat.c b/net/bridge/netfilter/ebt_snat.c index e56ccd060d26..11cf9e9e9222 100644 --- a/net/bridge/netfilter/ebt_snat.c +++ b/net/bridge/netfilter/ebt_snat.c @@ -51,7 +51,7 @@ static int ebt_snat_tg_check(const struct xt_tgchk_param *par) if (BASE_CHAIN && tmp == EBT_RETURN) return -EINVAL; - if (tmp < -NUM_STANDARD_TARGETS || tmp >= 0) + if (ebt_invalid_target(tmp)) return -EINVAL; tmp = info->target | EBT_VERDICT_BITS; if ((tmp & ~NAT_ARP_BIT) != ~NAT_ARP_BIT) |