mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-19 05:10:40 +00:00
Fixed LWIP_TCP_SACK_VALID and its usage
This commit is contained in:
parent
6796bcf7ad
commit
1a1c360f1d
@ -1587,7 +1587,7 @@ tcp_receive(struct tcp_pcb *pcb)
|
|||||||
tcp_ack(pcb);
|
tcp_ack(pcb);
|
||||||
|
|
||||||
#if LWIP_TCP_SACK_OUT
|
#if LWIP_TCP_SACK_OUT
|
||||||
if (!LWIP_TCP_SACK_VALID(pcb, 0)) {
|
if (LWIP_TCP_SACK_VALID(pcb, 0)) {
|
||||||
/* Normally the ACK for the data received could be piggy-backed on a data packet,
|
/* Normally the ACK for the data received could be piggy-backed on a data packet,
|
||||||
but lwIP currently does not support including SACKs in data packets. So we force
|
but lwIP currently does not support including SACKs in data packets. So we force
|
||||||
it to respond with an empty ACK packet (only if there is at least one SACK to be sent).
|
it to respond with an empty ACK packet (only if there is at least one SACK to be sent).
|
||||||
|
@ -246,7 +246,7 @@ struct tcp_pcb {
|
|||||||
#if LWIP_TCP_SACK_OUT
|
#if LWIP_TCP_SACK_OUT
|
||||||
/* SACK ranges to include in ACK packets (entry is invalid if left==right) */
|
/* SACK ranges to include in ACK packets (entry is invalid if left==right) */
|
||||||
struct tcp_sack_range rcv_sacks[LWIP_TCP_MAX_SACK_NUM];
|
struct tcp_sack_range rcv_sacks[LWIP_TCP_MAX_SACK_NUM];
|
||||||
#define LWIP_TCP_SACK_VALID(pcb, idx) ((pcb)->rcv_sacks[idx].left == (pcb)->rcv_sacks[idx].right)
|
#define LWIP_TCP_SACK_VALID(pcb, idx) ((pcb)->rcv_sacks[idx].left != (pcb)->rcv_sacks[idx].right)
|
||||||
#endif /* LWIP_TCP_SACK_OUT */
|
#endif /* LWIP_TCP_SACK_OUT */
|
||||||
|
|
||||||
/* Retransmission timer. */
|
/* Retransmission timer. */
|
||||||
|
Loading…
Reference in New Issue
Block a user