From b1e50c2838f921d1aa258ce15165d75b5bece389 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Wed, 13 May 2026 01:37:59 +0300 Subject: [PATCH] fix tcp_proxy_ensure_outbound_listen: pass network byte order port to tcp_bind --- src/tcp_proxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tcp_proxy.c b/src/tcp_proxy.c index 134c7efd..c0ce4ff6 100644 --- a/src/tcp_proxy.c +++ b/src/tcp_proxy.c @@ -344,7 +344,7 @@ static void tcp_proxy_ensure_outbound_listen(struct tcp_proxy* p, uint16_t dport while (lp) { if (lp->local_port == dport_host) return; lp = lp->next; } struct tcp_pcb* lpcb = tcp_new(p->lwip); if (!lpcb) return; - tcp_bind(lpcb, INADDR_ANY, dport_host); + tcp_bind(lpcb, INADDR_ANY, dport_net); struct tcp_pcb* listen_pcb = tcp_listen(lpcb); if (listen_pcb) { tcp_arg(listen_pcb, p); tcp_accept(listen_pcb, proxy_accept_cb);