Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [91.216.245.30]) (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 86AE12566DA for ; Wed, 23 Apr 2025 10:02:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.216.245.30 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745402573; cv=none; b=AClcz27prliaXplr2YtLKYmm0UkHTCzeQIO+0OcJFrvo+8ETqEsHNJJ1+GxBAPzCRUV5Y3Kzke1vJBhgFHCWpYU+lTCibpBuHhD9c3s+zLcqdcOmcdMlM6AmW0hJh4PRR7+6f870eNbq56tE5w0EA+ooH8oMqo0yMz8S4oTU5FI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745402573; c=relaxed/simple; bh=1ehbzzH+Ki89oU5ziI/acO5rIgeTLCepEDY/FqrlOu4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GZOzzcMxHjgRqcDRl6+2i26Chkysbepr3aHw40fsDu8nCBuABLvY0R1cczsAiwrIwb7MniKEqOkwnjBprXdkTjBig8QjLdIw+S6ZKPn8LkQNlpzJZkuW04iVrXVc4o8A9y/I2+dmXObCcMh54zGGr4Wrejt89rqn7K5XtiMNN5w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de; spf=pass smtp.mailfrom=breakpoint.cc; arc=none smtp.client-ip=91.216.245.30 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=breakpoint.cc Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1u7WwL-0001Ub-Ev; Wed, 23 Apr 2025 12:02:49 +0200 From: Florian Westphal To: Cc: Florian Westphal Subject: [PATCH nf-next] selftests: netfilter: nft_fib.sh: check lo packets bypass fib lookup Date: Wed, 23 Apr 2025 11:57:29 +0200 Message-ID: <20250423095734.16109-1-fw@strlen.de> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: netfilter-devel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit With reverted fix: PASS: fib expression did not cause unwanted packet drops [ 37.285169] ns1-KK76Kt nft_rpfilter: IN=lo OUT= MAC=00:00:00:00:00:00:00:00:00:00:00:00:08:00 SRC=127.0.0.1 DST=127.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=32287 DF PROTO=ICMP TYPE=8 CODE=0 ID=1818 SEQ=1 FAIL: rpfilter did drop packets FAIL: ns1-KK76Kt cannot reach 127.0.0.1, ret 0 Check for this. Link: https://lore.kernel.org/netfilter/20250422114352.GA2092@breakpoint.cc/ Signed-off-by: Florian Westphal --- .../selftests/net/netfilter/nft_fib.sh | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tools/testing/selftests/net/netfilter/nft_fib.sh b/tools/testing/selftests/net/netfilter/nft_fib.sh index ce1451c275fd..ea47dd246a08 100755 --- a/tools/testing/selftests/net/netfilter/nft_fib.sh +++ b/tools/testing/selftests/net/netfilter/nft_fib.sh @@ -45,6 +45,19 @@ table inet filter { EOF } +load_input_ruleset() { + local netns=$1 + +ip netns exec "$netns" nft -f /dev/stdin <