mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-18 06:06:57 +08:00
Changed tcp_pcb->snd_queuelen from u8_t to u16_t to prevent overflowing when sending many small packets with big send buffer, added assertions and oveflow checks for snd_queuelen.
This commit is contained in:
@@ -118,8 +118,8 @@ void tcp_rexmit_rto (struct tcp_pcb *pcb);
|
||||
* unacknowledged.
|
||||
*/
|
||||
#define tcp_output_nagle(tpcb) ((((tpcb)->unacked == NULL) || \
|
||||
((tpcb)->flags & TF_NODELAY) || \
|
||||
(((tpcb)->unsent != NULL) && ((tpcb)->unsent->next != NULL))) ? \
|
||||
((tpcb)->flags & TF_NODELAY) || \
|
||||
(((tpcb)->unsent != NULL) && ((tpcb)->unsent->next != NULL))) ? \
|
||||
tcp_output(tpcb) : ERR_OK)
|
||||
|
||||
|
||||
@@ -302,7 +302,8 @@ struct tcp_pcb {
|
||||
u16_t acked;
|
||||
|
||||
u16_t snd_buf; /* Available buffer space for sending (in bytes). */
|
||||
u8_t snd_queuelen; /* Available buffer space for sending (in tcp_segs). */
|
||||
#define TCP_SNDQUEUELEN_OVERFLOW (0xffff-3)
|
||||
u16_t snd_queuelen; /* Available buffer space for sending (in tcp_segs). */
|
||||
|
||||
|
||||
/* These are ordered by sequence number: */
|
||||
|
||||
Reference in New Issue
Block a user