Skip to content

Commit

Permalink
tcp: fix validation of D-SACK
Browse files Browse the repository at this point in the history
D-SACK is allowed to reside below snd_una. But the corresponding check
in tcp_is_sackblock_valid() is the exact opposite. It looks like a typo.

Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Zheng Yan authored and David S. Miller committed Sep 19, 2011
1 parent e05c82d commit f779b2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ static int tcp_is_sackblock_valid(struct tcp_sock *tp, int is_dsack,
return 0;

/* ...Then it's D-SACK, and must reside below snd_una completely */
if (!after(end_seq, tp->snd_una))
if (after(end_seq, tp->snd_una))
return 0;

if (!before(start_seq, tp->undo_marker))
Expand Down

0 comments on commit f779b2d

Please sign in to comment.