diff options
author | Geliang Tang <geliangtang@gmail.com> | 2021-02-02 00:09:19 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-02-03 03:37:20 +0100 |
commit | 2fbdd9eaf17448c52788b0bb5dea04acfd7e9635 (patch) | |
tree | 49508638dff2d761f13953b728c200801cd9c669 /net/mptcp/options.c | |
parent | selftests: mptcp: add port argument for pm_nl_ctl (diff) | |
download | linux-2fbdd9eaf17448c52788b0bb5dea04acfd7e9635.tar.xz linux-2fbdd9eaf17448c52788b0bb5dea04acfd7e9635.zip |
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.c | 4 |
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; } |