From nobody Tue May 21 19:17:10 2024 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 3A36024163; Tue, 25 Jul 2023 18:34:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7EB2FC433CB; Tue, 25 Jul 2023 18:34:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690310099; bh=QwCnG5+Z7TjpjUwNXP4jPD4RDLcuQH9RqoFnYbUu7zk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=WLf9j7bNRkk+C8wUwtTrglbCQ3trv6Z5i+Zv5RaFOU5WMeevBR/rtSw8yhsVhBBfw dyHdV38/mRlnvb23QCiusBcAHxk7+94J21m7kZ+lSCKX9ul+lGD2jsU8tePClT8+kU 7uUZTlvC9zwgqNmqilX6liw03A3rTxbKOTWeQYV1Gq0bYjMsuUFlEwObeKUaadu8rH HzNOje1HztlFsHcRZvusUrku48cZorlJlRHHffHCkw8FtJNVp5kW7a6BoJhaIv7KOY c6gJebLmPrmnh7iOuvGrKkEmuZzaN5+MZYRaplzGLZsYYviKfmpcQqo4S/1amIDrCQ p3rBM5xXuYBgQ== From: Mat Martineau Date: Tue, 25 Jul 2023 11:34:55 -0700 Subject: [PATCH net 1/2] selftests: mptcp: join: only check for ip6tables if needed Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230725-send-net-20230725-v1-1-6f60fe7137a9@kernel.org> References: <20230725-send-net-20230725-v1-0-6f60fe7137a9@kernel.org> In-Reply-To: <20230725-send-net-20230725-v1-0-6f60fe7137a9@kernel.org> To: Matthieu Baerts , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Geliang Tang Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev, stable@vger.kernel.org, Mat Martineau X-Mailer: b4 0.12.3 From: Matthieu Baerts If 'iptables-legacy' is available, 'ip6tables-legacy' command will be used instead of 'ip6tables'. So no need to look if 'ip6tables' is available in this case. Fixes: 0c4cd3f86a40 ("selftests: mptcp: join: use 'iptables-legacy' if avai= lable") Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: Mat Martineau --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testin= g/selftests/net/mptcp/mptcp_join.sh index e6c9d5451c5b..3c2096ac97ef 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -162,9 +162,7 @@ check_tools() elif ! iptables -V &> /dev/null; then echo "SKIP: Could not run all tests without iptables tool" exit $ksft_skip - fi - - if ! ip6tables -V &> /dev/null; then + elif ! ip6tables -V &> /dev/null; then echo "SKIP: Could not run all tests without ip6tables tool" exit $ksft_skip fi --=20 2.41.0 From nobody Tue May 21 19:17:10 2024 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 6A3C72416D; Tue, 25 Jul 2023 18:35:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB7F5C43391; Tue, 25 Jul 2023 18:34:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690310099; bh=CeGxhrvZHThEsyTOEnPxSmGBdhmosALuz9k50d2C/S8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Kvfz9Lp36y6TgtEnpT2UiDb2SVPbspS7uCWkLDYO4E+KJQxrTWqGIcXNBmQPivAWM ziBT5ndTF+PXxGJ6xGn/A5R7909d5ZniwH7c2B2y06vvIBwo0SS4LtR9r5FqRR2Rrs 7q4LwCalSL0ts65kEPAgKyRR6lOv8MWevy5AbSYuo9g40G85HHbvcCP/BziFw7rHOe lBqjRRWbJ9z53w3kvjIbAnDOPxnEaCyTkS9dILyAO09CSGzIPCnEqkIT41shFRPwQt rjxg2ASmURXM4YPKcKZGX+tAPWtkX0s0pfqKgB056+fG9osNz9NX/mrKH4V9GzAcwh uvWg1CkfBNMeQ== From: Mat Martineau Date: Tue, 25 Jul 2023 11:34:56 -0700 Subject: [PATCH net 2/2] mptcp: more accurate NL event generation Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230725-send-net-20230725-v1-2-6f60fe7137a9@kernel.org> References: <20230725-send-net-20230725-v1-0-6f60fe7137a9@kernel.org> In-Reply-To: <20230725-send-net-20230725-v1-0-6f60fe7137a9@kernel.org> To: Matthieu Baerts , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Geliang Tang Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev, stable@vger.kernel.org, Mat Martineau X-Mailer: b4 0.12.3 From: Paolo Abeni Currently the mptcp code generate a "new listener" event even if the actual listen() syscall fails. Address the issue moving the event generation call under the successful branch. Fixes: f8c9dfbd875b ("mptcp: add pm listener events") Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau --- net/mptcp/protocol.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 3613489eb6e3..3317d1cca156 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -3723,10 +3723,9 @@ static int mptcp_listen(struct socket *sock, int bac= klog) if (!err) { sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1); mptcp_copy_inaddrs(sk, ssock->sk); + mptcp_event_pm_listener(ssock->sk, MPTCP_EVENT_LISTENER_CREATED); } =20 - mptcp_event_pm_listener(ssock->sk, MPTCP_EVENT_LISTENER_CREATED); - unlock: release_sock(sk); return err; --=20 2.41.0