patchlwIP - A Lightweight TCP/IP stack - Patches: patch #10318, Abort in tcp_input create multiple...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #10318: Abort in tcp_input create multiple RST/ACK

Submitter:  - <_341661>
Submitted:  Thu 16 Mar 2023 08:47:42 AM UTC
   
 
Category:  TCP Priority:  5 - Normal
Status:  Invalid Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Thu 16 Mar 2023 11:04:02 AM UTC, comment #1: 

Sorry, This Was not Right.

it will interrupt the multipole RST/ACK, but after while stack will stuck.

- <_341661>
Thu 16 Mar 2023 08:47:42 AM UTC, original submission:  


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

- <_341661>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Updated the item)
  • -email is unavailable- added by _341661 (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-05-11 goldsimon StatusNone Invalid
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2023-03-16 _341661 Carbon-CopyRemoved 341661 -

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code