Thread (10 messages) 10 messages, 6 authors, 2011-09-20

Re: [BUG?] tcp: potential bug in tcp_is_sackblock_valid()

flat view

From: Eric Dumazet <hidden>
Date: 2011-09-18 19:35:52

Le vendredi 09 septembre 2011 à 09:45 +0800, Yan, Zheng a écrit :
quoted hunk ↗ jump to hunk
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))
---
Acked-by: Eric Dumazet <redacted>

This bug was introduced in 2.6.24 by commit 5b3c9882
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help