mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-16 23:15:37 +00:00
fixed bug #34111 RST for ACK to listening pcb has wrong seqno
This commit is contained in:
parent
6145af516b
commit
a030b741a5
@ -24,6 +24,9 @@ HISTORY
|
|||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2011-09-01: Simon Goldschmidt
|
||||||
|
* tcp_in.c: fixed bug #34111 RST for ACK to listening pcb has wrong seqno
|
||||||
|
|
||||||
2011-08-24: Simon Goldschmidt
|
2011-08-24: Simon Goldschmidt
|
||||||
* api_msg.c, sockets.c: fixed bug #33956 Wrong error returned when calling
|
* api_msg.c, sockets.c: fixed bug #33956 Wrong error returned when calling
|
||||||
accept() on UDP connections
|
accept() on UDP connections
|
||||||
|
@ -444,15 +444,19 @@ tcp_listen_input(struct tcp_pcb_listen *pcb)
|
|||||||
struct tcp_pcb *npcb;
|
struct tcp_pcb *npcb;
|
||||||
err_t rc;
|
err_t rc;
|
||||||
|
|
||||||
|
if (flags & TCP_RST) {
|
||||||
|
/* An incoming RST should be ignored. Return. */
|
||||||
|
return ERR_OK;
|
||||||
|
}
|
||||||
|
|
||||||
/* In the LISTEN state, we check for incoming SYN segments,
|
/* In the LISTEN state, we check for incoming SYN segments,
|
||||||
creates a new PCB, and responds with a SYN|ACK. */
|
creates a new PCB, and responds with a SYN|ACK. */
|
||||||
if (flags & TCP_ACK) {
|
if (flags & TCP_ACK) {
|
||||||
/* For incoming segments with the ACK flag set, respond with a
|
/* For incoming segments with the ACK flag set, respond with a
|
||||||
RST. */
|
RST. */
|
||||||
LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_listen_input: ACK in LISTEN, sending reset\n"));
|
LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_listen_input: ACK in LISTEN, sending reset\n"));
|
||||||
tcp_rst(ackno + 1, seqno + tcplen,
|
tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(),
|
||||||
ip_current_dest_addr(), ip_current_src_addr(),
|
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
|
||||||
tcphdr->dest, tcphdr->src);
|
|
||||||
} else if (flags & TCP_SYN) {
|
} else if (flags & TCP_SYN) {
|
||||||
LWIP_DEBUGF(TCP_DEBUG, ("TCP connection request %"U16_F" -> %"U16_F".\n", tcphdr->src, tcphdr->dest));
|
LWIP_DEBUGF(TCP_DEBUG, ("TCP connection request %"U16_F" -> %"U16_F".\n", tcphdr->src, tcphdr->dest));
|
||||||
#if TCP_LISTEN_BACKLOG
|
#if TCP_LISTEN_BACKLOG
|
||||||
|
Loading…
Reference in New Issue
Block a user