summaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorFlorian Westphal2017-03-28 10:31:20 +0200
committerSimon Horman2017-03-30 14:41:42 +0200
commit41390895e50bc4f28abe384c6b35ac27464a20ec (patch)
tree360154b271294bcd98ab4055620c01e0b52109a5 /net/netfilter
parentMerge branch 'qed-IOV-cleanups' (diff)
downloadkernel-qcow2-linux-41390895e50bc4f28abe384c6b35ac27464a20ec.tar.gz
kernel-qcow2-linux-41390895e50bc4f28abe384c6b35ac27464a20ec.tar.xz
kernel-qcow2-linux-41390895e50bc4f28abe384c6b35ac27464a20ec.zip
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')
-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,