Blame SOURCES/firewalld-0.7-0001-Add-FlushAllOnReload-config-option.patch

21c891
From 242bc4e2e20c6944164fe2495598982b1cfcc4fe Mon Sep 17 00:00:00 2001
21c891
From: Eric Garver <e@erig.me>
21c891
Date: Tue, 16 Oct 2018 10:02:38 -0400
21c891
Subject: [PATCH] Add "FlushAllOnReload" config option
21c891
21c891
Default value is "yes".
21c891
21c891
Even on --reload some runtime configuration was being retained. This was
21c891
a surprise to many users. Lets default to flushing all the runtime
21c891
configuration and also introduce a config option to go back the old
21c891
behavior of retaining; interface to zone assignments, and direct rules.
21c891
21c891
This also adjusts a few test cases that depend on the old
21c891
FlushAllOnReload=no behavior.
21c891
21c891
Fixes: suze bz #1109153
21c891
Fixes: #409
21c891
Closes: #408
21c891
---
21c891
 config/firewalld.conf                  |  8 +++
21c891
 doc/xml/firewalld.conf.xml             | 13 ++++
21c891
 doc/xml/firewalld.dbus.xml             |  8 +++
21c891
 src/firewall/config/__init__.py.in     |  1 +
21c891
 src/firewall/core/fw.py                | 99 +++++++++++++++-----------
21c891
 src/firewall/core/io/firewalld_conf.py | 11 ++-
21c891
 src/firewall/server/config.py          | 20 +++++-
21c891
 src/tests/dbus/firewalld.conf.at       |  2 +
21c891
 src/tests/python/firewalld_direct.py   |  6 ++
21c891
 src/tests/python/firewalld_test.py     |  9 ++-
21c891
 src/tests/regression/rhbz1498923.at    |  4 ++
21c891
 11 files changed, 133 insertions(+), 48 deletions(-)
21c891
21c891
diff --git a/config/firewalld.conf b/config/firewalld.conf
21c891
index b53c0aa50c53..7cb02561fd4d 100644
21c891
--- a/config/firewalld.conf
21c891
+++ b/config/firewalld.conf
21c891
@@ -62,3 +62,11 @@ AutomaticHelpers=system
21c891
 #	- nftables (default)
21c891
 #	- iptables (iptables, ip6tables, ebtables and ipset)
21c891
 FirewallBackend=nftables
21c891
+
21c891
+# FlushAllOnReload
21c891
+# Flush all runtime rules on a reload. In previous releases some runtime
21c891
+# configuration was retained during a reload, namely; interface to zone
21c891
+# assignment, and direct rules. This was confusing to users. To get the old
21c891
+# behavior set this to "no".
21c891
+# Default: yes
21c891
+FlushAllOnReload=yes
21c891
diff --git a/doc/xml/firewalld.conf.xml b/doc/xml/firewalld.conf.xml
21c891
index df4b9521fd71..600919ae822d 100644
21c891
--- a/doc/xml/firewalld.conf.xml
21c891
+++ b/doc/xml/firewalld.conf.xml
21c891
@@ -158,6 +158,19 @@
21c891
 	        </listitem>
21c891
         </varlistentry>
21c891
 
21c891
+        <varlistentry>
21c891
+            <term><option>FlushAllOnReload</option></term>
21c891
+            <listitem>
21c891
+                <para>
21c891
+                Flush all runtime rules on a reload. In previous releases some
21c891
+                runtime configuration was retained during a reload, namely;
21c891
+                interface to zone assignment, and direct rules. This was
21c891
+                confusing to users. To get the old behavior set this to "no".
21c891
+                Defaults to "yes".
21c891
+                </para>
21c891
+            </listitem>
21c891
+        </varlistentry>
21c891
+
21c891
     </variablelist>
21c891
 
21c891
   </refsect1>
21c891
diff --git a/doc/xml/firewalld.dbus.xml b/doc/xml/firewalld.dbus.xml
21c891
index 8352f96cc057..132200f3cb42 100644
21c891
--- a/doc/xml/firewalld.dbus.xml
21c891
+++ b/doc/xml/firewalld.dbus.xml
21c891
@@ -2592,6 +2592,14 @@
21c891
               </para>
21c891
             </listitem>
21c891
           </varlistentry>
