Laine Stump 64b966558c network: support setting firewallBackend from network.conf
It still can have only one useful value ("iptables"), but once a 2nd
value is supported, it will be selectable by setting
"firewall_backend=nftables" in /etc/libvirt/network.conf.

If firewall_backend isn't set in network.conf, then libvirt will check
to see if FIREWALL_BACKEND_DEFAULT_1 is available and, if so, set
that. (Since FIREWALL_BACKEND_DEFAULT_1 is currently "iptables", this
means checking to see it the iptables binary is present on the
system).  If the default backend isn't available, that is considered a
fatal error (since no networks can be started anyway), so an error is
logged and startup of the network driver fails.

NB: network.conf is itself created from network.conf.in at build time,
and the advertised default setting of firewall_backend (in a commented
out line) is set from the meson_options.txt setting
"firewall_backend_default_1". This way the conf file will have correct
information no matter what ordering is chosen for default backend at
build time (as more backends are added, settings will be added for
"firewall_backend_default_n", and those will be settable in
meson_options.txt and on the meson commandline to change the ordering
of the auto-detection when no backend is set in network.conf).

virNetworkLoadDriverConfig() may look more complicated than necessary,
but as additional backends are added, it will be easier to add checks
for those backends (and to re-order the checks based on builders'
preferences).

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-05-22 23:19:18 -04:00
..
2023-04-06 12:48:22 +02:00
2023-12-14 17:10:22 +01:00
2024-03-12 17:37:51 +01:00
2024-03-12 17:37:51 +01:00
2024-03-21 14:42:27 +01:00
2022-06-16 06:43:58 +02:00
2022-06-16 06:43:58 +02:00
2022-06-16 06:43:58 +02:00
2022-06-16 06:43:58 +02:00
2024-03-14 15:17:48 +01:00
2022-06-16 06:43:58 +02:00
2024-03-21 14:42:20 +01:00
2022-06-16 06:43:58 +02:00
2022-06-16 06:43:58 +02:00
2022-06-16 06:43:58 +02:00
2022-06-16 06:43:58 +02:00
2023-12-14 17:10:22 +01:00
2023-04-06 12:48:22 +02:00
2024-03-14 15:17:48 +01:00
2022-06-16 06:43:58 +02:00
2022-06-16 06:43:58 +02:00
2024-03-14 15:17:48 +01:00
2022-06-16 06:43:58 +02:00
2022-06-16 06:43:58 +02:00
2024-03-14 15:17:48 +01:00
2022-06-16 06:43:58 +02:00
2023-03-13 13:29:07 +01:00
2024-03-14 15:17:48 +01:00
2024-05-16 09:03:48 +02:00
2024-03-14 15:17:48 +01:00
2022-06-16 06:43:58 +02:00
2024-03-14 15:17:48 +01:00
2022-06-16 06:43:58 +02:00
2022-06-16 06:43:58 +02:00