Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3934051pxj; Mon, 21 Jun 2021 09:41:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkJYHXOxclwHiXAH2KveE8tG1VLTryJdMquwsklJA27X3vbyPIseFByQiDMUFOd+6mTEMc X-Received: by 2002:a17:907:2622:: with SMTP id aq2mr14467116ejc.48.1624293674204; Mon, 21 Jun 2021 09:41:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624293674; cv=none; d=google.com; s=arc-20160816; b=jCNROPiuHTSjQsgmvxloC6MQ0hx24NvNGWH+ZBO1F3VD2yULjjkG7MP+seNZbrNgGt Vacfc5wMzailput3Z/RZtgYrAaJ6yVVio0vht3uZMc/v9E4KiTNVoZy4/WAuxhlrpoJl JWcVmVmUotTT85GTVmPG5+1H122YLYxpcO5QaFutpdZY5IDcJPd8JTuy2jI7a8JNcFwY zVqVeRRXnQYUkEzXMqRJ1GdxMgvGhyHEst0wKZmuS0CuvSGKc1BYW7sE/Srvsj5Vboo8 rx/tEnTXTkKadP1HRRgLFV4j+mTHDrMZy2+39dyxyv8hpWC6x04s+u0VKTkoEdumRes0 +1rg== 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=TtjTK8OMF8L6TYunJEwdrWY+a0O1nlqTq4IjAF6Lubs=; b=cQWOPdnzqWszCTd9aCsiYmzdzGVQrMHWmXCBkxpubVg0j0L6k3M84ob5B/VhqjI3/H Dhno+PmcsvfhfTnaQIwzzcTWpShR/gIFcIsHYnMRdXeoBEI7sRNkasEXp1QuBjHKDQjR 28B7B1y4tSoNW7p8OW7M2RGKUu9SBqR7IuhVufsVaP5qfeXsz/T2MHFvxfbWuy9MZzJY ejkR0U1XCYW277CIwc9WS27uxkxr9NulbiXmpTMlp2Ey6+LEOtCOAQ7UtjLVxQdsHjUg Gkdqaky6i+wMGhTYMNAjOhLb3LN+wjK45SX6dSopJpNwBAZ+lvCPuVeA5efybUDkHJLw EMkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uMQlLvwC; 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 3si10993753ejl.715.2021.06.21.09.40.51; Mon, 21 Jun 2021 09:41:14 -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=uMQlLvwC; 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 S232930AbhFUQlp (ORCPT + 99 others); Mon, 21 Jun 2021 12:41:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:33418 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232371AbhFUQiX (ORCPT ); Mon, 21 Jun 2021 12:38:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 66B9C61430; Mon, 21 Jun 2021 16:29:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292957; bh=p396UMBMFopLBPc7tMA9Yexa34rdKj+9WkkBE+0sWzs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uMQlLvwCPAxYlMQtxjNDv0/7xOettKgBQsexWYgytbdzx9ShSQNc427eySp7mLwtE 5JvYc0R+3InP6hjnK1vPHZ1LXBTaSihJ7669LUoInaHcFR9sB6YWhuokhzyc+uG9cJ 7zW6T0+adVmIeLbIV+/MHSODu9kBabvZgYo/qxCQ= 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.12 047/178] selftests: mptcp: enable syncookie only in absence of reorders Date: Mon, 21 Jun 2021 18:14:21 +0200 Message-Id: <20210621154923.914958133@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154921.212599475@linuxfoundation.org> References: <20210621154921.212599475@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 65b3b983efc2..8763706b0d04 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -197,9 +197,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" @@ -711,6 +708,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