|
|
1dfe16 |
From a565735cdf292e06d9530accee226beed0069368 Mon Sep 17 00:00:00 2001
|
|
|
1dfe16 |
From: Eric Garver <eric@garver.life>
|
|
|
1dfe16 |
Date: Mon, 13 May 2019 13:52:56 -0400
|
|
|
1dfe16 |
Subject: [PATCH 34/37] test: add macro HOST_SUPPORTS_IP6TABLES
|
|
|
1dfe16 |
|
|
|
1dfe16 |
(cherry picked from commit 4d5c3f190dc309ab03543dc7a65e45ee52858bd9)
|
|
|
1dfe16 |
(cherry picked from commit ada120045f6a1d387edf02772e889717da68050b)
|
|
|
1dfe16 |
---
|
|
|
1dfe16 |
src/tests/functions.at | 10 ++++++++++
|
|
|
1dfe16 |
1 file changed, 10 insertions(+)
|
|
|
1dfe16 |
|
|
|
1dfe16 |
diff --git a/src/tests/functions.at b/src/tests/functions.at
|
|
|
1dfe16 |
index 70d5ec66590d..da90f9ce549b 100644
|
|
|
1dfe16 |
--- a/src/tests/functions.at
|
|
|
1dfe16 |
+++ b/src/tests/functions.at
|
|
|
1dfe16 |
@@ -238,8 +238,10 @@ m4_define([IPTABLES_LIST_RULES], [
|
|
|
1dfe16 |
|
|
|
1dfe16 |
m4_define([IP6TABLES_LIST_RULES], [
|
|
|
1dfe16 |
m4_ifdef([TESTING_FIREWALL_OFFLINE_CMD], [], [
|
|
|
1dfe16 |
+ m4_if(yes, HOST_SUPPORTS_IP6TABLES, [
|
|
|
1dfe16 |
NS_CHECK([IP6TABLES -w -n -t $1 -L $2 | TRIM_WHITESPACE | tail -n +3], [$3], [m4_strip([$4])], [m4_strip([$5])], [$6], [$7])
|
|
|
1dfe16 |
])
|
|
|
1dfe16 |
+ ])
|
|
|
1dfe16 |
])
|
|
|
1dfe16 |
|
|
|
1dfe16 |
m4_define([NFT_LIST_RULES], [
|
|
|
1dfe16 |
@@ -355,3 +357,11 @@ m4_ifnblank(
|
|
|
1dfe16 |
[m4_define([HOST_SUPPORTS_NFT_FIB], [yes])],
|
|
|
1dfe16 |
[m4_define([HOST_SUPPORTS_NFT_FIB], [no])]
|
|
|
1dfe16 |
)
|
|
|
1dfe16 |
+
|
|
|
1dfe16 |
+m4_define([HOST_SUPPORTS_IP6TABLES], [m4_esyscmd(
|
|
|
1dfe16 |
+ if IP6TABLES -L >/dev/null 2>&1; then
|
|
|
1dfe16 |
+ echo -n "yes"
|
|
|
1dfe16 |
+ else
|
|
|
1dfe16 |
+ echo -n "no"
|
|
|
1dfe16 |
+ fi
|
|
|
1dfe16 |
+)])
|
|
|
1dfe16 |
--
|
|
|
1dfe16 |
2.20.1
|
|
|
1dfe16 |
|