Blame SOURCES/0078-tests-shell-auto-removal-of-chain-hook-on-netns-remo.patch

ac684a
From 66369d42095a214672c1f935eed91902d4cca8d5 Mon Sep 17 00:00:00 2001
ac684a
From: Phil Sutter <psutter@redhat.com>
ac684a
Date: Wed, 27 Apr 2022 14:37:00 +0200
ac684a
Subject: [PATCH] tests: shell: auto-removal of chain hook on netns removal
ac684a
ac684a
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2070924
ac684a
Upstream Status: nftables commit e632eea21f4b3
ac684a
Conflicts: Commit b4775dec9f80b ("src: ingress inet support") creating
ac684a
	   the test not backported, RHEL8 does not support inet ingress.
ac684a
	   Script adjusted accordingly.
ac684a
ac684a
commit e632eea21f4b3d03b629a5c1ac7e776d65785873
ac684a
Author: Florian Westphal <fw@strlen.de>
ac684a
Date:   Tue Oct 19 14:07:25 2021 +0200
ac684a
ac684a
    tests: shell: auto-removal of chain hook on netns removal
ac684a
ac684a
    This is the nft equivalent of the syzbot report that lead to
ac684a
    kernel commit 68a3765c659f8
ac684a
    ("netfilter: nf_tables: skip netdev events generated on netns removal").
ac684a
ac684a
    Signed-off-by: Florian Westphal <fw@strlen.de>
ac684a
---
ac684a
 tests/shell/testcases/chains/0043chain_ingress_0 | 11 +++++++++++
ac684a
 1 file changed, 11 insertions(+)
ac684a
 create mode 100755 tests/shell/testcases/chains/0043chain_ingress_0
ac684a
ac684a
diff --git a/tests/shell/testcases/chains/0043chain_ingress_0 b/tests/shell/testcases/chains/0043chain_ingress_0
ac684a
new file mode 100755
ac684a
index 0000000..09d6907
ac684a
--- /dev/null
ac684a
+++ b/tests/shell/testcases/chains/0043chain_ingress_0
ac684a
@@ -0,0 +1,11 @@
ac684a
+#!/bin/bash
ac684a
+
ac684a
+set -e
ac684a
+
ac684a
+# Test auto-removal of chain hook on netns removal
ac684a
+unshare -n bash -c "ip link add br0 type bridge; \
ac684a
+ $NFT add table netdev test; \
ac684a
+ $NFT add chain netdev test ingress { type filter hook ingress device \"br0\" priority 0\; policy drop\; } ; \
ac684a
+" || exit 1
ac684a
+
ac684a
+exit 0
ac684a
-- 
ac684a
2.34.1
ac684a