mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-18 20:10:53 +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);
|
||||
|
||||
#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,
|
||||
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).
|
||||
|
@ -246,7 +246,7 @@ struct tcp_pcb {
|
||||
#if LWIP_TCP_SACK_OUT
|
||||
/* SACK ranges to include in ACK packets (entry is invalid if left==right) */
|
||||
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 */
|
||||
|
||||
/* Retransmission timer. */
|
||||
|
Loading…
Reference in New Issue
Block a user