summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-05-04 15:04:10 +0200
committerThomas Haller <thaller@redhat.com>2017-05-05 12:14:14 +0200
commitbaa8b4029c46532293377126ce3dfa3ec0990716 (patch)
treec50427f0fe930d967da9b5ef27e1fc749392d2f6
parentacf1067a455b02b60985e209df568d3fcc3fac9e (diff)
downloadNetworkManager-baa8b4029c46532293377126ce3dfa3ec0990716.tar.gz
device: fix changing firewall zone during _set_state_full()
For regular devices that don't have a separate ip_iface/ip_ifindex, the ip_ifindex is left at zero. Hence, the condition is always true and does not work as intended, resulting in setting the firewall zone twice. Fixes: 7cf5c326bc9a3e3166c682f3d70f65b895f2cd20
-rw-r--r--src/devices/nm-device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index f30c472c7b..2f223d2104 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -12663,7 +12663,7 @@ _set_state_full (NMDevice *self,
applied_connection = nm_device_get_applied_connection (self);
if ( applied_connection
- && priv->ifindex != priv->ip_ifindex
+ && priv->ip_iface
&& !nm_device_sys_iface_state_is_external (self)) {
NMSettingConnection *s_con;
const char *zone;