21c891
+          <varlistentry id="FirewallD1.config.Properties.FlushAllOnReload">
21c891
+            <term>FirewallBackend - s - (rw)</term>
21c891
+            <listitem>
21c891
+              <para>
21c891
+                Flush all runtime rules on a reload. Valid options are; yes, no.
21c891
+              </para>
21c891
+            </listitem>
21c891
+          </varlistentry>
21c891
           <varlistentry id="FirewallD1.config.Properties.IPv6_rpfilter">
21c891
             <term><parameter>IPv6_rpfilter</parameter> - s - (rw)</term>
21c891
             <listitem><para>Indicates whether the reverse path filter test on a packet for IPv6 is enabled. If a reply to the packet would be sent via the same interface that the packet arrived on, the packet will match and be accepted, otherwise dropped.</para></listitem>
21c891
diff --git a/src/firewall/config/__init__.py.in b/src/firewall/config/__init__.py.in
21c891
index 955be32077e1..2cfbef804778 100644
21c891
--- a/src/firewall/config/__init__.py.in
21c891
+++ b/src/firewall/config/__init__.py.in
21c891
@@ -130,3 +130,4 @@ FALLBACK_INDIVIDUAL_CALLS = False
21c891
 FALLBACK_LOG_DENIED = "off"
21c891
 FALLBACK_AUTOMATIC_HELPERS = "system"
21c891
 FALLBACK_FIREWALL_BACKEND = "nftables"
21c891
+FALLBACK_FLUSH_ALL_ON_RELOAD = True
21c891
diff --git a/src/firewall/core/fw.py b/src/firewall/core/fw.py
21c891
index 9be13a5c1313..7e6255f77398 100644
21c891
--- a/src/firewall/core/fw.py
21c891
+++ b/src/firewall/core/fw.py
21c891
@@ -113,6 +113,7 @@ class Firewall(object):
21c891
         self._log_denied = config.FALLBACK_LOG_DENIED
21c891
         self._automatic_helpers = config.FALLBACK_AUTOMATIC_HELPERS
21c891
         self._firewall_backend = config.FALLBACK_FIREWALL_BACKEND
21c891
+        self._flush_all_on_reload = config.FALLBACK_FLUSH_ALL_ON_RELOAD
21c891
         self.nf_conntrack_helper_setting = 0
21c891
         self.nf_conntrack_helpers = { }
21c891
         self.nf_nat_helpers = { }
21c891
@@ -298,6 +299,15 @@ class Firewall(object):
21c891
                 log.debug1("FirewallBackend is set to '%s'",
21c891
                            self._firewall_backend)
21c891
 
21c891
+            if self._firewalld_conf.get("FlushAllOnReload"):
21c891
+                value = self._firewalld_conf.get("FlushAllOnReload")
21c891
+                if value.lower() in [ "no", "false" ]:
21c891
+                    self._flush_all_on_reload = False
21c891
+                else:
21c891
+                    self._flush_all_on_reload = True
21c891
+                log.debug1("FlushAllOnReload is set to '%s'",
21c891
+                           self._flush_all_on_reload)
21c891
+
21c891
         self.config.set_firewalld_conf(copy.deepcopy(self._firewalld_conf))
21c891
 
21c891
         self._select_firewall_backend(self._firewall_backend)
21c891
@@ -963,13 +973,17 @@ class Firewall(object):
21c891
     def reload(self, stop=False):
21c891
         _panic = self._panic
21c891
 
21c891
-        # save zone interfaces
21c891
-        _zone_interfaces = { }
21c891
-        for zone in self.zone.get_zones():
21c891
-            _zone_interfaces[zone] = self.zone.get_settings(zone)["interfaces"]
21c891
-        # save direct config
21c891
-        _direct_config = self.direct.get_runtime_config()
21c891
-        _old_dz = self.get_default_zone()
21c891
+        # must stash this. The value may change after _start()
21c891
+        flush_all = self._flush_all_on_reload
21c891
+
21c891
+        if not flush_all:
21c891
+            # save zone interfaces
21c891
+            _zone_interfaces = { }
21c891
+            for zone in self.zone.get_zones():
21c891
+                _zone_interfaces[zone] = self.zone.get_settings(zone)["interfaces"]
21c891
+            # save direct config
21c891
+            _direct_config = self.direct.get_runtime_config()
21c891
+            _old_dz = self.get_default_zone()
21c891
 
21c891
         # stop
21c891
         self.cleanup()
21c891
@@ -984,41 +998,42 @@ class Firewall(object):
21c891
             # etc. We'll re-raise it at the end.
