|
|
c8bceb |
From 5d1ee5889bacf65a0d386a56a7b75f49a44e9bf7 Mon Sep 17 00:00:00 2001
|
|
|
c8bceb |
From: Eric Garver <eric@garver.life>
|
|
|
c8bceb |
Date: Wed, 1 May 2019 14:41:33 -0400
|
|
|
c8bceb |
Subject: [PATCH 39/73] fix: tests nftables: constant set compat between
|
|
|
c8bceb |
releases
|
|
|
c8bceb |
|
|
|
c8bceb |
For newer versions (>0.9.0) of nftables, matches against sets of
|
|
|
c8bceb |
constants are output using the set notation. To be compatible with older
|
|
|
c8bceb |
releases we need some sed magic.
|
|
|
c8bceb |
|
|
|
c8bceb |
(cherry picked from commit b7656e99ccf7c64961416e81b11ab5dbc1869694)
|
|
|
c8bceb |
(cherry picked from commit f6b417f9786f81701d2c63b234f7029e528b0ab2)
|
|
|
c8bceb |
---
|
|
|
c8bceb |
src/tests/functions.at | 4 +++-
|
|
|
c8bceb |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
c8bceb |
|
|
|
c8bceb |
diff --git a/src/tests/functions.at b/src/tests/functions.at
|
|
|
c8bceb |
index ca9224476a56..729bfc0dfc6a 100644
|
|
|
c8bceb |
--- a/src/tests/functions.at
|
|
|
c8bceb |
+++ b/src/tests/functions.at
|
|
|
c8bceb |
@@ -247,7 +247,9 @@ m4_define([NFT_LIST_RULES], [
|
|
|
c8bceb |
dnl instead of just "mark".
|
|
|
c8bceb |
m4_define([NFT_LIST_RULES_NORMALIZE], [dnl
|
|
|
c8bceb |
sed -e 's/meta mark/mark/g'dnl
|
|
|
c8bceb |
- | sed -e '/type.*hook.*priority.*policy.*/d'dnl
|
|
|
c8bceb |
+ -e '/type.*hook.*priority.*policy.*/d'dnl
|
|
|
c8bceb |
+ dnl tranform ct state { established,related } to ct state established,related
|
|
|
c8bceb |
+ -e '/ct \(state\|status\)/{s/\(ct \(state\|status\)\) {/\1/g; s/ }//; s/\(@<:@a-z@:>@*\), /\1,/g;}' dnl
|
|
|
c8bceb |
])
|
|
|
c8bceb |
|
|
|
c8bceb |
m4_ifdef([TESTING_FIREWALL_OFFLINE_CMD], [], [
|
|
|
c8bceb |
--
|
|
|
c8bceb |
2.20.1
|
|
|
c8bceb |
|