gsm/bt: fix merge of user-defined IPv4 settings
This commit is contained in:
@@ -1223,6 +1223,7 @@ real_act_stage4_get_ip4_config (NMDevice *self,
|
||||
if (nm_device_get_use_dhcp (self)) {
|
||||
*config = nm_dhcp_manager_get_ip4_config (priv->dhcp_manager, ip_iface);
|
||||
if (*config) {
|
||||
/* Merge user-defined overrides into the IP4Config to be applied */
|
||||
nm_utils_merge_ip4_config (*config, s_ip4);
|
||||
|
||||
nm_dhcp4_config_reset (priv->dhcp4_config);
|
||||
@@ -1247,9 +1248,10 @@ real_act_stage4_get_ip4_config (NMDevice *self,
|
||||
*config = aipd_get_ip4_config (self, reason);
|
||||
} else if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_MANUAL)) {
|
||||
*config = nm_ip4_config_new ();
|
||||
if (*config)
|
||||
if (*config) {
|
||||
/* Merge user-defined overrides into the IP4Config to be applied */
|
||||
nm_utils_merge_ip4_config (*config, s_ip4);
|
||||
else
|
||||
} else
|
||||
*reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE;
|
||||
} else if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_SHARED)) {
|
||||
*config = nm_device_new_ip4_shared_config (self, reason);
|
||||
@@ -1448,6 +1450,7 @@ real_act_stage4_get_ip6_config (NMDevice *self,
|
||||
return NM_ACT_STAGE_RETURN_FAILURE;
|
||||
}
|
||||
|
||||
/* Merge user-defined overrides into the IP6Config to be applied */
|
||||
if (!strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_MANUAL))
|
||||
nm_utils_merge_ip6_config (*config, s_ip6);
|
||||
|
||||
|
Reference in New Issue
Block a user