Skip to content

Commit

Permalink
Squash-to: "mptcp: move drop_other_suboptions check under pm lock"
Browse files Browse the repository at this point in the history
Commit message to be updated appending:

"""
Additionally, always drop the other suboption for TCP pure ack:
that makes both the code simpler and the MPTCP behaviour more
consistent.
"""

Signed-off-by: Paolo Abeni <[email protected]>
Signed-off-by: Matthieu Baerts <[email protected]>
  • Loading branch information
Paolo Abeni authored and matttbe committed Jul 28, 2021
1 parent 05edcae commit 9030cfa
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions net/mptcp/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,11 @@ bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, struct sk_buff *skb,
if (!mptcp_pm_should_add_signal(msk))
goto out_unlock;

if ((mptcp_pm_should_add_signal_ipv6(msk) ||
mptcp_pm_should_add_signal_port(msk) ||
mptcp_pm_should_add_signal_echo(msk)) &&
skb && skb_is_tcp_pure_ack(skb)) {
/* always drop every other options for pure ack ADD_ADDR; this is a
* plain dup-ack from TCP perspective. The other MPTCP-relevant info,
* if any, will be carried by the 'original' TCP ack
*/
if (skb && skb_is_tcp_pure_ack(skb)) {
remaining += opt_size;
*drop_other_suboptions = true;
}
Expand Down

0 comments on commit 9030cfa

Please sign in to comment.