mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 14:14:01 +08:00
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>
This commit is contained in:
parent
592d42ac7f
commit
41390895e5
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user