summaryrefslogtreecommitdiff
path: root/net/mptcp/options.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-03-04 21:54:33 -0800
committerJakub Kicinski <kuba@kernel.org>2022-03-04 21:54:34 -0800
commit6dff1574c20b833d702e893caf3592d307be53d4 (patch)
treec7c26b6c725e03803361126edce51fc56e2c0f7f /net/mptcp/options.c
parent43ff0d76f23571e8cfc60bf08af4f89ef78f20f0 (diff)
parent7d9bf018f907bccd04ada1ad9c613a79b07526cd (diff)
Merge branch 'mptcp-selftest-refinements-and-a-new-test'
Mat Martineau says: ==================== mptcp: Selftest refinements and a new test Patches 1 and 11 improve the printed output of the mptcp_join.sh selftest. Patches 2-8 add a test for the MP_FASTCLOSE option, including prerequisite changes like additional MPTCP MIBs. Patches 9-10 add some groundwork for upcoming tests. ==================== Link: https://lore.kernel.org/r/20220304193636.219315-1-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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index ac10a04ccd7c..325383646f5c 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -323,6 +323,7 @@ static void mptcp_parse_option(const struct sk_buff *skb,
mp_opt->rcvr_key = get_unaligned_be64(ptr);
ptr += 8;
mp_opt->suboptions |= OPTION_MPTCP_FASTCLOSE;
+ pr_debug("MP_FASTCLOSE: recv_key=%llu", mp_opt->rcvr_key);
break;
case MPTCPOPT_RST:
@@ -832,11 +833,13 @@ bool mptcp_established_options(struct sock *sk, struct sk_buff *skb,
mptcp_established_options_mp_fail(sk, &opt_size, remaining, opts)) {
*size += opt_size;
remaining -= opt_size;
+ MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_MPFASTCLOSETX);
}
/* MP_RST can be used with MP_FASTCLOSE and MP_FAIL if there is room */
if (mptcp_established_options_rst(sk, skb, &opt_size, remaining, opts)) {
*size += opt_size;
remaining -= opt_size;
+ MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_MPRSTTX);
}
return true;
}
@@ -1124,6 +1127,7 @@ bool mptcp_incoming_options(struct sock *sk, struct sk_buff *skb)
msk->local_key == mp_opt.rcvr_key) {
WRITE_ONCE(msk->rcv_fastclose, true);
mptcp_schedule_work((struct sock *)msk);
+ MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_MPFASTCLOSERX);
}
if ((mp_opt.suboptions & OPTION_MPTCP_ADD_ADDR) &&
@@ -1158,6 +1162,7 @@ bool mptcp_incoming_options(struct sock *sk, struct sk_buff *skb)
subflow->reset_seen = 1;
subflow->reset_reason = mp_opt.reset_reason;
subflow->reset_transient = mp_opt.reset_transient;
+ MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_MPRSTRX);
}
if (!(mp_opt.suboptions & OPTION_MPTCP_DSS))