|
|
21c21d |
From d951e7c7d64c0378424b8b2edd406ae9eaa73ec1 Mon Sep 17 00:00:00 2001
|
|
|
21c21d |
From: "David Kaspar [Dee'Kej]" <dkaspar@redhat.com>
|
|
|
21c21d |
Date: Wed, 6 Jun 2018 19:19:11 +0200
|
|
|
21c21d |
Subject: [PATCH] network-scripts: setting of firewall ZONE fixed
|
|
|
21c21d |
|
|
|
21c21d |
For currently unknown reason the dbus-send calls will fail to set the
|
|
|
21c21d |
firewall zone for the given interface if we omit the --print-reply
|
|
|
21c21d |
option...
|
|
|
21c21d |
|
|
|
21c21d |
This looks like some kind of race-condition in dbus-send, since the
|
|
|
21c21d |
--print-reply makes the call synchronous and slower.
|
|
|
21c21d |
|
|
|
21c21d |
Hopefully this is only a temporary workaround until DBus is fixed.
|
|
|
21c21d |
|
|
|
21c21d |
Resolves: #1586284
|
|
|
21c21d |
---
|
|
|
21c21d |
sysconfig/network-scripts/ifdown-post | 4 ++--
|
|
|
21c21d |
sysconfig/network-scripts/ifup-eth | 3 ++-
|
|
|
21c21d |
sysconfig/network-scripts/ifup-post | 4 ++--
|
|
|
21c21d |
3 files changed, 6 insertions(+), 5 deletions(-)
|
|
|
21c21d |
|
|
|
21c21d |
diff --git a/sysconfig/network-scripts/ifdown-post b/sysconfig/network-scripts/ifdown-post
|
|
|
21c21d |
index 9db16ad3..48a57ae4 100755
|
|
|
21c21d |
--- a/sysconfig/network-scripts/ifdown-post
|
|
|
21c21d |
+++ b/sysconfig/network-scripts/ifdown-post
|
|
|
21c21d |
@@ -53,9 +53,9 @@ if ! check_default_route ; then
|
|
|
21c21d |
fi
|
|
|
21c21d |
fi
|
|
|
21c21d |
|
|
|
21c21d |
-# Reset firewall ZONE to "default":
|
|
|
21c21d |
+# Reset firewall zone (empty ZONE means default):
|
|
|
21c21d |
if [ "${REALDEVICE}" != "lo" ]; then
|
|
|
21c21d |
- dbus-send --system --dest=org.fedoraproject.FirewallD1 \
|
|
|
21c21d |
+ dbus-send --print-reply --system --dest=org.fedoraproject.FirewallD1 \
|
|
|
21c21d |
/org/fedoraproject/FirewallD1 \
|
|
|
21c21d |
org.fedoraproject.FirewallD1.zone.removeInterface \
|
|
|
21c21d |
string: "" string:"${DEVICE}" \
|
|
|
21c21d |
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth
|
|
|
21c21d |
index bee5c4f0..ab59244a 100755
|
|
|
21c21d |
--- a/sysconfig/network-scripts/ifup-eth
|
|
|
21c21d |
+++ b/sysconfig/network-scripts/ifup-eth
|
|
|
21c21d |
@@ -339,7 +339,8 @@ fi
|
|
|
21c21d |
/etc/sysconfig/network-scripts/ifup-ipv6 ${CONFIG}
|
|
|
21c21d |
if is_true "${DHCPV6C}" && [ -x /sbin/dhclient ]; then
|
|
|
21c21d |
|
|
|
21c21d |
- # Assign interface into a firewalld zone so we can obtain the IPv6 via DHCPv6:
|
|
|
21c21d |
+ # Assign interface into a firewalld zone so we can
|
|
|
21c21d |
+ # obtain the IPv6 via DHCPv6 (empty ZONE means default):
|
|
|
21c21d |
if [ "${REALDEVICE}" != "lo" ]; then
|
|
|
21c21d |
dbus-send --print-reply --system --dest=org.fedoraproject.FirewallD1 \
|
|
|
21c21d |
/org/fedoraproject/FirewallD1 \
|
|
|
21c21d |
diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post
|
|
|
21c21d |
index c9d91700..c002503f 100755
|
|
|
21c21d |
--- a/sysconfig/network-scripts/ifup-post
|
|
|
21c21d |
+++ b/sysconfig/network-scripts/ifup-post
|
|
|
21c21d |
@@ -132,9 +132,9 @@ if [ "$2" = "boot" -a \
|
|
|
21c21d |
fi
|
|
|
21c21d |
fi
|
|
|
21c21d |
|
|
|
21c21d |
-# Set firewall ZONE for this device (empty means default):
|
|
|
21c21d |
+# Set firewall ZONE for this device (empty ZONE means default):
|
|
|
21c21d |
if [ "${REALDEVICE}" != "lo" ]; then
|
|
|
21c21d |
- dbus-send --system --dest=org.fedoraproject.FirewallD1 \
|
|
|
21c21d |
+ dbus-send --print-reply --system --dest=org.fedoraproject.FirewallD1 \
|
|
|
21c21d |
/org/fedoraproject/FirewallD1 \
|
|
|
21c21d |
org.fedoraproject.FirewallD1.zone.changeZoneOfInterface \
|
|
|
21c21d |
string:"${ZONE}" string:"${DEVICE}" \
|
|
|
21c21d |
--
|
|
|
21c21d |
2.14.4
|
|
|
21c21d |
|