From b5a469a894ea2d09c4934d8966dafcae656aa5a7 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Wed, 3 Feb 2016 09:05:25 +0100 Subject: [PATCH] device: check nm_ip6_config_get_address_first_nontentative() argument Since commit 9ff161b2a1b0 ("device: move have_ip6_address() to nm_ip6_config_get_address_first_nontentative()") the IP configuration argument of nm_ip6_config_get_address_first_nontentative() must be non-NULL. Add checks where needed. Fixes: 9ff161b2a1b0d4a63f91d326050ae1b8906b7b1b --- src/devices/nm-device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 712c9d90e..dd25c4b1a 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -5538,7 +5538,8 @@ linklocal6_start (NMDevice *self) linklocal6_cleanup (self); - if (nm_ip6_config_get_address_first_nontentative (priv->ip6_config, TRUE)) + if ( priv->ip6_config + && nm_ip6_config_get_address_first_nontentative (priv->ip6_config, TRUE)) return NM_ACT_STAGE_RETURN_FINISH; connection = nm_device_get_applied_connection (self); @@ -5773,7 +5774,8 @@ rdisc_ra_timeout (NMRDisc *rdisc, NMDevice *self) * IPv6 configuration, like manual IPv6 addresses or external IPv6 * config, consider that sufficient for IPv6 success. */ - if (nm_ip6_config_get_address_first_nontentative (priv->ip6_config, FALSE)) + if ( priv->ip6_config + && nm_ip6_config_get_address_first_nontentative (priv->ip6_config, FALSE)) nm_device_activate_schedule_ip6_config_result (self); else nm_device_activate_schedule_ip6_config_timeout (self);