Browse Source

fix tcp_proxy_ensure_outbound_listen: pass network byte order port to tcp_bind

congestion
Evgeny 5 months ago
parent
commit
b1e50c2838
  1. 2
      src/tcp_proxy.c

2
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);

Loading…
Cancel
Save