21c891
             start_exception = e
21c891
 
21c891
-        # handle interfaces in the default zone and move them to the new
21c891
-        # default zone if it changed
21c891
-        _new_dz = self.get_default_zone()
21c891
-        if _new_dz != _old_dz:
21c891
-            # if_new_dz has been introduced with the reload, we need to add it
21c891
-            # https://github.com/firewalld/firewalld/issues/53
21c891
-            if _new_dz not in _zone_interfaces:
21c891
-                _zone_interfaces[_new_dz] = { }
21c891
-            # default zone changed. Move interfaces from old default zone to
21c891
-            # the new one.
21c891
-            for iface, settings in list(_zone_interfaces[_old_dz].items()):
21c891
-                if settings["__default__"]:
21c891
-                    # move only those that were added to default zone
21c891
-                    # (not those that were added to specific zone same as
21c891
-                    # default)
21c891
-                    _zone_interfaces[_new_dz][iface] = \
21c891
-                        _zone_interfaces[_old_dz][iface]
21c891
-                    del _zone_interfaces[_old_dz][iface]
21c891
-
21c891
-        # add interfaces to zones again
21c891
-        for zone in self.zone.get_zones():
21c891
-            if zone in _zone_interfaces:
21c891
-                self.zone.set_settings(zone, { "interfaces":
21c891
-                                               _zone_interfaces[zone] })
21c891
-                del _zone_interfaces[zone]
21c891
-            else:
21c891
-                log.info1("New zone '%s'.", zone)
21c891
-        if len(_zone_interfaces) > 0:
21c891
-            for zone in list(_zone_interfaces.keys()):
21c891
-                log.info1("Lost zone '%s', zone interfaces dropped.", zone)
21c891
-                del _zone_interfaces[zone]
21c891
-        del _zone_interfaces
21c891
-
21c891
-        # restore direct config
21c891
-        self.direct.set_config(_direct_config)
21c891
+        if not flush_all:
21c891
+            # handle interfaces in the default zone and move them to the new
21c891
+            # default zone if it changed
21c891
+            _new_dz = self.get_default_zone()
21c891
+            if _new_dz != _old_dz:
21c891
+                # if_new_dz has been introduced with the reload, we need to add it
21c891
+                # https://github.com/firewalld/firewalld/issues/53
21c891
+                if _new_dz not in _zone_interfaces:
21c891
+                    _zone_interfaces[_new_dz] = { }
21c891
+                # default zone changed. Move interfaces from old default zone to
21c891
+                # the new one.
21c891
+                for iface, settings in list(_zone_interfaces[_old_dz].items()):
21c891
+                    if settings["__default__"]:
21c891
+                        # move only those that were added to default zone
21c891
+                        # (not those that were added to specific zone same as
21c891
+                        # default)
21c891
+                        _zone_interfaces[_new_dz][iface] = \
21c891
+                            _zone_interfaces[_old_dz][iface]
21c891
+                        del _zone_interfaces[_old_dz][iface]
21c891
+
21c891
+            # add interfaces to zones again
21c891
+            for zone in self.zone.get_zones():
21c891
+                if zone in _zone_interfaces:
21c891
+                    self.zone.set_settings(zone, { "interfaces":
21c891
+                                                   _zone_interfaces[zone] })
21c891
+                    del _zone_interfaces[zone]
21c891
+                else:
21c891
+                    log.info1("New zone '%s'.", zone)
21c891
+            if len(_zone_interfaces) > 0:
21c891
+                for zone in list(_zone_interfaces.keys()):
21c891
+                    log.info1("Lost zone '%s', zone interfaces dropped.", zone)
21c891
+                    del _zone_interfaces[zone]
21c891
+            del _zone_interfaces
21c891
+
21c891
+            # restore direct config
21c891
+            self.direct.set_config(_direct_config)
21c891
 
21c891
         # enable panic mode again if it has been enabled before or set policy
21c891
         # to ACCEPT
21c891
diff --git a/src/firewall/core/io/firewalld_conf.py b/src/firewall/core/io/firewalld_conf.py
21c891
index 4d57bad693c1..953a6d2618ec 100644
21c891
--- a/src/firewall/core/io/firewalld_conf.py
21c891
+++ b/src/firewall/core/io/firewalld_conf.py
21c891
@@ -30,7 +30,7 @@ from firewall.functions import b2u, u2b, PY2
21c891
 
