Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3923101pxj; Mon, 21 Jun 2021 09:27:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2Ow0NGzrbsh7V7ORtFjJ2wRaKCCPgnH3bS0h8jnNTaEAJMRHr5A4N+327Vvcea3c+jFDx X-Received: by 2002:a17:906:248d:: with SMTP id e13mr8822516ejb.270.1624292839378; Mon, 21 Jun 2021 09:27:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292839; cv=none; d=google.com; s=arc-20160816; b=QHhu9uEqDAYCx2HWUipI5ko4vyDiQngWD3gxSsixEafgs6Y27OC488AYLrlB6WTTyB UJCHgk3G+Ze5l2lT+Abz/EfElPOc1BZdxvq8fP6nTuMF9hF5cXZk+JVEGKs3C/0gKzn+ urhiJ4spMA8SVo0Y06i4MO0TMmOtLgymKhwokEHMdbTXNAJqfoFTBqr9rNEkVChTcJDG E0KiU6jWOnm9o6UCIBlHMr1KERc7eGGvgSOX5uNr6w9z8weRPq4aPPyZ8IXEG0l2wnMg xMdsWbPdqLDVPBrN9W+xBSNACjowBKVpS1gzOA5jwUPj9SdX41IZb8e37vWnNSwYBTIh 3evw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=d+8l/QO2fl5jO4uJzqenz6JFwZpyQvsL70LgufT+FHs=; b=otNQcmjHPgI0to2S7cQSRVn7EJUG5jb0chU+Z0yEJN9owpf3htOCS6j30RPNvBfADK nBOTlu/kTWf3QVhHhpv7LgBb83w7d5eJFM477utDudrRnbl1WDH+8eRxGPFBU5JMLgNX d4Rilk3+36hamme6oTnKTRVFUsghFtGe3rH5hl4fHij3J5R85BOcI+bv3Shiz36pdwvl 0lhXgjWgiBt0hCbA+ttojmcGTJvWHWXR6CaeuWOn0yvgsDzOU7hdxanBejanNpFnCEae Uz+Qkty8zBq6l3dvtIoVHHIccnxAxzTCAWBX4HvXnsKFLlYHkbxwa9Zv7XL/W4iBearF Fr/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="i/M7OtlB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f23si11115957ejj.531.2021.06.21.09.26.57; Mon, 21 Jun 2021 09:27:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="i/M7OtlB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231557AbhFUQ2N (ORCPT + 99 others); Mon, 21 Jun 2021 12:28:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:48700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232071AbhFUQ03 (ORCPT ); Mon, 21 Jun 2021 12:26:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EFDA8613C5; Mon, 21 Jun 2021 16:22:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292548; bh=qsfJ72iaoi0XJ1s50x9GXbCFfsOGgkvEH1fEwP44s48=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i/M7OtlBxd+O43kU8uq8holO3HvHtH1sceKKrNEJQWL4Hw0tHnR1rJ+tw7eR9Hs36 huaO9rzoSM+JcSP9ME3xsa+PmE5qoBcKTpeOgoKIli7Xe/sb14A8MmHIwb7Om3Vrds F23sTQfw+qrKpbTPofQmij3qjTPiCm297aY8e+DA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paolo Abeni , Mat Martineau , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 039/146] selftests: mptcp: enable syncookie only in absence of reorders Date: Mon, 21 Jun 2021 18:14:29 +0200 Message-Id: <20210621154912.621515459@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154911.244649123@linuxfoundation.org> References: <20210621154911.244649123@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paolo Abeni [ Upstream commit 2395da0e17935ce9158cdfae433962bdb6cbfa67 ] Syncookie validation may fail for OoO packets, causing spurious resets and self-tests failures, so let's force syncookie only for tests iteration with no OoO. Fixes: fed61c4b584c ("selftests: mptcp: make 2nd net namespace use tcp syn cookies unconditionally") Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/198 Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- tools/testing/selftests/net/mptcp/mptcp_connect.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index e927df83efb9..987a914ee0df 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -195,9 +195,6 @@ ip -net "$ns4" link set ns4eth3 up ip -net "$ns4" route add default via 10.0.3.2 ip -net "$ns4" route add default via dead:beef:3::2 -# use TCP syn cookies, even if no flooding was detected. -ip netns exec "$ns2" sysctl -q net.ipv4.tcp_syncookies=2 - set_ethtool_flags() { local ns="$1" local dev="$2" @@ -666,6 +663,14 @@ for sender in $ns1 $ns2 $ns3 $ns4;do exit $ret fi + # ns1<->ns2 is not subject to reordering/tc delays. Use it to test + # mptcp syncookie support. + if [ $sender = $ns1 ]; then + ip netns exec "$ns2" sysctl -q net.ipv4.tcp_syncookies=2 + else + ip netns exec "$ns2" sysctl -q net.ipv4.tcp_syncookies=1 + fi + run_tests "$ns2" $sender 10.0.1.2 run_tests "$ns2" $sender dead:beef:1::2 run_tests "$ns2" $sender 10.0.2.1 -- 2.30.2