Skip to content

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: multipath-tcp/mptcp#474
Fixes: 7835e7847026 ("mptcp: Fix use-after-free in the redundant scheduler")
Signed-off-by: ytxing <[email protected]>
Signed-off-by: Matthieu Baerts <[email protected]>
(cherry picked from commit 5ffee1dcb2617a8a2f496addca614cb56e2e123f)
Signed-off-by: Matthieu Baerts <[email protected]>
(cherry picked from commit 55abfd02c06ac3f7704efb8e94e0099d1965a4bc)
Signed-off-by: Matthieu Baerts <[email protected]>
Signed-off-by: Diaz1401 <[email protected]>
  • Loading branch information
ytxing authored and Diaz1401 committed Aug 30, 2022
1 parent 11c0a1f commit 682e3ee
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 682e3ee

Please sign in to comment.