merge: branch 'ih/unrealized-parents'

core: virtual devices can be available without a parent

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2203
This commit is contained in:
Íñigo Huguet
2025-05-14 05:42:36 +00:00
5 changed files with 0 additions and 51 deletions

View File

@@ -137,14 +137,6 @@ link_changed(NMDevice *device, const NMPlatformLink *pllink)
nm_device_parent_set_ifindex(device, parent);
}
static gboolean
is_available(NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
{
if (!nm_device_parent_get_device(device))
return FALSE;
return NM_DEVICE_CLASS(nm_device_6lowpan_parent_class)->is_available(device, flags);
}
static gboolean
complete_connection(NMDevice *device,
NMConnection *connection,
@@ -237,7 +229,6 @@ nm_device_6lowpan_class_init(NMDevice6LowpanClass *klass)
device_class->get_generic_capabilities = get_generic_capabilities;
device_class->get_configured_mtu = nm_device_get_configured_mtu_for_wired;
device_class->link_changed = link_changed;
device_class->is_available = is_available;
device_class->parent_changed_notify = parent_changed_notify;
device_class->update_connection = update_connection;
}

View File

@@ -221,16 +221,6 @@ get_generic_capabilities(NMDevice *device)
/*****************************************************************************/
static gboolean
is_available(NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
{
if (!nm_device_parent_get_device(device))
return FALSE;
return NM_DEVICE_CLASS(nm_device_ipvlan_parent_class)->is_available(device, flags);
}
/*****************************************************************************/
static gboolean
check_connection_compatible(NMDevice *device,
NMConnection *connection,
@@ -376,7 +366,6 @@ nm_device_ipvlan_class_init(NMDeviceIpvlanClass *klass)
device_class->check_connection_compatible = check_connection_compatible;
device_class->create_and_realize = create_and_realize;
device_class->get_generic_capabilities = get_generic_capabilities;
device_class->is_available = is_available;
device_class->link_changed = link_changed;
device_class->update_connection = update_connection;

View File

@@ -683,14 +683,6 @@ get_generic_capabilities(NMDevice *dev)
/******************************************************************/
static gboolean
is_available(NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
{
if (!nm_device_parent_get_device(device))
return FALSE;
return NM_DEVICE_CLASS(nm_device_macsec_parent_class)->is_available(device, flags);
}
static gboolean
create_and_realize(NMDevice *device,
NMConnection *connection,
@@ -903,7 +895,6 @@ nm_device_macsec_class_init(NMDeviceMacsecClass *klass)
device_class->deactivate = deactivate;
device_class->get_generic_capabilities = get_generic_capabilities;
device_class->link_changed = link_changed;
device_class->is_available = is_available;
device_class->parent_changed_notify = parent_changed_notify;
device_class->state_changed = device_state_changed;
device_class->get_configured_mtu = nm_device_get_configured_mtu_wired_parent;

View File

@@ -270,16 +270,6 @@ get_generic_capabilities(NMDevice *device)
/*****************************************************************************/
static gboolean
is_available(NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
{
if (!nm_device_parent_get_device(device))
return FALSE;
return NM_DEVICE_CLASS(nm_device_macvlan_parent_class)->is_available(device, flags);
}
/*****************************************************************************/
static gboolean
check_connection_compatible(NMDevice *device,
NMConnection *connection,
@@ -508,7 +498,6 @@ nm_device_macvlan_class_init(NMDeviceMacvlanClass *klass)
device_class->create_and_realize = create_and_realize;
device_class->get_generic_capabilities = get_generic_capabilities;
device_class->get_configured_mtu = nm_device_get_configured_mtu_wired_parent;
device_class->is_available = is_available;
device_class->link_changed = link_changed;
device_class->parent_changed_notify = parent_changed_notify;
device_class->update_connection = update_connection;

View File

@@ -292,16 +292,6 @@ get_generic_capabilities(NMDevice *device)
/*****************************************************************************/
static gboolean
is_available(NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
{
if (!nm_device_parent_get_device(device))
return FALSE;
return NM_DEVICE_CLASS(nm_device_vlan_parent_class)->is_available(device, flags);
}
/*****************************************************************************/
static gboolean
check_connection_compatible(NMDevice *device,
NMConnection *connection,
@@ -561,7 +551,6 @@ nm_device_vlan_class_init(NMDeviceVlanClass *klass)
device_class->act_stage1_prepare_set_hwaddr_ethernet = TRUE;
device_class->act_stage1_prepare = act_stage1_prepare;
device_class->get_configured_mtu = nm_device_get_configured_mtu_wired_parent;
device_class->is_available = is_available;
device_class->parent_changed_notify = parent_changed_notify;
device_class->check_connection_compatible = check_connection_compatible;