|
|
|
@ -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; } |
|
|
|
while (lp) { if (lp->local_port == dport_host) return; lp = lp->next; } |
|
|
|
struct tcp_pcb* lpcb = tcp_new(p->lwip); |
|
|
|
struct tcp_pcb* lpcb = tcp_new(p->lwip); |
|
|
|
if (!lpcb) return; |
|
|
|
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); |
|
|
|
struct tcp_pcb* listen_pcb = tcp_listen(lpcb); |
|
|
|
if (listen_pcb) { |
|
|
|
if (listen_pcb) { |
|
|
|
tcp_arg(listen_pcb, p); tcp_accept(listen_pcb, proxy_accept_cb); |
|
|
|
tcp_arg(listen_pcb, p); tcp_accept(listen_pcb, proxy_accept_cb); |
|
|
|
|