Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
mptcp: redundant: avoid multiple retransmissions
Browse files Browse the repository at this point in the history
Previously redsched_correct_skb_pointers set red_p->skb = NULL when
red_p->skb_start_seq == meta_tp->snd_una.

This issue causes the redundant scheduler to keep sending reinjected
packets again and again.
Replace '!after' with 'before' fixes this issue.

Closes: #474
Fixes: 7835e78 ("mptcp: Fix use-after-free in the redundant scheduler")
Signed-off-by: ytxing <ytxing@mail.ustc.edu.cn>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
(cherry picked from commit 5ffee1d)
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
(cherry picked from commit 55abfd0)
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
  • Loading branch information
ytxing authored and matttbe committed Apr 25, 2022
1 parent 6cd36b3 commit 5a4d81e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mptcp/mptcp_redundant.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static void redsched_correct_skb_pointers(struct sock *meta_sk,
struct tcp_sock *meta_tp = tcp_sk(meta_sk);

if (red_p->skb &&
(!after(red_p->skb_start_seq, meta_tp->snd_una) ||
(before(red_p->skb_start_seq, meta_tp->snd_una) ||
after(red_p->skb_end_seq, meta_tp->snd_nxt)))
red_p->skb = NULL;
}
Expand Down

0 comments on commit 5a4d81e

Please sign in to comment.