aboutsummaryrefslogtreecommitdiffstats
path: root/net/mptcp
diff options
context:
space:
mode:
authorDavide Caratti <dcaratti@redhat.com>2021-04-06 17:16:04 -0700
committerDavid S. Miller <davem@davemloft.net>2021-04-07 14:09:40 -0700
commit07f8252fe0e3c2b6320eeff18bdc5b7fb8845cb3 (patch)
treeecab1b16cc976d788105879860c0b6727b2c76d3 /net/mptcp
parentselftests: mptcp: add the net device name testcase (diff)
downloadlinux-dev-07f8252fe0e3c2b6320eeff18bdc5b7fb8845cb3.tar.xz
linux-dev-07f8252fe0e3c2b6320eeff18bdc5b7fb8845cb3.zip
mptcp: drop all sub-options except ADD_ADDR when the echo bit is set
Current Linux carries echo-ed ADD_ADDR over pure TCP ACKs, so there is no need to add a DSS element that would fit only ADD_ADDR with IPv4 address. Drop the DSS from echo-ed ADD_ADDR, regardless of the IP version. Signed-off-by: Davide Caratti <dcaratti@redhat.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp')
-rw-r--r--net/mptcp/options.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index c7eb61d0564c..d51c3ad54d9a 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -624,7 +624,8 @@ static bool mptcp_established_options_add_addr(struct sock *sk, struct sk_buff *
int len;
if ((mptcp_pm_should_add_signal_ipv6(msk) ||
- mptcp_pm_should_add_signal_port(msk)) &&
+ mptcp_pm_should_add_signal_port(msk) ||
+ mptcp_pm_should_add_signal_echo(msk)) &&
skb && skb_is_tcp_pure_ack(skb)) {
pr_debug("drop other suboptions");
opts->suboptions = 0;