mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 08:20:28 +01:00
core: add new SECONDARIES device state for dependent connections
Will be used for things like activating a VPN connection before signaling that the device is activated, or maybe for bridges and bonds, to ensure that applications don't think the system has connectivity before everything is set up.
This commit is contained in:
parent
30f39c172b
commit
c5cc53a557
4 changed files with 18 additions and 6 deletions
|
|
@ -295,6 +295,8 @@ device_state_to_string (NMDeviceState state)
|
|||
return _("connecting (getting IP configuration)");
|
||||
case NM_DEVICE_STATE_IP_CHECK:
|
||||
return _("connecting (checking IP connectivity)");
|
||||
case NM_DEVICE_STATE_SECONDARIES:
|
||||
return _("connecting (starting secondary connections)");
|
||||
case NM_DEVICE_STATE_ACTIVATED:
|
||||
return _("connected");
|
||||
case NM_DEVICE_STATE_DEACTIVATING:
|
||||
|
|
|
|||
|
|
@ -201,6 +201,9 @@ typedef enum {
|
|||
* required for the requested network connection. This may include checking
|
||||
* whether only local network access is available, whether a captive portal
|
||||
* is blocking access to the Internet, etc.
|
||||
* @NM_DEVICE_STATE_SECONDARIES: the device is waiting for a secondary
|
||||
* connection (like a VPN) which must activated before the device can be
|
||||
* activated
|
||||
* @NM_DEVICE_STATE_ACTIVATED: the device has a network connection, either local
|
||||
* or global.
|
||||
* @NM_DEVICE_STATE_DEACTIVATING: the device's network connection is no longer
|
||||
|
|
@ -218,9 +221,10 @@ typedef enum {
|
|||
NM_DEVICE_STATE_NEED_AUTH = 60,
|
||||
NM_DEVICE_STATE_IP_CONFIG = 70,
|
||||
NM_DEVICE_STATE_IP_CHECK = 80,
|
||||
NM_DEVICE_STATE_ACTIVATED = 90,
|
||||
NM_DEVICE_STATE_DEACTIVATING = 100,
|
||||
NM_DEVICE_STATE_FAILED = 110
|
||||
NM_DEVICE_STATE_SECONDARIES = 90,
|
||||
NM_DEVICE_STATE_ACTIVATED = 100,
|
||||
NM_DEVICE_STATE_DEACTIVATING = 110,
|
||||
NM_DEVICE_STATE_FAILED = 120
|
||||
} NMDeviceState;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -144,17 +144,22 @@
|
|||
The device's IP connectivity ability is being determined.
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="ACTIVATED" value="90">
|
||||
<tp:enumvalue suffix="SECONDARIES" value="90">
|
||||
<tp:docstring>
|
||||
The device is waiting for secondary connections to be activated.
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="ACTIVATED" value="100">
|
||||
<tp:docstring>
|
||||
The device is active.
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="DEACTIVATING" value="100">
|
||||
<tp:enumvalue suffix="DEACTIVATING" value="110">
|
||||
<tp:docstring>
|
||||
The device's network connection is being torn down.
|
||||
</tp:docstring>
|
||||
</tp:enumvalue>
|
||||
<tp:enumvalue suffix="FAILED" value="110">
|
||||
<tp:enumvalue suffix="FAILED" value="120">
|
||||
<tp:docstring>
|
||||
The device is in a failure state following an attempt to activate it.
|
||||
</tp:docstring>
|
||||
|
|
|
|||
|
|
@ -1921,6 +1921,7 @@ scanning_allowed (NMDeviceWifi *self)
|
|||
case NM_DEVICE_STATE_NEED_AUTH:
|
||||
case NM_DEVICE_STATE_IP_CONFIG:
|
||||
case NM_DEVICE_STATE_IP_CHECK:
|
||||
case NM_DEVICE_STATE_SECONDARIES:
|
||||
case NM_DEVICE_STATE_DEACTIVATING:
|
||||
/* Don't scan when unusable or activating */
|
||||
return FALSE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue