summaryrefslogtreecommitdiffstats
path: root/net/mptcp/options.c
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2021-02-01 15:09:19 -0800
committerJakub Kicinski <kuba@kernel.org>2021-02-02 18:37:20 -0800
commit2fbdd9eaf17448c52788b0bb5dea04acfd7e9635 (patch)
tree49508638dff2d761f13953b728c200801cd9c669 /net/mptcp/options.c
parentd4a7726a79e27d7a117a75cc81f335311d7fc7b8 (diff)
downloadlinux-2fbdd9eaf17448c52788b0bb5dea04acfd7e9635.tar.bz2
mptcp: add the mibs for ADD_ADDR with port
This patch adds the mibs for ADD_ADDR with port: MPTCP_MIB_PORTADD for received ADD_ADDR suboption with a port number. MPTCP_MIB_PORTSYNRX, MPTCP_MIB_PORTSYNACKRX, MPTCP_MIB_PORTACKRX, for received MP_JOIN's SYN or SYN/ACK or ACK with a port number which is different from the msk's port number. MPTCP_MIB_MISMATCHPORTSYNRX and MPTCP_MIB_MISMATCHPORTACKRX, for received SYN or ACK MP_JOIN with a mismatched port-number. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/options.c')
-rw-r--r--net/mptcp/options.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 17ad42c65087..3b71d68b3863 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -1025,6 +1025,10 @@ void mptcp_incoming_options(struct sock *sk, struct sk_buff *skb)
mptcp_pm_del_add_timer(msk, &addr);
MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_ECHOADD);
}
+
+ if (mp_opt.port)
+ MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_PORTADD);
+
mp_opt.add_addr = 0;
}