mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-05 04:10:28 +01:00
ethernet: don't crash for PPPoE connections with no wired setting
PPPoE connections don't necessarily have a wired setting, so don't require one here.
This commit is contained in:
parent
ac697a912e
commit
6701181c35
1 changed files with 7 additions and 7 deletions
|
|
@ -1036,13 +1036,13 @@ act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason)
|
|||
req = nm_device_get_act_request (NM_DEVICE (self));
|
||||
g_return_val_if_fail (req != NULL, NM_ACT_STAGE_RETURN_FAILURE);
|
||||
|
||||
s_wired = NM_SETTING_WIRED (device_get_setting (dev, NM_TYPE_SETTING_WIRED));
|
||||
g_assert (s_wired);
|
||||
|
||||
/* Set device MAC address if the connection wants to change it */
|
||||
cloned_mac = nm_setting_wired_get_cloned_mac_address (s_wired);
|
||||
if (cloned_mac && (cloned_mac->len == ETH_ALEN))
|
||||
_set_hw_addr (self, (const guint8 *) cloned_mac->data, "set");
|
||||
s_wired = (NMSettingWired *) device_get_setting (dev, NM_TYPE_SETTING_WIRED);
|
||||
if (s_wired) {
|
||||
/* Set device MAC address if the connection wants to change it */
|
||||
cloned_mac = nm_setting_wired_get_cloned_mac_address (s_wired);
|
||||
if (cloned_mac && (cloned_mac->len == ETH_ALEN))
|
||||
_set_hw_addr (self, (const guint8 *) cloned_mac->data, "set");
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue