summaryrefslogtreecommitdiff
path: root/net/netfilter/ipvs
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2017-03-28 10:31:20 +0200
committerSimon Horman <horms@verge.net.au>2017-03-30 14:41:42 +0200
commit41390895e50bc4f28abe384c6b35ac27464a20ec (patch)
tree360154b271294bcd98ab4055620c01e0b52109a5 /net/netfilter/ipvs
parent592d42ac7fd36408979e09bf2f170f2595dab7b8 (diff)
netfilter: ipvs: don't check for presence of nat extension
Check for the NAT status bits, they are set once conntrack needs NAT in source or reply direction, this is slightly faster than nfct_nat() as that has to check the extension area. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'net/netfilter/ipvs')
-rw-r--r--net/netfilter/ipvs/ip_vs_ftp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c
index d30c327bb578..2e2bf7428cd1 100644
--- a/net/netfilter/ipvs/ip_vs_ftp.c
+++ b/net/netfilter/ipvs/ip_vs_ftp.c
@@ -260,7 +260,7 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp,
buf_len = strlen(buf);
ct = nf_ct_get(skb, &ctinfo);
- if (ct && !nf_ct_is_untracked(ct) && nfct_nat(ct)) {
+ if (ct && !nf_ct_is_untracked(ct) && (ct->status & IPS_NAT_MASK)) {
/* If mangling fails this function will return 0
* which will cause the packet to be dropped.
* Mangling can only fail under memory pressure,