tests: shell: double chain update with same device
Pablo Neira Ayuso
maintainerPATCH 1/1 tests: shell: double chain update with same device
For Linux kernel patch:
cf5fb87fcdaa ("netfilter: nf_tables: reject duplicate device on updates")
Signed-off-by Pablo Neira Ayuso <[email protected]>
--- .../testcases/transactions/chain_update_dup | 22 +++++++++++++++++++ .../transactions/flowtable_update_dup | 22 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100755 tests/shell/testcases/transactions/chain_update_dup create mode 100755 tests/shell/testcases/transactions/flowtable_update_dup
tests/shell/testcases/transactions/chain_update_dup new file +22 -0
@@ -0,0 +1,22 @@ +#!/bin/bash + +ip link add dummy0 type dummy + +$NFT -f /dev/stdin <<EOF +table netdev t { + chain c { + type filter hook ingress priority 0; + } +} +EOF + +$NFT -f /dev/stdin <<EOF +add chain netdev t c { devices = { dummy0 }; } +add chain netdev t c { devices = { dummy0 }; } +EOF + +ip link del dummy0 + +sleep 4 + +$NFT flush ruleset
tests/shell/testcases/transactions/flowtable_update_dup new file +22 -0
@@ -0,0 +1,22 @@ +#!/bin/bash + +ip link add dummy0 type dummy + +$NFT -f /dev/stdin <<EOF +table inet t { + flowtable f { + hook ingress priority 0; + } +} +EOF + +$NFT -f /dev/stdin <<EOF +add flowtable inet t f { devices = { dummy0 }; } +add flowtable inet t f { devices = { dummy0 }; } +EOF + +ip link del dummy0 + +sleep 4 + +$NFT flush ruleset
Signature · 1 line
2.47.3