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

Commit

Permalink
mptcp: Don't clone empty DATA_FIN in tcp_transmit_skb
Browse files Browse the repository at this point in the history
We did not put the empty DATA_FIN on the subflow's send-queue. Thus, we
should not clone it in tcp_transmit_skb.

Signed-off-by: Christoph Paasch <cpaasch@apple.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
  • Loading branch information
cpaasch authored and matttbe committed Feb 9, 2018
1 parent 3957d58 commit 17683a6
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions net/mptcp/mptcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,20 +518,16 @@ static bool mptcp_skb_entail(struct sock *sk, struct sk_buff *skb, int reinject)
sk->sk_wmem_queued += subskb->truesize;
sk_mem_charge(sk, subskb->truesize);
} else {
int err;

/* Necessary to initialize for tcp_transmit_skb. mss of 1, as
* skb->len = 0 will force tso_segs to 1.
*/
tcp_init_tso_segs(subskb, 1);
/* Empty data-fins are sent immediatly on the subflow */
err = tcp_transmit_skb(sk, subskb, 1, GFP_ATOMIC);

/* It has not been queued, we can free it now. */
kfree_skb(subskb);

if (err)
/* Empty data-fins are sent immediatly on the subflow */
if (tcp_transmit_skb(sk, subskb, 0, GFP_ATOMIC) != 0) {
kfree_skb(subskb);
return false;
}
}

if (!tp->mptcp->fully_established) {
Expand Down

0 comments on commit 17683a6

Please sign in to comment.