This was the only reason we required the iptables and ebtables
packages at build time, and many other external commands already have
their binaries found at runtime by looking through $PATH (virCommand
automatically does this), so we may as well do it for these commands
as well.
Inspired-by: 6aa2fa38b04b802f137e51ebbeb4ca9b67487575
Signed-off-by: Laine Stump <laine(a)redhat.com>
---
meson.build | 3 ---
src/network/bridge_driver_conf.c | 2 ++
src/util/virfirewall.h | 5 +++++
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/meson.build b/meson.build
index 1518afa1cb..18807a0fe9 100644
--- a/meson.build
+++ b/meson.build
@@ -818,10 +818,7 @@ optional_test_programs = [
optional_programs = [
'dmidecode',
- 'ebtables',
'ip',
- 'ip6tables',
- 'iptables',
'iscsiadm',
'mdevctl',
'mm-ctl',
diff --git a/src/network/bridge_driver_conf.c b/src/network/bridge_driver_conf.c
index 9769ee06b5..5ebb362f5a 100644
--- a/src/network/bridge_driver_conf.c
+++ b/src/network/bridge_driver_conf.c
@@ -27,8 +27,10 @@
#include "virerror.h"
#include "virfile.h"
#include "virutil.h"
+#include "virfirewall.h" /* for binary names */
#include "bridge_driver_conf.h"
+
#define VIR_FROM_THIS VIR_FROM_NETWORK
VIR_LOG_INIT("network.bridge_driver");
diff --git a/src/util/virfirewall.h b/src/util/virfirewall.h
index 87629e8360..c75fb44347 100644
--- a/src/util/virfirewall.h
+++ b/src/util/virfirewall.h
@@ -25,6 +25,11 @@
#include "virbuffer.h"
#include "virxml.h"
+/* various external programs executed when applying firewalls */
+#define EBTABLES "ebtables"
+#define IPTABLES "iptables"
+#define IP6TABLES "ip6tables"
+
typedef struct _virFirewall virFirewall;
typedef struct _virFirewallCmd virFirewallCmd;
--
2.44.0