Blame SOURCES/0002-RHEL-only-default-to-AllowZoneDrifting-yes.patch

63f414
From bccc66877af7baa95e70c4314e3016ac78c4bbc7 Mon Sep 17 00:00:00 2001
087194
From: Eric Garver <eric@garver.life>
087194
Date: Tue, 4 Feb 2020 09:12:17 -0500
63f414
Subject: [PATCH 02/22] RHEL only: default to AllowZoneDrifting=yes
087194
087194
---
63f414
 config/firewalld.conf              | 4 ++--
63f414
 doc/xml/firewalld.conf.xml         | 2 +-
63f414
 doc/xml/firewalld.dbus.xml         | 2 +-
63f414
 src/firewall/config/__init__.py.in | 2 +-
63f414
 src/tests/functions.at             | 5 +++++
63f414
 5 files changed, 10 insertions(+), 5 deletions(-)
087194
087194
diff --git a/config/firewalld.conf b/config/firewalld.conf
40251c
index 532f0452212e..f791b2358ab8 100644
087194
--- a/config/firewalld.conf
087194
+++ b/config/firewalld.conf
40251c
@@ -71,5 +71,5 @@ RFC3964_IPv4=yes
087194
 # Note: If "yes" packets will only drift from source based zones to interface
087194
 # based zones (including the default zone). Packets never drift from interface
087194
 # based zones to other interfaces based zones (including the default zone).
087194
-# Possible values; "yes", "no". Defaults to "no".
087194
-AllowZoneDrifting=no
087194
+# Possible values; "yes", "no". Defaults to "yes".
087194
+AllowZoneDrifting=yes
087194
diff --git a/doc/xml/firewalld.conf.xml b/doc/xml/firewalld.conf.xml
40251c
index fcfbfd2b68c1..c21ef87813bc 100644
087194
--- a/doc/xml/firewalld.conf.xml
087194
+++ b/doc/xml/firewalld.conf.xml
087194
@@ -197,7 +197,7 @@
087194
                 to interface based zones (including the default zone). Packets
087194
                 never drift from interface based zones to other interfaces
087194
                 based zones (including the default zone).
087194
-                Valid values; "yes", "no". Defaults to "no".
087194
+                Valid values; "yes", "no". Defaults to "yes".
087194
                 </para>
087194
             </listitem>
087194
         </varlistentry>
087194
diff --git a/doc/xml/firewalld.dbus.xml b/doc/xml/firewalld.dbus.xml
63f414
index b75067e12c51..d68c775ee5bf 100644
087194
--- a/doc/xml/firewalld.dbus.xml
087194
+++ b/doc/xml/firewalld.dbus.xml
63f414
@@ -2787,7 +2787,7 @@
087194
                 to interface based zones (including the default zone). Packets
087194
                 never drift from interface based zones to other interfaces
087194
                 based zones (including the default zone).
087194
-                Valid values; "yes", "no". Defaults to "no".
087194
+                Valid values; "yes", "no". Defaults to "yes".
087194
             </para></listitem>
087194
           </varlistentry>
087194
           <varlistentry id="FirewallD1.config.Properties.AutomaticHelpers">
087194
diff --git a/src/firewall/config/__init__.py.in b/src/firewall/config/__init__.py.in
63f414
index e875e849dec1..0dec7913f694 100644
087194
--- a/src/firewall/config/__init__.py.in
087194
+++ b/src/firewall/config/__init__.py.in
63f414
@@ -133,4 +133,4 @@ FALLBACK_AUTOMATIC_HELPERS = "no"
087194
 FALLBACK_FIREWALL_BACKEND = "nftables"
087194
 FALLBACK_FLUSH_ALL_ON_RELOAD = True
087194
 FALLBACK_RFC3964_IPV4 = True
087194
-FALLBACK_ALLOW_ZONE_DRIFTING = False
087194
+FALLBACK_ALLOW_ZONE_DRIFTING = True
087194
diff --git a/src/tests/functions.at b/src/tests/functions.at
63f414
index 6b1263b178dc..7ac28d514233 100644
087194
--- a/src/tests/functions.at
087194
+++ b/src/tests/functions.at
63f414
@@ -123,6 +123,11 @@ m4_define([FWD_START_TEST], [
63f414
         dnl set the appropriate backend
63f414
         AT_CHECK([sed -i 's/^FirewallBackend.*/FirewallBackend=FIREWALL_BACKEND/' ./firewalld.conf])
087194
 
63f414
+        dnl Expected test results assume this is set to "no", but downstream
63f414
+        dnl RHEL overrides it to "yes". Override it back to "no" so we don't
63f414
+        dnl have to fix up all the tests when bringing them from upstream.
63f414
+        AT_CHECK([sed -i 's/^AllowZoneDrifting.*/AllowZoneDrifting=no/' ./firewalld.conf])
087194
+
63f414
         dnl fib matching is pretty new in nftables. Don't use rpfilter on older
63f414
         dnl kernels.
63f414
         m4_if(nftables, FIREWALL_BACKEND, [
087194
-- 
63f414
2.27.0
087194