fix tcp_proxy_ensure_outbound_listen: pass network byte order port to tcp_bind

This commit is contained in:
Evgeny committed 2026-05-13 01:37:59 +03:00
1 parent 7872e11444
commit c9de5cdc2a
1 file changed
+1 -1
+1 -1
View File
@@ -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);