From aa71dbc6c42d2c4ffaf921a8e5dd9c1175f20372 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Fri, 14 Oct 2016 19:57:34 +0200 Subject: [PATCH] device: avoid a crash when L3 configuration fails Don't call the IP check until at either IPv4 or IPv6 is actually configured. --- src/devices/nm-device.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index e67948cb2..50c065f6b 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -6984,12 +6984,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); } /*