mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-04 00:11:05 +02:00
core: implement update_connection() for Generic devices
tun/tap, macvlan, and GRE devices may be bridge, bond, or team slaves and should get that configuration detected at startup.
This commit is contained in:
parent
142bca6504
commit
0626fe37d0
1 changed files with 10 additions and 0 deletions
|
|
@ -95,6 +95,13 @@ check_connection_compatible (NMDevice *device,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
update_connection (NMDevice *device, NMConnection *connection)
|
||||
{
|
||||
if (!nm_connection_get_setting_generic (connection))
|
||||
nm_connection_add_setting (connection, nm_setting_generic_new ());
|
||||
}
|
||||
|
||||
/**************************************************************/
|
||||
|
||||
NMDevice *
|
||||
|
|
@ -184,6 +191,8 @@ nm_device_generic_class_init (NMDeviceGenericClass *klass)
|
|||
|
||||
g_type_class_add_private (klass, sizeof (NMDeviceGenericPrivate));
|
||||
|
||||
parent_class->connection_type = NM_SETTING_GENERIC_SETTING_NAME;
|
||||
|
||||
object_class->constructed = constructed;
|
||||
object_class->dispose = dispose;
|
||||
object_class->get_property = get_property;
|
||||
|
|
@ -191,6 +200,7 @@ nm_device_generic_class_init (NMDeviceGenericClass *klass)
|
|||
|
||||
parent_class->get_generic_capabilities = get_generic_capabilities;
|
||||
parent_class->check_connection_compatible = check_connection_compatible;
|
||||
parent_class->update_connection = update_connection;
|
||||
|
||||
/* properties */
|
||||
g_object_class_install_property
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue