diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2016-10-14 19:57:34 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2017-01-05 09:39:41 +0100 |
commit | 479a64a5b7b59a97dfb8d88c886943742a29d9d6 (patch) | |
tree | 1394a724bd0c7a0073de02730227366fe76bcb1f | |
parent | c5650d35000f12d3aa9305b2728ce7c3f8444ff5 (diff) |
device: avoid a crash when L3 configuration fails
Don't call the IP check until at either IPv4 or IPv6 is actually
configured.
(cherry picked from commit aa71dbc6c42d2c4ffaf921a8e5dd9c1175f20372)
-rw-r--r-- | src/devices/nm-device.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index ac840ab93..2676aac85 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -6909,12 +6909,16 @@ fw_change_zone_cb_ip_check (NMFirewallManager *firewall_manager, gpointer user_data) { NMDevice *self = user_data; + NMDevicePrivate *priv; if (!fw_change_zone_handle (self, call_id, error)) return; /* FIXME: fail the device on error? */ - nm_device_start_ip_check (self); + + priv = NM_DEVICE_GET_PRIVATE (self); + if (priv->ip4_state == IP_DONE || priv->ip6_state == IP_DONE) + nm_device_start_ip_check (self); } /* |