summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorAxel Mierczuk <axel.mierczuk@1password.com>2026-11-03 11:57:46 -0500
committerPablo Neira Ayuso <pablo@netfilter.org>2026-11-16 01:40:31 +0100
commit5c8d6e2596e0935e2ace0b94e86ffb99e8434cd9 (patch)
treea9c98b007aa7b82fcb2e47756c1305cf1c850637 /tools/perf/scripts/python
parent1d1e8bc81f790a48cd643b1b1762de43334d4f14 (diff)
ipvs: skip cport 0 connections in ip_vs_conn_out_get()
ip_vs_conn_out_get() does not filter templates. A template with cport 0 is matched by a packet sent to client port 0 that traverses the out hook, and handle_response() then runs ip_vs_set_state() and the timeout update on a connection that must never see packets. A backup server receives such templates over the unauthenticated sync protocol. An ordinary connection scheduled for a client that uses source port 0 has cport 0 as well and is matched the same way. Apply the rule used by __ip_vs_conn_in_get(): a lookup for client port 0 matches only connections flagged IP_VS_CONN_F_NO_CPORT, which still wait for their cport, and a lookup for a nonzero client port matches only connections without this flag. Test p->vport, which was already compared with cp->cport, instead of reading cp->cport again. ip_vs_ftp_out() relies on the first case: it looks up the data connection with client port 0 to find the IP_VS_CONN_F_NO_CPORT entry created for an earlier PASV or EPSV reply. That lookup keeps working. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Suggested-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Axel Mierczuk <axel.mierczuk@1password.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions