mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 09:16:20 +00:00
tcp_abort/tcp_abandon: don't send RST if pcb->state is CLOSED
This commit is contained in:
parent
84d8760561
commit
dd245c63d7
@ -375,6 +375,7 @@ tcp_abandon(struct tcp_pcb *pcb, int reset)
|
||||
tcp_pcb_remove(&tcp_tw_pcbs, pcb);
|
||||
memp_free(MEMP_TCP_PCB, pcb);
|
||||
} else {
|
||||
int send_rst = reset && (pcb->state != CLOSED);
|
||||
seqno = pcb->snd_nxt;
|
||||
ackno = pcb->rcv_nxt;
|
||||
#if LWIP_CALLBACK_API
|
||||
@ -393,7 +394,7 @@ tcp_abandon(struct tcp_pcb *pcb, int reset)
|
||||
tcp_segs_free(pcb->ooseq);
|
||||
}
|
||||
#endif /* TCP_QUEUE_OOSEQ */
|
||||
if (reset) {
|
||||
if (send_rst) {
|
||||
LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_abandon: sending RST\n"));
|
||||
tcp_rst(seqno, ackno, &pcb->local_ip, &pcb->remote_ip, pcb->local_port, pcb->remote_port, PCB_ISIPV6(pcb));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user