diff options
author | Thomas Haller <thaller@redhat.com> | 2020-11-03 12:32:08 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-11-03 12:32:54 +0100 |
commit | 11068cf93693fdb7931c63d4d3095ab0e8c49fb3 (patch) | |
tree | 9eef023c91c9e93dd436abd6a1db4dda4df11c4b | |
parent | affff881e2c6a732abebb427c24588784386eb55 (diff) | |
download | NetworkManager-11068cf93693fdb7931c63d4d3095ab0e8c49fb3.tar.gz |
device: fix crash in nm_device_reactivate_ip_config()
Fixes: 87f69f00506f ('device: merge nm_device_reactivate_ip_config() implementations for IPv4/IPv6')
-rw-r--r-- | src/devices/nm-device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 63178a63c5..6e53048bb4 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -12263,10 +12263,10 @@ nm_device_reactivate_ip_config(NMDevice * self, nm_device_get_route_metric(self, AF_INET6)); } - method_old = nm_setting_ip_config_get_method(s_ip_old) + method_old = (s_ip_old ? nm_setting_ip_config_get_method(s_ip_old) : NULL) ?: (IS_IPv4 ? NM_SETTING_IP4_CONFIG_METHOD_DISABLED : NM_SETTING_IP6_CONFIG_METHOD_IGNORE); - method_new = nm_setting_ip_config_get_method(s_ip_new) + method_new = (s_ip_new ? nm_setting_ip_config_get_method(s_ip_new) : NULL) ?: (IS_IPv4 ? NM_SETTING_IP4_CONFIG_METHOD_DISABLED : NM_SETTING_IP6_CONFIG_METHOD_IGNORE); |