21c891
 valid_keys = [ "DefaultZone", "MinimalMark", "CleanupOnExit", "Lockdown", 
21c891
                "IPv6_rpfilter", "IndividualCalls", "LogDenied",
21c891
-               "AutomaticHelpers", "FirewallBackend" ]
21c891
+               "AutomaticHelpers", "FirewallBackend", "FlushAllOnReload" ]
21c891
 
21c891
 class firewalld_conf(object):
21c891
     def __init__(self, filename):
21c891
@@ -80,6 +80,7 @@ class firewalld_conf(object):
21c891
             self.set("LogDenied", config.FALLBACK_LOG_DENIED)
21c891
             self.set("AutomaticHelpers", config.FALLBACK_AUTOMATIC_HELPERS)
21c891
             self.set("FirewallBackend", config.FALLBACK_FIREWALL_BACKEND)
21c891
+            self.set("FlushAllOnReload", "yes" if config.FALLBACK_FLUSH_ALL_ON_RELOAD else "no")
21c891
             raise
21c891
 
21c891
         for line in f:
21c891
@@ -183,6 +184,14 @@ class firewalld_conf(object):
21c891
                             config.FALLBACK_FIREWALL_BACKEND)
21c891
             self.set("FirewallBackend", str(config.FALLBACK_FIREWALL_BACKEND))
21c891
 
21c891
+        value = self.get("FlushAllOnReload")
21c891
+        if not value or value.lower() not in [ "yes", "true", "no", "false" ]:
21c891
+            if value is not None:
21c891
+                log.warning("FlushAllOnReload '%s' is not valid, using default "
21c891
+                            "value %s", value if value else '',
21c891
+                            config.FALLBACK_FLUSH_ALL_ON_RELOAD)
21c891
+            self.set("FlushAllOnReload", str(config.FALLBACK_FLUSH_ALL_ON_RELOAD))
21c891
+
21c891
     # save to self.filename if there are key/value changes
21c891
     def write(self):
21c891
         if len(self._config) < 1:
21c891
diff --git a/src/firewall/server/config.py b/src/firewall/server/config.py
21c891
index dfc562b537eb..ba04107fe4a1 100644
21c891
--- a/src/firewall/server/config.py
21c891
+++ b/src/firewall/server/config.py
21c891
@@ -106,6 +106,7 @@ class FirewallDConfig(slip.dbus.service.Object):
21c891
                                                 "LogDenied": "readwrite",
21c891
                                                 "AutomaticHelpers": "readwrite",
21c891
                                                 "FirewallBackend": "readwrite",
21c891
+                                                "FlushAllOnReload": "readwrite",
21c891
                                               })
21c891
 
21c891
     @handle_exceptions
21c891
@@ -485,7 +486,8 @@ class FirewallDConfig(slip.dbus.service.Object):
21c891
     def _get_property(self, prop):
21c891
         if prop not in [ "DefaultZone", "MinimalMark", "CleanupOnExit",
21c891
                          "Lockdown", "IPv6_rpfilter", "IndividualCalls",
21c891
-                         "LogDenied", "AutomaticHelpers", "FirewallBackend" ]:
21c891
+                         "LogDenied", "AutomaticHelpers", "FirewallBackend",
21c891
+                         "FlushAllOnReload" ]:
21c891
             raise dbus.exceptions.DBusException(
21c891
                 "org.freedesktop.DBus.Error.InvalidArgs: "
21c891
                 "Property '%s' does not exist" % prop)
21c891
@@ -530,6 +532,10 @@ class FirewallDConfig(slip.dbus.service.Object):
21c891
             if value is None:
21c891
                 value = config.FALLBACK_FIREWALL_BACKEND
21c891
             return dbus.String(value)
21c891
+        elif prop == "FlushAllOnReload":
21c891
+            if value is None:
21c891
+                value = "yes" if config.FALLBACK_FLUSH_ALL_ON_RELOAD else "no"
21c891
+            return dbus.String(value)
21c891
 
21c891
     @dbus_handle_exceptions
21c891
     def _get_dbus_property(self, prop):
21c891
@@ -551,6 +557,8 @@ class FirewallDConfig(slip.dbus.service.Object):
21c891
             return dbus.String(self._get_property(prop))
21c891
         elif prop == "FirewallBackend":
21c891
             return dbus.String(self._get_property(prop))
21c891
+        elif prop == "FlushAllOnReload":
21c891
+            return dbus.String(self._get_property(prop))
21c891
         else:
21c891
             raise dbus.exceptions.DBusException(
21c891
                 "org.freedesktop.DBus.Error.InvalidArgs: "
21c891
@@ -590,7 +598,8 @@ class FirewallDConfig(slip.dbus.service.Object):
21c891
         if interface_name == config.dbus.DBUS_INTERFACE_CONFIG:
21c891
             for x in [ "DefaultZone", "MinimalMark", "CleanupOnExit",
21c891
                        "Lockdown", "IPv6_rpfilter", "IndividualCalls",
21c891
-                       "LogDenied", "AutomaticHelpers", "FirewallBackend" ]:
21c891
+                       "LogDenied", "AutomaticHelpers", "FirewallBackend",
21c891
+                       "FlushAllOnReload" ]:
21c891
                 ret[x] = self._get_property(x)
21c891
         elif interface_name in [ config.dbus.DBUS_INTERFACE_CONFIG_DIRECT,
21c891
                                  config.dbus.DBUS_INTERFACE_CONFIG_POLICIES ]:
21c891
@@ -617,7 +626,7 @@ class FirewallDConfig(slip.dbus.service.Object):
21c891
             if property_name in [ "MinimalMark", "CleanupOnExit", "Lockdown",
21c891
                                   "IPv6_rpfilter", "IndividualCalls",
21c891
                                   "LogDenied", "AutomaticHelpers",
21c891
-                                  "FirewallBackend" ]:
21c891
+                                  "FirewallBackend", "FlushAllOnReload" ]:
21c891
                 if property_name == "MinimalMark":
21c891
                     try:
21c891
                         int(new_value)
21c891
@@ -651,6 +660,11 @@ class FirewallDConfig(slip.dbus.service.Object):
21c891
                         raise FirewallError(errors.INVALID_VALUE,
21c891
                                             "'%s' for %s" % \
21c891
                                             (new_value, property_name))
21c891
+                if property_name == "FlushAllOnReload":
21c891
+                    if new_value.lower() not in ["yes", "true", "no", "false"]:
21c891
+                        raise FirewallError(errors.INVALID_VALUE,
21c891
+                                            "'%s' for %s" % \
21c891
+                                            (new_value, property_name))
21c891
                 self.config.get_firewalld_conf().set(property_name, new_value)
21c891
                 self.config.get_firewalld_conf().write()
