mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 01:20:35 +01:00
core: compatible connections are always available on master devices
Master devices depend on their slaves/ports for carrier status, so the carrier can't factor into whether a connection is available on that device or not. If it did, then no connections could be activated because the device doesn't have a carrier until slaves are attached.
This commit is contained in:
parent
2b2383e9c5
commit
779b699457
3 changed files with 36 additions and 0 deletions
|
|
@ -85,6 +85,17 @@ is_available (NMDevice *dev)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
check_connection_available (NMDevice *device,
|
||||
NMConnection *connection,
|
||||
const char *specific_object)
|
||||
{
|
||||
/* Connections are always available because the carrier state is determined
|
||||
* by the slave carrier states, not the bonds's state.
|
||||
*/
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
check_connection_compatible (NMDevice *device,
|
||||
NMConnection *connection,
|
||||
|
|
@ -515,6 +526,7 @@ nm_device_bond_class_init (NMDeviceBondClass *klass)
|
|||
parent_class->get_generic_capabilities = get_generic_capabilities;
|
||||
parent_class->is_available = is_available;
|
||||
parent_class->check_connection_compatible = check_connection_compatible;
|
||||
parent_class->check_connection_available = check_connection_available;
|
||||
parent_class->complete_connection = complete_connection;
|
||||
|
||||
parent_class->match_l2_config = match_l2_config;
|
||||
|
|
|
|||
|
|
@ -83,6 +83,17 @@ is_available (NMDevice *dev)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
check_connection_available (NMDevice *device,
|
||||
NMConnection *connection,
|
||||
const char *specific_object)
|
||||
{
|
||||
/* Connections are always available because the carrier state is determined
|
||||
* by the bridge port carrier states, not the bridge's state.
|
||||
*/
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
check_connection_compatible (NMDevice *device,
|
||||
NMConnection *connection,
|
||||
|
|
@ -436,6 +447,7 @@ nm_device_bridge_class_init (NMDeviceBridgeClass *klass)
|
|||
parent_class->get_generic_capabilities = get_generic_capabilities;
|
||||
parent_class->is_available = is_available;
|
||||
parent_class->check_connection_compatible = check_connection_compatible;
|
||||
parent_class->check_connection_available = check_connection_available;
|
||||
parent_class->complete_connection = complete_connection;
|
||||
|
||||
parent_class->match_l2_config = match_l2_config;
|
||||
|
|
|
|||
|
|
@ -96,6 +96,17 @@ is_available (NMDevice *dev)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
check_connection_available (NMDevice *device,
|
||||
NMConnection *connection,
|
||||
const char *specific_object)
|
||||
{
|
||||
/* Connections are always available because the carrier state is determined
|
||||
* by the team port carrier states, not the team's state.
|
||||
*/
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
check_connection_compatible (NMDevice *device,
|
||||
NMConnection *connection,
|
||||
|
|
@ -730,6 +741,7 @@ nm_device_team_class_init (NMDeviceTeamClass *klass)
|
|||
parent_class->get_generic_capabilities = get_generic_capabilities;
|
||||
parent_class->is_available = is_available;
|
||||
parent_class->check_connection_compatible = check_connection_compatible;
|
||||
parent_class->check_connection_available = check_connection_available;
|
||||
parent_class->complete_connection = complete_connection;
|
||||
|
||||
parent_class->match_l2_config = match_l2_config;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue