mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-05 14:40:33 +01:00
device: set failure reason when settings hardware address fails
This commit is contained in:
parent
e034cc3264
commit
34895adcc4
2 changed files with 8 additions and 2 deletions
|
|
@ -355,8 +355,12 @@ act_stage1_prepare (NMDevice *device, NMDeviceStateReason *out_failure_reason)
|
|||
if (priv->props.type == IFF_TUN) {
|
||||
/* Nothing to do for TUN devices */
|
||||
} else {
|
||||
if (!nm_device_hw_addr_set_cloned (device, nm_device_get_applied_connection (device), FALSE))
|
||||
if (!nm_device_hw_addr_set_cloned (device,
|
||||
nm_device_get_applied_connection (device),
|
||||
FALSE)) {
|
||||
*out_failure_reason = NM_DEVICE_STATE_REASON_CONFIG_FAILED;
|
||||
return NM_ACT_STAGE_RETURN_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
return NM_ACT_STAGE_RETURN_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -2658,8 +2658,10 @@ act_stage1_prepare (NMDevice *device, NMDeviceStateReason *out_failure_reason)
|
|||
priv->hw_addr_scan_expire = 0;
|
||||
|
||||
/* Set spoof MAC to the interface */
|
||||
if (!nm_device_hw_addr_set_cloned (device, connection, TRUE))
|
||||
if (!nm_device_hw_addr_set_cloned (device, connection, TRUE)) {
|
||||
*out_failure_reason = NM_DEVICE_STATE_REASON_CONFIG_FAILED;
|
||||
return NM_ACT_STAGE_RETURN_FAILURE;
|
||||
}
|
||||
|
||||
/* AP and Mesh modes never use a specific object or existing scanned AP */
|
||||
if (!NM_IN_SET (priv->mode, NM_802_11_MODE_AP,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue