mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 18:23:53 +08:00
selftests: nft_concat_range: Move option for 'list ruleset' before command
Before nftables commit fb9cea50e8b3 ("main: enforce options before
commands"), 'nft list ruleset -a' happened to work, but it's wrong
and won't work anymore. Replace it by 'nft -a list ruleset'.
Reported-by: Chen Yi <yiche@redhat.com>
Fixes: 611973c1e0
("selftests: netfilter: Introduce tests for sets with range concatenation")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
3614d05b5e
commit
d082055650
@ -1025,7 +1025,7 @@ format_noconcat() {
|
||||
add() {
|
||||
if ! nft add element inet filter test "${1}"; then
|
||||
err "Failed to add ${1} given ruleset:"
|
||||
err "$(nft list ruleset -a)"
|
||||
err "$(nft -a list ruleset)"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
@ -1045,7 +1045,7 @@ add_perf() {
|
||||
add_perf_norange() {
|
||||
if ! nft add element netdev perf norange "${1}"; then
|
||||
err "Failed to add ${1} given ruleset:"
|
||||
err "$(nft list ruleset -a)"
|
||||
err "$(nft -a list ruleset)"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
@ -1054,7 +1054,7 @@ add_perf_norange() {
|
||||
add_perf_noconcat() {
|
||||
if ! nft add element netdev perf noconcat "${1}"; then
|
||||
err "Failed to add ${1} given ruleset:"
|
||||
err "$(nft list ruleset -a)"
|
||||
err "$(nft -a list ruleset)"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
@ -1063,7 +1063,7 @@ add_perf_noconcat() {
|
||||
del() {
|
||||
if ! nft delete element inet filter test "${1}"; then
|
||||
err "Failed to delete ${1} given ruleset:"
|
||||
err "$(nft list ruleset -a)"
|
||||
err "$(nft -a list ruleset)"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
@ -1134,7 +1134,7 @@ send_match() {
|
||||
err " $(for f in ${src}; do
|
||||
eval format_\$f "${2}"; printf ' '; done)"
|
||||
err "should have matched ruleset:"
|
||||
err "$(nft list ruleset -a)"
|
||||
err "$(nft -a list ruleset)"
|
||||
return 1
|
||||
fi
|
||||
nft reset counter inet filter test >/dev/null
|
||||
@ -1160,7 +1160,7 @@ send_nomatch() {
|
||||
err " $(for f in ${src}; do
|
||||
eval format_\$f "${2}"; printf ' '; done)"
|
||||
err "should not have matched ruleset:"
|
||||
err "$(nft list ruleset -a)"
|
||||
err "$(nft -a list ruleset)"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user