drain transport_to_uip at FIN to prevent data delivery after close (eliminates RST storm)
This commit is contained in:
1 parent
4d8ff45586
commit
d042a6dd6a
1 file changed
+3
@@ -276,6 +276,9 @@ static err_t proxy_recv_cb(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t
|
||||
DEBUG_INFO(DEBUG_CATEGORY_SOCKET, "PROXY FIN stream=%016llx tun=1 active=%d", (unsigned long long)(pc->remote_stream_id ? pc->remote_stream_id : 0), pc->active);
|
||||
{ uint16_t wnd_gap = TCP_WND_MAX(pcb) - pcb->rcv_wnd;
|
||||
if (wnd_gap > 0) tcp_recved(pcb, wnd_gap); }
|
||||
if (pc->transport_to_uip) {
|
||||
struct ll_entry* e; while ((e = queue_data_get(pc->transport_to_uip))) { queue_dgram_free(e); queue_entry_free(e); }
|
||||
}
|
||||
pc->closing_tun = 1;
|
||||
return LERR_OK;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user