From mboxrd@z Thu Jan 1 00:00:00 1970 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 4EFD9198A08; Thu, 5 Sep 2024 10:00:30 +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=1725530430; cv=none; b=diQywLeujn3pe9cS+zFIEsYKwTzwkcIf+4EeBW3N7N5NpCUFSpk0YB3aBre8K8wpyXPWBrWE8bIKAFVfQ5UXxEbefMkfGXrNy77T24BZxTIqfANCFziuMs0ZjfgXHkHr9b+o9fb06WZGrBP6R+bZ8bL4GW+P1rqybYTzjmqV+60= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725530430; c=relaxed/simple; bh=lv4VCMnCNOIexmGx39/jtYsQI0hCaWWwiy0bTNz27nk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=b0nVGFgEZvOF+mVVlRWat3EuimfvAFkNLPpU6YdmDIRP+vGO2SlPwSDIuZYDqmmQiuGwTif/ox29BIgsiZrrAZBOQHGrk2F+P+pybPq8Zs5cxBi4ecHMIJO5uiqGxOAx60k1bycski7UnxNseqHZ0KJCd2+RxXFUKF+bO+T7czA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=b13YNn9j; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="b13YNn9j" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE6F4C4CEC6; Thu, 5 Sep 2024 10:00:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1725530430; bh=lv4VCMnCNOIexmGx39/jtYsQI0hCaWWwiy0bTNz27nk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b13YNn9jRO7yMlpkFkER3JYJQVZItdxGVlU5NjS/7gWndzme02QmWWpG05NoiuTw7 KDyVkSY01cIfSmoCnNsS8KMXRRDHtS1GBJoWvkSY0zYAYyt49mzExnTCjTs24Zd4SV ly97snIeKidGSbQ+V30s3qEqZ4faVkteCS/31biI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mat Martineau , "Matthieu Baerts (NGI0)" , Jakub Kicinski Subject: [PATCH 6.1 021/101] selftests: mptcp: join: check re-using ID of unused ADD_ADDR Date: Thu, 5 Sep 2024 11:40:53 +0200 Message-ID: <20240905093716.944614047@linuxfoundation.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240905093716.075835938@linuxfoundation.org> References: <20240905093716.075835938@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: "Matthieu Baerts (NGI0)" commit a13d5aad4dd9a309eecdc33cfd75045bd5f376a3 upstream. This test extends "delete re-add signal" to validate the previous commit. An extra address is announced by the server, but this address cannot be used by the client. The result is that no subflow will be established to this address. Later, the server will delete this extra endpoint, and set a new one, with a valid address, but re-using the same ID. Before the previous commit, the server would not have been able to announce this new address. While at it, extra checks have been added to validate the expected numbers of MPJ, ADD_ADDR and RM_ADDR. 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: b6c08380860b ("mptcp: remove addr and subflow in PM netlink") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240819-net-mptcp-pm-reusing-id-v1-2-38035d40de5b@kernel.org Signed-off-by: Jakub Kicinski [ Conflicts in mptcp_join.sh, because the helpers are different in this version: - run_tests has been modified a few times to reduce the number of positional parameters - no chk_mptcp_info helper - chk_subflow_nr taking an extra parameter - kill_tests_wait instead of mptcp_lib_kill_wait ] Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -3243,9 +3243,11 @@ userspace_tests() # remove and re-add if reset "delete re-add signal" && mptcp_lib_kallsyms_has "subflow_rebuild_header$"; then - pm_nl_set_limits $ns1 1 1 - pm_nl_set_limits $ns2 1 1 + pm_nl_set_limits $ns1 0 2 + pm_nl_set_limits $ns2 2 2 pm_nl_add_endpoint $ns1 10.0.2.1 id 1 flags signal + # broadcast IP: no packet for this address will be received on ns1 + pm_nl_add_endpoint $ns1 224.0.0.1 id 2 flags signal run_tests $ns1 $ns2 10.0.1.1 4 0 0 speed_20 2>/dev/null & local tests_pid=$! @@ -3253,13 +3255,19 @@ userspace_tests() chk_subflow_nr needtitle "before delete" 2 pm_nl_del_endpoint $ns1 1 10.0.2.1 + pm_nl_del_endpoint $ns1 2 224.0.0.1 sleep 0.5 chk_subflow_nr "" "after delete" 1 - pm_nl_add_endpoint $ns1 10.0.2.1 flags signal + pm_nl_add_endpoint $ns1 10.0.2.1 id 1 flags signal + pm_nl_add_endpoint $ns1 10.0.3.1 id 2 flags signal wait_mpj $ns2 - chk_subflow_nr "" "after re-add" 2 + chk_subflow_nr "" "after re-add" 3 kill_tests_wait + + chk_join_nr 3 3 3 + chk_add_nr 4 4 + chk_rm_nr 2 1 invert fi # flush and re-add