netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG?] tcp: potential bug in tcp_is_sackblock_valid()
@ 2011-09-09  1:45 Yan, Zheng
  2011-09-09  1:54 ` Herbert Xu
  2011-09-18 19:35 ` Eric Dumazet
  0 siblings, 2 replies; 13+ messages in thread
From: Yan, Zheng @ 2011-09-09  1:45 UTC (permalink / raw)
  To: netdev, davem, eric.dumazet, herbert, 

Hi all,

I found a check in tcp_is_sackblock_valid() is suspicious. It against
its comment and RFC. I think the correct check should be:

---
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 385c470..a5d01b1 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -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))
---

I also checked /proc/net/netstat of my laptop, found TCPDSACKIgnoredOld
field is not zero. Maybe it's caused by the bug.

Regards
Yan, Zheng

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-09-20 18:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-09  1:45 [BUG?] tcp: potential bug in tcp_is_sackblock_valid() Yan, Zheng
2011-09-09  1:54 ` Herbert Xu
2011-09-09  2:10   ` Yan, Zheng
2011-09-09  8:03     ` Ilpo Järvinen
     [not found]       ` <CAA93jw7L9KyXVevZ8dqE+ExLYP9=CLMmj1gPD88ihBuC6ZovOQ@mail.gmail.com>
2011-09-18 20:39         ` Eric Dumazet
2011-09-18 21:04           ` Dave Taht
2011-09-18 21:20             ` Hagen Paul Pfeifer
2011-09-18 19:35 ` Eric Dumazet
2011-09-19  1:07   ` David Miller
2011-09-19  2:05     ` [PATCH] tcp: fix validation of D-SACK Yan, Zheng
2011-09-19  2:37       ` David Miller
2011-09-19 17:29         ` Jan Ceuleers
2011-09-20 18:50           ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).