android_kernel_xiaomi_sm8350/net/ipv4/ipvs
Julian Anastasov 87375ab47c [IPVS]: ip_vs_ftp breaks connections using persistence
ip_vs_ftp when loaded can create NAT connections with unknown client
port for passive FTP. For such expectations we lookup with cport=0 on
incoming packet but it matches the format of the persistence templates
causing packets to other persistent virtual servers to be forwarded to
real server without creating connection. Later the reply packets are
treated as foreign and not SNAT-ed.

This patch changes the connection lookup for packets from clients:

* introduce IP_VS_CONN_F_TEMPLATE connection flag to mark the
  connection as template

* create new connection lookup function just for templates -
  ip_vs_ct_in_get

* make sure ip_vs_conn_in_get hits only connections with
  IP_VS_CONN_F_NO_CPORT flag set when s_port is 0. By this way
  we avoid returning template when looking for cport=0 (ftp)

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-09-14 21:08:51 -07:00
..
ip_vs_app.c [TCP]: Move the tcp sock states to net/tcp_states.h 2005-08-29 15:41:54 -07:00
ip_vs_conn.c [IPVS]: ip_vs_ftp breaks connections using persistence 2005-09-14 21:08:51 -07:00
ip_vs_core.c [IPVS]: ip_vs_ftp breaks connections using persistence 2005-09-14 21:08:51 -07:00
ip_vs_ctl.c [IPVS]: ipv4_table --> ipvs_ipv4_table 2005-08-29 16:02:29 -07:00
ip_vs_dh.c
ip_vs_est.c
ip_vs_ftp.c
ip_vs_lblc.c [IPVS]: ipv4_table --> ipvs_ipv4_table 2005-08-29 16:02:29 -07:00
ip_vs_lblcr.c [IPVS]: ipv4_table --> ipvs_ipv4_table 2005-08-29 16:02:29 -07:00
ip_vs_lc.c
ip_vs_nq.c
ip_vs_proto_ah.c
ip_vs_proto_esp.c
ip_vs_proto_tcp.c [IPVS]: Rename tcp_{init,exit}() --> ip_vs_tcp_{init,exit}() 2005-08-29 16:01:47 -07:00
ip_vs_proto_udp.c
ip_vs_proto.c [IPVS]: remove net/ipv4/ipvs/ip_vs_proto_icmp.c 2005-06-02 13:02:25 -07:00
ip_vs_rr.c
ip_vs_sched.c
ip_vs_sed.c
ip_vs_sh.c
ip_vs_sync.c [IPVS]: ip_vs_ftp breaks connections using persistence 2005-09-14 21:08:51 -07:00
ip_vs_wlc.c
ip_vs_wrr.c
ip_vs_xmit.c [NETFILTER]: reduce netfilter sk_buff enlargement 2005-08-29 15:31:04 -07:00
Kconfig [NET]: move config options out to individual protocols 2005-07-11 21:13:56 -07:00
Makefile [IPVS]: remove net/ipv4/ipvs/ip_vs_proto_icmp.c 2005-06-02 13:02:25 -07:00