]> git.baikalelectronics.ru Git - kernel.git/commit
ipvs: remove IPS_NAT_MASK check to fix passive FTP
authorJulian Anastasov <ja@ssi.bg>
Sun, 25 Feb 2018 20:29:18 +0000 (22:29 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 28 Feb 2018 18:48:26 +0000 (19:48 +0100)
commit39e485fd8532b5385c19f8947decbbb0a6a46be9
tree7cb08e66576bd68db5e96b7750f107b1d7baed28
parent3fc092c44c6f81416c102947637b005c30f81086
ipvs: remove IPS_NAT_MASK check to fix passive FTP

The IPS_NAT_MASK check in 4.12 replaced previous check for nfct_nat()
which was needed to fix a crash in 2.6.36-rc, see
commit f26f1a2ac4be ("ipvs: avoid oops for passive FTP").
But as IPVS does not set the IPS_SRC_NAT and IPS_DST_NAT bits,
checking for IPS_NAT_MASK prevents PASV response to be properly
mangled and blocks the transfer. Remove the check as it is not
needed after 3.12 commit ddd75e1f0e57 ("netfilter: nf_conntrack:
make sequence number adjustments usuable without NAT") which
changes nfct_nat() with nfct_seqadj() and especially after 3.13
commit 3de602dcab16 ("ipvs: correct usage/allocation of seqadj
ext in ipvs").

Thanks to Li Shuang and Florian Westphal for reporting the problem!

Reported-by: Li Shuang <shuali@redhat.com>
Fixes: 374cebe6ddb9 ("netfilter: ipvs: fix incorrect conflict resolution")
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/ipvs/ip_vs_ftp.c