21c891
                 self.PropertiesChanged(interface_name,
21c891
diff --git a/src/tests/dbus/firewalld.conf.at b/src/tests/dbus/firewalld.conf.at
21c891
index 473210de10af..72c61bdc4940 100644
21c891
--- a/src/tests/dbus/firewalld.conf.at
21c891
+++ b/src/tests/dbus/firewalld.conf.at
21c891
@@ -6,6 +6,7 @@ string "AutomaticHelpers" : variant string "system"
21c891
 string "CleanupOnExit" : variant string "no"
21c891
 string "DefaultZone" : variant string "public"
21c891
 string "FirewallBackend" : variant string "nftables"
21c891
+string "FlushAllOnReload" : variant string "yes"
21c891
 m4_if(no, HOST_SUPPORTS_NFT_FIB, [dnl
21c891
 string "IPv6_rpfilter" : variant string "no"],[dnl
21c891
 string "IPv6_rpfilter" : variant string "yes"])
21c891
@@ -30,6 +31,7 @@ _helper([LogDenied], [string:"all"], [variant string "all"])
21c891
 _helper([IPv6_rpfilter], [string:"yes"], [variant string "yes"])
21c891
 _helper([IndividualCalls], [string:"yes"], [variant string "yes"])
21c891
 _helper([FirewallBackend], [string:"iptables"], [variant string "iptables"])
21c891
+_helper([FlushAllOnReload], [string:"no"], [variant string "no"])
21c891
 _helper([CleanupOnExit], [string:"yes"], [variant string "yes"])
21c891
 dnl Note: DefaultZone is RO
21c891
 m4_undefine([_helper])
21c891
diff --git a/src/tests/python/firewalld_direct.py b/src/tests/python/firewalld_direct.py
21c891
index 4cb843492663..28da523d35d0 100755
21c891
--- a/src/tests/python/firewalld_direct.py
21c891
+++ b/src/tests/python/firewalld_direct.py
21c891
@@ -36,10 +36,16 @@ class TestFirewallDInterfaceDirect(unittest.TestCase):
21c891
         bus = dbus.SystemBus()
21c891
         dbus_obj = bus.get_object(config.dbus.DBUS_INTERFACE,
21c891
                                   config.dbus.DBUS_PATH)
21c891
+        dbus_obj_config = bus.get_object(config.dbus.DBUS_INTERFACE,
21c891
+                                         config.dbus.DBUS_PATH_CONFIG)
21c891
         self.fw = dbus.Interface(dbus_obj,
21c891
                                  dbus_interface=config.dbus.DBUS_INTERFACE)
21c891
         self.fw_direct = dbus.Interface(
21c891
             dbus_obj, dbus_interface=config.dbus.DBUS_INTERFACE_DIRECT)
21c891
+        self.config_properties = dbus.Interface(dbus_obj_config,
21c891
+                                    dbus_interface='org.freedesktop.DBus.Properties')
21c891
+        self.config_properties.Set(config.dbus.DBUS_INTERFACE_CONFIG, "FlushAllOnReload", "no")
21c891
+        self.fw.reload()
21c891
         # always have "direct_foo1" available
21c891
         self.fw_direct.addChain("ipv4", "filter", "direct_foo1")
21c891
 
21c891
diff --git a/src/tests/python/firewalld_test.py b/src/tests/python/firewalld_test.py
21c891
index 62c567fcd299..0d8b4c78bd51 100755
21c891
--- a/src/tests/python/firewalld_test.py
21c891
+++ b/src/tests/python/firewalld_test.py
21c891
@@ -28,8 +28,8 @@ import sys
21c891
 import time
21c891
 import unittest
21c891
 
21c891
-from firewall.config.dbus import DBUS_PATH, DBUS_INTERFACE, \
21c891
-                                 DBUS_INTERFACE_ZONE
21c891
+from firewall.config.dbus import DBUS_PATH, DBUS_PATH_CONFIG, DBUS_INTERFACE, \
21c891
+                                 DBUS_INTERFACE_ZONE, DBUS_INTERFACE_CONFIG
21c891
 from firewall.dbus_utils import dbus_to_python
21c891
 from pprint import pprint
21c891
 
21c891
@@ -43,9 +43,14 @@ class TestFirewallD(unittest.TestCase):
21c891
         unittest.TestCase.setUp(self)
21c891
         bus = dbus.SystemBus()
21c891
         dbus_obj = bus.get_object(DBUS_INTERFACE, DBUS_PATH)
21c891
+        dbus_obj_config = bus.get_object(DBUS_INTERFACE, DBUS_PATH_CONFIG)
21c891
         self.fw = dbus.Interface(dbus_obj, dbus_interface=DBUS_INTERFACE)
21c891
         self.fw_zone = dbus.Interface(dbus_obj,
21c891
                                      dbus_interface=DBUS_INTERFACE_ZONE)
21c891
+        self.config_properties = dbus.Interface(dbus_obj_config,
21c891
+                                    dbus_interface='org.freedesktop.DBus.Properties')
21c891
+        self.config_properties.Set(DBUS_INTERFACE_CONFIG, "FlushAllOnReload", "no")
21c891
+        self.fw.reload()
21c891
 
21c891
     def test_get_setDefaultZone(self):
21c891
         old_zone = dbus_to_python(self.fw.getDefaultZone())
21c891
diff --git a/src/tests/regression/rhbz1498923.at b/src/tests/regression/rhbz1498923.at
21c891
index 9b68678180ef..ed1022fb0ca4 100644
21c891
--- a/src/tests/regression/rhbz1498923.at
21c891
+++ b/src/tests/regression/rhbz1498923.at
21c891
@@ -1,4 +1,8 @@
21c891
 FWD_START_TEST([invalid direct rule causes reload error])
21c891
+dnl Below we test retention of some items applicable to FlushAllOnReload=no
21c891
+AT_CHECK([sed -i 's/^FlushAllOnReload.*/FlushAllOnReload=no/' ./firewalld.conf])
21c891
+FWD_RELOAD
21c891
+
21c891
 FWD_CHECK([-q --permanent --direct --add-rule ipv4 filter INPUT 0 -p tcp --dport 8080 -j ACCEPT])
21c891
 FWD_CHECK([-q --permanent --direct --add-rule ipv4 filter INPUT 1 --a-bogus-flag])
21c891
 
21c891
-- 
21c891
2.18.0
21c891