From patchwork Fri Oct 18 15:57:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthieu Baerts (NGI0)" X-Patchwork-Id: 13841997 X-Patchwork-Delegate: matthieu.baerts@tessares.net Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84B48165EFC; Fri, 18 Oct 2024 15:57:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729267064; cv=none; b=LNkut2UyEbd7Ht5sCYuyURlUBmcrz3YpeD927GthTdLyPQDEbD5XlqaeBlFog2PezB1Jy64L1NkJKW6zvBfx6Ml1fhEG8G4FF5I26+85EX07oBQlESrHdiOqM1a0m62t4fpKgPCGysYC2ujhj6cZMzobDOVWBxsD7gee7LxV9l4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729267064; c=relaxed/simple; bh=hgmCfXN7zb5NM42rp2ri8PhqNTuLoEUfBsDo6ywwaY4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NyrkhPkwP5Id4oXChBizFmzngb55EFeYwTC6dWnFHRHwXCWT+djGqbtYkR6mxEx+5EcGM9U4OwJnT4wqKKc40CDR+HpkYwg4uFctO+/YS3ZYomJc1cA7QSan2trZp1l98Wt6rhneVMYMlnOOaQuqv0u/eEwYnuNm5farPKsadJM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ThJbuAkM; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ThJbuAkM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CAC1C4CED1; Fri, 18 Oct 2024 15:57:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729267064; bh=hgmCfXN7zb5NM42rp2ri8PhqNTuLoEUfBsDo6ywwaY4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ThJbuAkMdXZmD7oj92M7pSpzR9aXh0gonD6rCf24G1G2I2rif4osRTg3ok/wG+OK4 /KljU8aRvPyKZAUHqGmud25Oss2ElOzOCDsTl5ot4wmi5/vt9OymXOg7LMrdB/Wgl7 rihC4iuJQW1ii6NAQnifsB9u4jcl7SF4tEal6X6OoXgmdPhgpMidIJaEL2LO9FqUb0 3gjGfgJqHl4PlqS30kWW+6kvf4bHoflilEXC/S18i6QpVdqGfJ8jDfKvVBhJpk11jZ Ks331XpktPkli4L+jlK9glI27HRFO3VohxJeaXSDISGX+4ELQ4gMbPWGP335FRUPHp CW44bsfKokwbQ== From: "Matthieu Baerts (NGI0)" To: mptcp@lists.linux.dev, stable@vger.kernel.org, gregkh@linuxfoundation.org Cc: Paolo Abeni , sashal@kernel.org, syzbot+d1bff73460e33101f0e7@syzkaller.appspotmail.com, Matthieu Baerts , Jakub Kicinski Subject: [PATCH 6.6.y 1/4] tcp: fix mptcp DSS corruption due to large pmtu xmit Date: Fri, 18 Oct 2024 17:57:36 +0200 Message-ID: <20241018155734.2548697-7-matttbe@kernel.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241018155734.2548697-6-matttbe@kernel.org> References: <20241018155734.2548697-6-matttbe@kernel.org> Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=7325; i=matttbe@kernel.org; h=from:subject; bh=FYrV7BRn2lHPNOR5tk2DVS3bwyeq6k5KQxj8xkI0QL0=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBnEoVuOU4seWKM5unCSEKZQZOn+/Yj3MQr+nWP5 3yjpDhvx76JAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZxKFbgAKCRD2t4JPQmmg c/RMD/9D8c/HBnJinZ7qvF0IABHAlKKHPUsL+DdkJtnWKbV3CifH/KEUzdEG1NfcS+jOLaC85sD qOY8eQXF1k9UvqK4AS5ukZWjtEsqTk3IlvmWjcsClaSgKs+52T29LqAd3ULLU6Lkc4jsI9r71tJ RS9raT1c5UVoCWgvrd42PadnguA37dTDy3BaXfqbLtJ0ImH2oNXHkhhIoBmwZSVJFkGMSygPvEm g43CP5E3/JABek+M2776zyjKECJXUN0x82uFgNMyVUpX9phB78TWEeyLEWBntUUv6dzIjlJUEQg mv44DgmpwClACeTLEoyn5auUiPFqj/da1fD9s+7wpGH0L4Cv7+b8uCkp3wH4yfqwAylAGrGqx6f vBrmwO8vOruw/aena3hlVBPJUAndG5dG/8kt2GfFXrJIwUqk8gjJrWr+BK3c7y4lvekobxSOWeL pA3DquRw+ZnQk9RUgPTEtoXHwXgeoaY9Vy0ENSlrdtLeLw+sjIZKDDszRknF/D8mEKILLdIfzl7 MakGynVBu2KGtWnpsll/CF+GJsuAdcxCm6aeuZgOk3gw+/pTm/7RCHIrTsYz5f93Gmg3KPUumSG YoWLisSOFPAF48FONFWH/hNgSKKsTpn82qRtmyDSlbahv5/4SMYxEJnkChVFjdPpY23OqxWcheA Y1FrtM14VutZrEA== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 From: Paolo Abeni commit 4dabcdf581217e60690467a37c956a5b8dbc6bd9 upstream. Syzkaller was able to trigger a DSS corruption: TCP: request_sock_subflow_v4: Possible SYN flooding on port [::]:20002. Sending cookies. ------------[ cut here ]------------ WARNING: CPU: 0 PID: 5227 at net/mptcp/protocol.c:695 __mptcp_move_skbs_from_subflow+0x20a9/0x21f0 net/mptcp/protocol.c:695 Modules linked in: CPU: 0 UID: 0 PID: 5227 Comm: syz-executor350 Not tainted 6.11.0-syzkaller-08829-gaf9c191ac2a0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 RIP: 0010:__mptcp_move_skbs_from_subflow+0x20a9/0x21f0 net/mptcp/protocol.c:695 Code: 0f b6 dc 31 ff 89 de e8 b5 dd ea f5 89 d8 48 81 c4 50 01 00 00 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc e8 98 da ea f5 90 <0f> 0b 90 e9 47 ff ff ff e8 8a da ea f5 90 0f 0b 90 e9 99 e0 ff ff RSP: 0018:ffffc90000006db8 EFLAGS: 00010246 RAX: ffffffff8ba9df18 RBX: 00000000000055f0 RCX: ffff888030023c00 RDX: 0000000000000100 RSI: 00000000000081e5 RDI: 00000000000055f0 RBP: 1ffff110062bf1ae R08: ffffffff8ba9cf12 R09: 1ffff110062bf1b8 R10: dffffc0000000000 R11: ffffed10062bf1b9 R12: 0000000000000000 R13: dffffc0000000000 R14: 00000000700cec61 R15: 00000000000081e5 FS: 000055556679c380(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020287000 CR3: 0000000077892000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: move_skbs_to_msk net/mptcp/protocol.c:811 [inline] mptcp_data_ready+0x29c/0xa90 net/mptcp/protocol.c:854 subflow_data_ready+0x34a/0x920 net/mptcp/subflow.c:1490 tcp_data_queue+0x20fd/0x76c0 net/ipv4/tcp_input.c:5283 tcp_rcv_established+0xfba/0x2020 net/ipv4/tcp_input.c:6237 tcp_v4_do_rcv+0x96d/0xc70 net/ipv4/tcp_ipv4.c:1915 tcp_v4_rcv+0x2dc0/0x37f0 net/ipv4/tcp_ipv4.c:2350 ip_protocol_deliver_rcu+0x22e/0x440 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x341/0x5f0 net/ipv4/ip_input.c:233 NF_HOOK+0x3a4/0x450 include/linux/netfilter.h:314 NF_HOOK+0x3a4/0x450 include/linux/netfilter.h:314 __netif_receive_skb_one_core net/core/dev.c:5662 [inline] __netif_receive_skb+0x2bf/0x650 net/core/dev.c:5775 process_backlog+0x662/0x15b0 net/core/dev.c:6107 __napi_poll+0xcb/0x490 net/core/dev.c:6771 napi_poll net/core/dev.c:6840 [inline] net_rx_action+0x89b/0x1240 net/core/dev.c:6962 handle_softirqs+0x2c5/0x980 kernel/softirq.c:554 do_softirq+0x11b/0x1e0 kernel/softirq.c:455 __local_bh_enable_ip+0x1bb/0x200 kernel/softirq.c:382 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:919 [inline] __dev_queue_xmit+0x1764/0x3e80 net/core/dev.c:4451 dev_queue_xmit include/linux/netdevice.h:3094 [inline] neigh_hh_output include/net/neighbour.h:526 [inline] neigh_output include/net/neighbour.h:540 [inline] ip_finish_output2+0xd41/0x1390 net/ipv4/ip_output.c:236 ip_local_out net/ipv4/ip_output.c:130 [inline] __ip_queue_xmit+0x118c/0x1b80 net/ipv4/ip_output.c:536 __tcp_transmit_skb+0x2544/0x3b30 net/ipv4/tcp_output.c:1466 tcp_transmit_skb net/ipv4/tcp_output.c:1484 [inline] tcp_mtu_probe net/ipv4/tcp_output.c:2547 [inline] tcp_write_xmit+0x641d/0x6bf0 net/ipv4/tcp_output.c:2752 __tcp_push_pending_frames+0x9b/0x360 net/ipv4/tcp_output.c:3015 tcp_push_pending_frames include/net/tcp.h:2107 [inline] tcp_data_snd_check net/ipv4/tcp_input.c:5714 [inline] tcp_rcv_established+0x1026/0x2020 net/ipv4/tcp_input.c:6239 tcp_v4_do_rcv+0x96d/0xc70 net/ipv4/tcp_ipv4.c:1915 sk_backlog_rcv include/net/sock.h:1113 [inline] __release_sock+0x214/0x350 net/core/sock.c:3072 release_sock+0x61/0x1f0 net/core/sock.c:3626 mptcp_push_release net/mptcp/protocol.c:1486 [inline] __mptcp_push_pending+0x6b5/0x9f0 net/mptcp/protocol.c:1625 mptcp_sendmsg+0x10bb/0x1b10 net/mptcp/protocol.c:1903 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x1a6/0x270 net/socket.c:745 ____sys_sendmsg+0x52a/0x7e0 net/socket.c:2603 ___sys_sendmsg net/socket.c:2657 [inline] __sys_sendmsg+0x2aa/0x390 net/socket.c:2686 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb06e9317f9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe2cfd4f98 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fb06e97f468 RCX: 00007fb06e9317f9 RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000000000005 RBP: 00007fb06e97f446 R08: 0000555500000000 R09: 0000555500000000 R10: 0000555500000000 R11: 0000000000000246 R12: 00007fb06e97f406 R13: 0000000000000001 R14: 00007ffe2cfd4fe0 R15: 0000000000000003 Additionally syzkaller provided a nice reproducer. The repro enables pmtu on the loopback device, leading to tcp_mtu_probe() generating very large probe packets. tcp_can_coalesce_send_queue_head() currently does not check for mptcp-level invariants, and allowed the creation of cross-DSS probes, leading to the mentioned corruption. Address the issue teaching tcp_can_coalesce_send_queue_head() about mptcp using the tcp_skb_can_collapse(), also reducing the code duplication. Fixes: 85712484110d ("tcp: coalesce/collapse must respect MPTCP extensions") Cc: stable@vger.kernel.org Reported-by: syzbot+d1bff73460e33101f0e7@syzkaller.appspotmail.com Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/513 Signed-off-by: Paolo Abeni Acked-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20241008-net-mptcp-fallback-fixes-v1-2-c6fb8e93e551@kernel.org Signed-off-by: Jakub Kicinski [ Conflict in tcp_output.c, because the commit 65249feb6b3d ("net: add support for skbs with unreadable frags") is not in this version. This commit is linked to a new feature (Devmem TCP) and introduces a new condition which causes the conflicts. Resolving this is easy: we can ignore the missing new condition, and use tcp_skb_can_collapse() like in the original patch. ] Signed-off-by: Matthieu Baerts (NGI0) --- net/ipv4/tcp_output.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 15c49d559db5..328640d9b607 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -2314,9 +2314,7 @@ static bool tcp_can_coalesce_send_queue_head(struct sock *sk, int len) if (len <= skb->len) break; - if (unlikely(TCP_SKB_CB(skb)->eor) || - tcp_has_tx_tstamp(skb) || - !skb_pure_zcopy_same(skb, next)) + if (tcp_has_tx_tstamp(skb) || !tcp_skb_can_collapse(skb, next)) return false; len -= skb->len; From patchwork Fri Oct 18 15:57:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthieu Baerts (NGI0)" X-Patchwork-Id: 13841998 X-Patchwork-Delegate: matthieu.baerts@tessares.net Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A878165EFC; Fri, 18 Oct 2024 15:57:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729267066; cv=none; b=WH55cwZg7hLZ0K/o8nBygboYfu136Biy8hdx5n2yPr1ztMwPRJfggPXXuaxy/1+3438dUNoJZA8KGFyEpLDS9VV17Dpzi7piZTBhg77c7FKUYuHU2PgQro62ykfwwASkgtT6XZ8w0O1LmyKTOF9mxNhvj3ryf79dw+eAu6Adzqk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729267066; c=relaxed/simple; bh=tWNhPea+zirvXFgOKuVM0VMVU2hRLLxF5oPkOM1U2pc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HqdJV5VrRLhdRwbJoxJdV0NYpY5gYtROhd9et5Q7mkoMQEgbgQ3z3se0MHRO9yGA0qFJdptI9hYn9nAd3EEOL7xPmRdsPhf+EdKUCuCe58Xa6HpbOAOLEw+O49vgIejOOP0ZbJBovJrMi7Ni3tDdJu7ALdrTuISgLtUudsSqD/o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nTq6GghC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nTq6GghC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 977A3C4CECF; Fri, 18 Oct 2024 15:57:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729267066; bh=tWNhPea+zirvXFgOKuVM0VMVU2hRLLxF5oPkOM1U2pc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nTq6GghCnHXrCXv4RaI/CKlzSXkFy3eYC5hMObpku8xzqj26VhC8NzzMAplFJMjNr 9EfcV38+UgCQUOUhW4RU6ER7KvtBq8kGUdJoT6lONNS4zbFcNyPSUftbuZYwcS+fHu MNI7wejR2hS3BXmXAgD84tJJK4CICY43QPv6zH6aBDg/R/h0XPobXVleHeFiBeQUMs RsobSDkZbU9gcKA/ldUuZ955oXgMX3VC/vZi5T7kiW4NYvIp4GBJ1wc8bAxNNPtdhZ hiLG/4gotZMHwU7NRBpxHvMQr666YNRo02ylGe+wpiOaqrXINew2apUKMsndtKkeAu kzpqKfMY1IH6A== From: "Matthieu Baerts (NGI0)" To: mptcp@lists.linux.dev, stable@vger.kernel.org, gregkh@linuxfoundation.org Cc: Geliang Tang , sashal@kernel.org, Matthieu Baerts , Jakub Kicinski Subject: [PATCH 6.6.y 2/4] selftests: mptcp: join: change capture/checksum as bool Date: Fri, 18 Oct 2024 17:57:37 +0200 Message-ID: <20241018155734.2548697-8-matttbe@kernel.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241018155734.2548697-6-matttbe@kernel.org> References: <20241018155734.2548697-6-matttbe@kernel.org> Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3062; i=matttbe@kernel.org; h=from:subject; bh=/+HyxqZPJ7nD2CH4P7GeX+tTHgjxcRy0VEoFaYxH6Qc=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBnEoVu9sf/XKTUIiZwZQNDff4werXAxBnC6CLX/ LV58nHlXm2JAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZxKFbgAKCRD2t4JPQmmg c/qLEADnMLWhrS2OSENiGcv8ewn7gh4jWJoxY45wOnoC4+lSaR4nSDX9DdAyUIUlaONum1Fd2QX 4H0EENqKHlmEYqFYVFFWK25W1Vvm+PLe7V+GOSIZDbPs+71i85pCKCNevQ1Bny290jFjQHU5uVL 9JOLTPGzbGw/KA2XBbyc7VQXsIIrW3TmeYwyVA1PkDIcXvA1jeae0zdqsHa60IDi5AW1eRtbFvb RQKG1BzzN4ZrwhqX18DvMvzqOXBO8aybFCuGgbjzED/NNHKbco+eXngJI/NpZOEDp9+oXMy2lVm 9It/WmuWRcA6pcPvgosY6OlBHYhoKxfwpKHSz1urcYsDduKm1Pi52O+RamlJwH8maAvzholLBwd tnx17aYCrI8AcVcw4APwDqLFxK8FGI3NtuUEcFQLY8DJeaUtcjgGlJ2SG6u6K361Y8k/JB7opmX eCK37sJHm2kSbd4ezV6P4KnUELG2f+LzGCjT9xR2JVrMnBq4ZNPI6CH56ESlM8E1/oWpb8OreGL FG5lBV6/+8YW/osV+NJ6vuA4rx7EeBH0nZySH5OwUfAZZIUNOTnNKUgBTblOP9S7UQL4zv3aVyu owJFFlHteI3RkVctQPZBPpkI3gDANU6yhY5cGX0dy7Qwtyf7Jto/NZ1n0u/23p4bKkLMT1iA5Fi yFvhgViwaDL7q9w== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 From: Geliang Tang commit 8c6f6b4bb53a904f922dfb90d566391d3feee32c upstream. To maintain consistency with other scripts, this patch changes vars 'capture' and 'checksum' as bool vars in mptcp_join. Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240223-upstream-net-next-20240223-misc-improvements-v1-7-b6c8a10396bd@kernel.org Signed-off-by: Jakub Kicinski Stable-dep-of: 5afca7e996c4 ("selftests: mptcp: join: test for prohibited MPC to port-based endp") Signed-off-by: Matthieu Baerts (NGI0) --- .../testing/selftests/net/mptcp/mptcp_join.sh | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 3c286fba8d5d..a21376b0f61d 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -30,11 +30,11 @@ iptables="iptables" ip6tables="ip6tables" timeout_poll=30 timeout_test=$((timeout_poll * 2 + 1)) -capture=0 -checksum=0 +capture=false +checksum=false ip_mptcp=0 check_invert=0 -validate_checksum=0 +validate_checksum=false init=0 evts_ns1="" evts_ns2="" @@ -99,7 +99,7 @@ init_partial() ip netns exec $netns sysctl -q net.mptcp.pm_type=0 2>/dev/null || true ip netns exec $netns sysctl -q net.ipv4.conf.all.rp_filter=0 ip netns exec $netns sysctl -q net.ipv4.conf.default.rp_filter=0 - if [ $checksum -eq 1 ]; then + if $checksum; then ip netns exec $netns sysctl -q net.mptcp.checksum_enabled=1 fi done @@ -386,7 +386,7 @@ reset_with_checksum() ip netns exec $ns1 sysctl -q net.mptcp.checksum_enabled=$ns1_enable ip netns exec $ns2 sysctl -q net.mptcp.checksum_enabled=$ns2_enable - validate_checksum=1 + validate_checksum=true } reset_with_allow_join_id0() @@ -419,7 +419,7 @@ reset_with_allow_join_id0() setup_fail_rules() { check_invert=1 - validate_checksum=1 + validate_checksum=true local i="$1" local ip="${2:-4}" local tables @@ -1024,7 +1024,7 @@ do_transfer() :> "$sout" :> "$capout" - if [ $capture -eq 1 ]; then + if $capture; then local capuser if [ -z $SUDO_USER ] ; then capuser="" @@ -1125,7 +1125,7 @@ do_transfer() wait $spid local rets=$? - if [ $capture -eq 1 ]; then + if $capture; then sleep 1 kill $cappid fi @@ -1514,7 +1514,7 @@ chk_join_nr() else print_ok fi - if [ $validate_checksum -eq 1 ]; then + if $validate_checksum; then chk_csum_nr $csum_ns1 $csum_ns2 chk_fail_nr $fail_nr $fail_nr chk_rst_nr $rst_nr $rst_nr @@ -3960,10 +3960,10 @@ while getopts "${all_tests_args}cCih" opt; do tests+=("${all_tests[${opt}]}") ;; c) - capture=1 + capture=true ;; C) - checksum=1 + checksum=true ;; i) ip_mptcp=1 From patchwork Fri Oct 18 15:57:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthieu Baerts (NGI0)" X-Patchwork-Id: 13841999 X-Patchwork-Delegate: matthieu.baerts@tessares.net Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B3BCB165EFC; Fri, 18 Oct 2024 15:57:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729267068; cv=none; b=aWDH8v/AqEOIuyA17wMWsBBzNtSNswLVcLdPH5dDt3Y6Y91y2bkFdxcEDW8p0KNM2hKTM4KL/UUgDTjtoAqufNiUHF8PXcaei5jObENZtWrr46xm56YnRIloPTAh137pDxqf3ovdCdJ/9S6fMZ2EkX4Jd2uVMTVg/koJcRe3XZI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729267068; c=relaxed/simple; bh=qo6r/mw8oUE9DD2fRzr4sCwXq4FPKMbhhVDz0oHu4g0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KTO3t4gIx6S7nwxEyM31ihf3sopPsN5HW6m+sUSgUHY+Z4qrNdnI3fuvPkmuTtu2mZSpw7l8NauqgQDKj/shbhJWKjoK94nCZgDN8HQ4h+HL/iSXdrZ3z9AIsev5mMXil3H1+L6aJYxPk14QLRIRnEoixpKrnA/OzZUvcXL95II= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pxDjPB9D; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pxDjPB9D" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5D18C4CEC7; Fri, 18 Oct 2024 15:57:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729267068; bh=qo6r/mw8oUE9DD2fRzr4sCwXq4FPKMbhhVDz0oHu4g0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pxDjPB9DharNY3H1ORgKAzGSmohIMh2rm0C/sLhus02evk2mH+RLfKe2XfESkWIkb kq9cudYIEGgUqsc+urTs41e48zumiMfxeH7HOsIdVx4sS5GxnCHxavREmubuaNt73X AVBoX7cQTw3tUNYiJuAuXbzZC6hJHKE9CFm7uNGnpsYU5RlZ5rW+OT88ezSN/5036S yf/780tSjE+/7t/y9IVRvWs23NqzojPSlcVimTexxaYe5GgZ+lssLPxjsBdsaKuTYJ 2DK2QfEC6w3XABsRiM6GTUY5bKHJRyUSVJvGUGYj51A4OgCNsNBrFMWAPBc3cwJooZ NaHJ1+h5a9DMg== From: "Matthieu Baerts (NGI0)" To: mptcp@lists.linux.dev, stable@vger.kernel.org, gregkh@linuxfoundation.org Cc: Paolo Abeni , sashal@kernel.org, Matthieu Baerts , Mat Martineau , Jakub Kicinski Subject: [PATCH 6.6.y 3/4] selftests: mptcp: join: test for prohibited MPC to port-based endp Date: Fri, 18 Oct 2024 17:57:38 +0200 Message-ID: <20241018155734.2548697-9-matttbe@kernel.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241018155734.2548697-6-matttbe@kernel.org> References: <20241018155734.2548697-6-matttbe@kernel.org> Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5983; i=matttbe@kernel.org; h=from:subject; bh=k+Xh3xbMiatTkG5lalMrGfe9U2p513cAqnUCtPHiMbE=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBnEoVuS0rHOY21lmMlCUaSf1RUg2tJcTn4q+arE aKHbpr3AN6JAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZxKFbgAKCRD2t4JPQmmg cxE/EADxO6yviDnmj5lsHYB748pmbvG0s++t6ImmFy0CB6Ta0HnU/9FHTBLnzMgqiLpE58cNpwg F/i0Inba1yZjLIDvPACTl7Iml+LN7HMKejscxWR9mf5s2rDfQZ8krGbz3ZIvsN4tCPtotMa5pft x0BAHTvauixGcQj/34RY/mCa3KEci6VAJ/pqzvsBEkGE5qP3BCZ2iFXwnX44Z/hO+DRwJtZAkW3 3FkjaOWFFwLBOFQgjku4ilp2P0C6valfc0IA8GrNHJfKF+6k93ZjPkHlBt/VYqgH8YFQ6cJ70B4 XFA2HCAiQwFhY8MDSJeJ+bKIoHONk5o//kcMWjsXaLnZpSu9DYn63sOLqxTuADt5C8nJkjYgqq2 taFMNNxtqTivx0i1P9sX6pxnOjWhP8M32UAD10P+mCgUmXpSBmIqOXhTQ0J2RewzfV8/Qg+stRQ jEHfBfQwME6DWJKek6BSl3+HNXJFFJk3GAZTHB3qPToDqrE3wFxrCbqK02qC+diZmQBuzRPBKgL NUemsxOEvRGvRXSaPKHB+XZN2tCMC9jSS+XSDKlxh0ON0xhTZUwmZa+3TG60YsOEsonvOu5CELH gj5Yz/Eq09JcdzvA5jqOI0cDGgARRRHi16TTppxHttLFls0ob3UgPDFR/Z9bekk06fVB5aDdyRD sj/7K4OO71dpljw== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 From: Paolo Abeni commit 5afca7e996c42aed1b4a42d4712817601ba42aff upstream. Explicitly verify that MPC connection attempts towards a port-based signal endpoint fail with a reset. Note that this new test is a bit different from the other ones, not using 'run_tests'. It is then needed to add the capture capability, and the picking the right port which have been extracted into three new helpers. The info about the capture can also be printed from a single point, which simplifies the exit paths in do_transfer(). The 'Fixes' tag here below is the same as the one from the previous commit: this patch here is not fixing anything wrong in the selftests, but it validates the previous fix for an issue introduced by this commit ID. Fixes: 1729cf186d8a ("mptcp: create the listening socket for new port") Cc: stable@vger.kernel.org Co-developed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20241014-net-mptcp-mpc-port-endp-v2-2-7faea8e6b6ae@kernel.org Signed-off-by: Jakub Kicinski [ Conflicts in mptcp_join.sh, because commit 0bd962dd86b2 ("selftests: mptcp: join: check CURRESTAB counters"), and commit 9e6a39ecb9a1 ("selftests: mptcp: export TEST_COUNTER variable") are linked to new features, not available in this version. Resolving the conflicts is easy, simply adding the new helpers before do_transfer(), and rename MPTCP_LIB_TEST_COUNTER to TEST_COUNT that was used before. ] Signed-off-by: Matthieu Baerts (NGI0) --- .../testing/selftests/net/mptcp/mptcp_join.sh | 117 +++++++++++++----- 1 file changed, 86 insertions(+), 31 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index a21376b0f61d..17ace5627ce3 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -23,6 +23,7 @@ tmpfile="" cout="" err="" capout="" +cappid="" ns1="" ns2="" ksft_skip=4 @@ -1006,6 +1007,44 @@ pm_nl_set_endpoint() fi } +cond_start_capture() +{ + local ns="$1" + + :> "$capout" + + if $capture; then + local capuser capfile + if [ -z $SUDO_USER ]; then + capuser="" + else + capuser="-Z $SUDO_USER" + fi + + capfile=$(printf "mp_join-%02u-%s.pcap" "$TEST_COUNT" "$ns") + + echo "Capturing traffic for test $TEST_COUNT into $capfile" + ip netns exec "$ns" tcpdump -i any -s 65535 -B 32768 $capuser -w "$capfile" > "$capout" 2>&1 & + cappid=$! + + sleep 1 + fi +} + +cond_stop_capture() +{ + if $capture; then + sleep 1 + kill $cappid + cat "$capout" + fi +} + +get_port() +{ + echo "$((10000 + TEST_COUNT - 1))" +} + do_transfer() { local listener_ns="$1" @@ -1013,33 +1052,17 @@ do_transfer() local cl_proto="$3" local srv_proto="$4" local connect_addr="$5" + local port - local port=$((10000 + TEST_COUNT - 1)) - local cappid local FAILING_LINKS=${FAILING_LINKS:-""} local fastclose=${fastclose:-""} local speed=${speed:-"fast"} + port=$(get_port) :> "$cout" :> "$sout" - :> "$capout" - if $capture; then - local capuser - if [ -z $SUDO_USER ] ; then - capuser="" - else - capuser="-Z $SUDO_USER" - fi - - capfile=$(printf "mp_join-%02u-%s.pcap" "$TEST_COUNT" "${listener_ns}") - - echo "Capturing traffic for test $TEST_COUNT into $capfile" - ip netns exec ${listener_ns} tcpdump -i any -s 65535 -B 32768 $capuser -w $capfile > "$capout" 2>&1 & - cappid=$! - - sleep 1 - fi + cond_start_capture ${listener_ns} NSTAT_HISTORY=/tmp/${listener_ns}.nstat ip netns exec ${listener_ns} \ nstat -n @@ -1125,10 +1148,7 @@ do_transfer() wait $spid local rets=$? - if $capture; then - sleep 1 - kill $cappid - fi + cond_stop_capture NSTAT_HISTORY=/tmp/${listener_ns}.nstat ip netns exec ${listener_ns} \ nstat | grep Tcp > /tmp/${listener_ns}.out @@ -1144,7 +1164,6 @@ do_transfer() ip netns exec ${connector_ns} ss -Menita 1>&2 -o "dport = :$port" cat /tmp/${connector_ns}.out - cat "$capout" return 1 fi @@ -1161,13 +1180,7 @@ do_transfer() fi rets=$? - if [ $retc -eq 0 ] && [ $rets -eq 0 ];then - cat "$capout" - return 0 - fi - - cat "$capout" - return 1 + [ $retc -eq 0 ] && [ $rets -eq 0 ] } make_file() @@ -2944,6 +2957,32 @@ verify_listener_events() fail_test "$e_type:$type $e_family:$family $e_saddr:$saddr $e_sport:$sport" } +chk_mpc_endp_attempt() +{ + local retl=$1 + local attempts=$2 + + print_check "Connect" + + if [ ${retl} = 124 ]; then + fail_test "timeout on connect" + elif [ ${retl} = 0 ]; then + fail_test "unexpected successful connect" + else + print_ok + + print_check "Attempts" + count=$(mptcp_lib_get_counter ${ns1} "MPTcpExtMPCapableEndpAttempt") + if [ -z "$count" ]; then + print_skip + elif [ "$count" != "$attempts" ]; then + fail_test "got ${count} MPC attempt[s] on port-based endpoint, expected ${attempts}" + else + print_ok + fi + fi +} + add_addr_ports_tests() { # signal address with port @@ -3034,6 +3073,22 @@ add_addr_ports_tests() chk_join_nr 2 2 2 chk_add_nr 2 2 2 fi + + if reset "port-based signal endpoint must not accept mpc"; then + local port retl count + port=$(get_port) + + cond_start_capture ${ns1} + pm_nl_add_endpoint ${ns1} 10.0.2.1 flags signal port ${port} + mptcp_lib_wait_local_port_listen ${ns1} ${port} + + timeout 1 ip netns exec ${ns2} \ + ./mptcp_connect -t ${timeout_poll} -p $port -s MPTCP 10.0.2.1 >/dev/null 2>&1 + retl=$? + cond_stop_capture + + chk_mpc_endp_attempt ${retl} 1 + fi } syncookies_tests() From patchwork Fri Oct 18 15:57:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthieu Baerts (NGI0)" X-Patchwork-Id: 13842000 X-Patchwork-Delegate: matthieu.baerts@tessares.net Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7192C165EFC; Fri, 18 Oct 2024 15:57:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729267070; cv=none; b=dnWeGeev86TccAAg/yrKHxEJItZLy01QOWiP08irpVXqL4QlBWquJqIlsUkpe/wIlnYQwf5TpjYLZxIuOMm+ZEQVGjCpBCb1UbX/QG33bQzTe+DvYbk7cJoKjRYGNKAbUGZqLeIfBCuwtzv4+gHnqrDiHVvY+50jXFgLTSzbA9M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729267070; c=relaxed/simple; bh=tCucLaoTh+MK0+9epP2qdVz9E2vSr9Thdxbczad7Uok=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OQyTR7fwCdTfdibxjZE5a0Zx11LdTKeXLZTbvXARcY1S0Tf+Y3sEubYzHbRDfDTifOqu8YPhrg8eL23xDCr5O4cwRgq9QrHyWjp83jMhWlxi0nBGouI7y4SKdET+LBeLkT+gx8t0E0sa1MCniTGKoA+bZPwmA+6s1HD2bX247F4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Z3AP21HZ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Z3AP21HZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A6DEC4CECF; Fri, 18 Oct 2024 15:57:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729267070; bh=tCucLaoTh+MK0+9epP2qdVz9E2vSr9Thdxbczad7Uok=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z3AP21HZ1an+4Q75Yq61EiRET33dJpnmBNuEKSDlgR6oxgwidfmJjX9+Jo27WZ9wz gLBUJQL9vlJzzvSJIOTY0kN6sjw/CxmR3ZqpWffOVRPBDBs4Vrges+UF781qe7HwNx 8gfhyN69lyA8IEjq/ojaLyF95Upr5v0Stp8GxRBsLNhRIu+3O7ZO07JUpTq+tG4BZk L7zAr9bIEj8T81zyJyDAxqDGpxjh8yJVHtIf7vm6gTlUmyBbmIfHwbkuj1ux6Uxz+8 eP0n4Uw10j5tNZwC/02RJ4/syVQWuEJ1e6kGZQQVu6UzxPXmKFJRPf+hlH0AJS6gpn Vft/mGxVf/vnQ== From: "Matthieu Baerts (NGI0)" To: mptcp@lists.linux.dev, stable@vger.kernel.org, gregkh@linuxfoundation.org Cc: "Matthieu Baerts (NGI0)" , sashal@kernel.org Subject: [PATCH 6.6.y 4/4] selftests: mptcp: remove duplicated variables Date: Fri, 18 Oct 2024 17:57:39 +0200 Message-ID: <20241018155734.2548697-10-matttbe@kernel.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241018155734.2548697-6-matttbe@kernel.org> References: <20241018155734.2548697-6-matttbe@kernel.org> Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2256; i=matttbe@kernel.org; h=from:subject; bh=tCucLaoTh+MK0+9epP2qdVz9E2vSr9Thdxbczad7Uok=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBnEoVuNHy/nsuu3v/kx4hmzO3wgygG0dMx7Lg3Y SjOAx8SGOCJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZxKFbgAKCRD2t4JPQmmg c9ZUEADQ4qLZQDbGgxBYsA6hnRHvwPVWgbNe1i2gK11L2khYOTHhYdfZeppNf/9rSNtnf+/C8Go EYcHx0H1PFTz4OT31i385P26L6jt5tBbji6lbCpY+9c5Chwf714cWwuLOQ0xQMnlHyTPhUUY4jq XBOGwHDGH+EGd7sw6DoPEeeTk2LjVLcdGszxkR1kW3zI0REG/37pilyp7UfMW7wjK6LKwrqdbDv G6TO//B2qAz4OWB5NzvyHv/75H1eMjozAWPnJeIu3sPmhN7lDMqI7e+aKgyX31Hs8G+rtQC939F bKlixeXvNmbNaRcZJhloPbbyys6ZD9hxRt1mygVR8g/I4IHuCPtMity8cqOZXzH2+KcF8VCsLBn u0w/rDS7knEDNi2Y4VZFHFSm40ZYN+snfoI0wqcVq4XYESO5qM4NwssV9RS89y5TCUPAVilrxiQ W5M02xvKFauGC2SWCeEPtrzfZXr8CWfeaxd4zxNm4rVY+ej2+7AEec0++cKOB3wcweUFGUgxLAA SY8+ro4RjkOKaANrLX2s+KaincFA63m7wulULbfKCzpHRwdoVeAh0lr2gyf134M2nT3LdeHYeAJ 3bt0Wc0w8G0kAjG+anmX7ygJhkdpJCjU5/Ja+gzH6mwbQho/f75SePoNpbp3XwlQocV7YmdYDQ/ AePuVWk38gWUwVQ== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 A few week ago, there were some backport issues in MPTCP selftests, because some patches have been applied twice, but with versions handling conflicts differently [1]. Patches fixing these issues have been sent [2] and applied, but it looks like quilt was still confused with the removal of some patches, and commit a417ef47a665 ("selftests: mptcp: join: validate event numbers") duplicated some variables, not present in the original patch [3]. Anyway, Bash was complaining, but that was not causing any tests to fail. Also, that's easy to fix by simply removing the duplicated ones. Link: https://lore.kernel.org/fc21db4a-508d-41db-aa45-e3bc06d18ce7@kernel.org [1] Link: https://lore.kernel.org/20240905144306.1192409-5-matttbe@kernel.org [2] Link: https://lore.kernel.org/20240905144306.1192409-7-matttbe@kernel.org [3] Signed-off-by: Matthieu Baerts (NGI0) --- tools/testing/selftests/net/mptcp/mptcp_lib.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing/selftests/net/mptcp/mptcp_lib.sh index 869c8eda4bc3..d98c89f31afe 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh @@ -8,17 +8,6 @@ readonly KSFT_SKIP=4 # shellcheck disable=SC2155 # declare and assign separately readonly KSFT_TEST="${MPTCP_LIB_KSFT_TEST:-$(basename "${0}" .sh)}" -# These variables are used in some selftests, read-only -declare -rx MPTCP_LIB_EVENT_ANNOUNCED=6 # MPTCP_EVENT_ANNOUNCED -declare -rx MPTCP_LIB_EVENT_REMOVED=7 # MPTCP_EVENT_REMOVED -declare -rx MPTCP_LIB_EVENT_SUB_ESTABLISHED=10 # MPTCP_EVENT_SUB_ESTABLISHED -declare -rx MPTCP_LIB_EVENT_SUB_CLOSED=11 # MPTCP_EVENT_SUB_CLOSED -declare -rx MPTCP_LIB_EVENT_LISTENER_CREATED=15 # MPTCP_EVENT_LISTENER_CREATED -declare -rx MPTCP_LIB_EVENT_LISTENER_CLOSED=16 # MPTCP_EVENT_LISTENER_CLOSED - -declare -rx MPTCP_LIB_AF_INET=2 -declare -rx MPTCP_LIB_AF_INET6=10 - # These variables are used in some selftests, read-only declare -rx MPTCP_LIB_EVENT_CREATED=1 # MPTCP_EVENT_CREATED declare -rx MPTCP_LIB_EVENT_ESTABLISHED=2 # MPTCP_EVENT_ESTABLISHED