lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #10318] Abort in tcp_input create multiple RST/ACK


From: Stefano Gervasini
Subject: [lwip-devel] [patch #10318] Abort in tcp_input create multiple RST/ACK
Date: Thu, 16 Mar 2023 04:47:44 -0400 (EDT)

URL:
  <https://savannah.nongnu.org/patch/?10318>

                 Summary: Abort in tcp_input create multiple RST/ACK
                   Group: lwIP - A Lightweight TCP/IP stack
               Submitter: gstef
               Submitted: Thu 16 Mar 2023 08:47:42 AM UTC
                Category: TCP
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Thu 16 Mar 2023 08:47:42 AM UTC By: Stefano Gervasini <gstef>

this is my solution, if it is correct

    /* If no matching PCB was found, send a TCP RST (reset) to the
       sender. */
    LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_input: no PCB match found,
resetting.\n"));
    if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) {
      TCP_STATS_INC(tcp.proterr);
      TCP_STATS_INC(tcp.drop);
      tcp_rst_netif(ip_data.current_input_netif, ackno, seqno + tcplen,
ip_current_dest_addr(),
              ip_current_src_addr(), tcphdr->dest, tcphdr->src);
    }
-     pbuf_free(p);
+     pbuf_free(inseg.p);
+     inseg.p = NULL;
  }

  LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane());
  PERF_STOP("tcp_input");
  return;
dropped:
  TCP_STATS_INC(tcp.drop);
  MIB2_STATS_INC(mib2.tcpinerrs);
  pbuf_free(p);
}

hope this help
Best Regards
Stefano







    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?10318>

_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]