mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-10 16:20:15 +01:00
merge: branch 'fix_ovs'
device: do not set MAC address on iface with index <=0 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1691
This commit is contained in:
commit
2d261ec768
1 changed files with 8 additions and 1 deletions
|
|
@ -17215,6 +17215,7 @@ nm_device_hw_addr_reset(NMDevice *self, const char *detail)
|
|||
{
|
||||
NMDevicePrivate *priv;
|
||||
const char *addr;
|
||||
int ifindex;
|
||||
|
||||
g_return_val_if_fail(NM_IS_DEVICE(self), FALSE);
|
||||
|
||||
|
|
@ -17224,7 +17225,13 @@ nm_device_hw_addr_reset(NMDevice *self, const char *detail)
|
|||
return TRUE;
|
||||
|
||||
priv->hw_addr_type = HW_ADDR_TYPE_UNSET;
|
||||
addr = nm_device_get_initial_hw_address(self);
|
||||
|
||||
ifindex = nm_device_get_ip_ifindex(self);
|
||||
if (ifindex <= 0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
addr = nm_device_get_initial_hw_address(self);
|
||||
if (!addr) {
|
||||
/* as hw_addr_type is not UNSET, we expect that we can get an
|
||||
* initial address to which to reset. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue