From patchwork Tue Jun 8 18:27:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 455828 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp4031800jae; Tue, 8 Jun 2021 12:13:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywf8xTndVRz1wBws/uelsjF+KeBJK/kl2VQi5Lr4eP90jVXQwMcjXQA5q6ADDDyJ0WGHfN X-Received: by 2002:a05:6402:22fa:: with SMTP id dn26mr26590731edb.230.1623179612998; Tue, 08 Jun 2021 12:13:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623179612; cv=none; d=google.com; s=arc-20160816; b=o/bntnbT+XfPh2/e+xY2pVw7ErjA9vLadbjWt4qSbGo/FS7d47Av/Q6n/tKSio0NBu 40kcldI0YEqwaOHh6QRGrL0Ax7+2otrKQNaB4e/kWreDg1w/ueaf+rVt8Rwhruehi6TF PxrWk3ubqZpAyMULmSmiKsV91LZOQc/tIYWPzFvIdIQUHD+rj/xVtYm+i3IJnkG6WrWU eqQ4wNLssAKxvfliWl3b73riR9NCar4trm1X1Wjpbpy5gIhwga8nDEPIcZt1caApyh7k THAbvZ6PD9xcSghkfr3kSu8OsyUDGl4mNvXDBiJpJha2ANv6vOBvyduBjrZvAszSVgxk EMWg== 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=eRYLH3vL9g5YLNiYjhP+BznFRLAr0/onLnzwqkT2TN8=; b=WCVB2dw0IFYIs4c7EPC5hPgk81h8MHljSNs8Y+jD+WMu5BVEgA3KECycEIQy6ovvVV brWkGIsjcldXgPfpfpmVHyml9KGPAhwyR6HaOWVzTgh/XhRAOzWlr6IDyxsjqQCCn7G+ 13Lgj5RUPpCI0FjupKcTwH4/fF5FURkGJxhh5F7hV8zeQeqUMj3XEpggIk/jZgOycF5w yzom0xT8ZQh5SQ/L773iBskbRYsLoU7S/5dyS0WZ5HeB/38dTR4Xj8+/Z51BpVHeAjGN 5Sw0HDljGJan9cKjuJ7BJYSZWZYFxdum2Qk7jtVQPf3uFp9x0W5qV/Os4Pf/p9jcFgsI IJSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yvtbb50H; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 l23si509825ejb.573.2021.06.08.12.13.32; Tue, 08 Jun 2021 12:13:32 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=yvtbb50H; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S235976AbhFHTNs (ORCPT + 12 others); Tue, 8 Jun 2021 15:13:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:35180 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235521AbhFHTLp (ORCPT ); Tue, 8 Jun 2021 15:11:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 262BC6195D; Tue, 8 Jun 2021 18:49:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623178154; bh=1mgWPPmzluYStBBTbqzbxfqddWKznr5Zz86gLYSijOI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yvtbb50HMQRTs3BJjUvtBN8ZkeuaKBU7LBUFz9Re04JiqUIbSItBsAusXDS78Che5 w1xUctQWS9VaRdoZ6REemzmFIN2xXvrjbo3yB01JFz6tjRbHM2dAfN8W78nFPSIjtH AtSU/uRU4anyyk8AoDKKCLM/GeyWbWeeQ2Jwkgrc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hangbin Liu , "Jason A. Donenfeld" , "David S. Miller" Subject: [PATCH 5.12 098/161] wireguard: selftests: make sure rp_filter is disabled on vethc Date: Tue, 8 Jun 2021 20:27:08 +0200 Message-Id: <20210608175948.774383956@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210608175945.476074951@linuxfoundation.org> References: <20210608175945.476074951@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jason A. Donenfeld commit f8873d11d4121aad35024f9379e431e0c83abead upstream. Some distros may enable strict rp_filter by default, which will prevent vethc from receiving the packets with an unrouteable reverse path address. Reported-by: Hangbin Liu Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") Cc: stable@vger.kernel.org Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/wireguard/netns.sh | 1 + 1 file changed, 1 insertion(+) --- a/tools/testing/selftests/wireguard/netns.sh +++ b/tools/testing/selftests/wireguard/netns.sh @@ -363,6 +363,7 @@ ip1 -6 rule add table main suppress_pref ip1 -4 route add default dev wg0 table 51820 ip1 -4 rule add not fwmark 51820 table 51820 ip1 -4 rule add table main suppress_prefixlength 0 +n1 bash -c 'printf 0 > /proc/sys/net/ipv4/conf/vethc/rp_filter' # Flood the pings instead of sending just one, to trigger routing table reference counting bugs. n1 ping -W 1 -c 100 -f 192.168.99.7 n1 ping -W 1 -c 100 -f abab::1111