]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/commitdiff
fixed bug #34111 RST for ACK to listening pcb has wrong seqno
authorSimon Goldschmidt <goldsimon@gmx.de>
Thu, 1 Sep 2011 19:00:11 +0000 (21:00 +0200)
committerSimon Goldschmidt <goldsimon@gmx.de>
Thu, 1 Sep 2011 19:00:11 +0000 (21:00 +0200)
CHANGELOG
src/core/tcp_in.c

index 7cad2831b35963a9e197078cf023e9fb65d18b7d..25f2ccef013971e6074c8344c3cb782b7edded84 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -44,6 +44,9 @@ HISTORY
 
  ++ 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
   * inet6.h: fixed bug #34124 struct in6_addr does not conform to the standard
 
index 316dc3d9f5104b3c749240939c4a4c6d3610c617..9d40ec5356059004fa8d879e1188b1b055456c00 100644 (file)
@@ -448,13 +448,18 @@ tcp_listen_input(struct tcp_pcb_listen *pcb)
   struct tcp_pcb *npcb;
   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,
      creates a new PCB, and responds with a SYN|ACK. */
   if (flags & TCP_ACK) {
     /* For incoming segments with the ACK flag set, respond with a
        RST. */
     LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_listen_input: ACK in LISTEN, sending reset\n"));
-    tcp_rst(ackno + 1, seqno + tcplen, ipX_current_dest_addr(),
+    tcp_rst(ackno, seqno + tcplen, ipX_current_dest_addr(),
       ipX_current_src_addr(), tcphdr->dest, tcphdr->src, ip_current_is_v6());
   } else if (flags & TCP_SYN) {
     LWIP_DEBUGF(TCP_DEBUG, ("TCP connection request %"U16_F" -> %"U16_F".\n", tcphdr->src, tcphdr->dest));