mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 17:30:04 +01:00
config: parse autoconnect-ports value on config
As part of the conscious language effort we must provide an alternative
option to configure autoconnect-ports system-wide on NetworkManager
configuration file.
(cherry picked from commit ad68b28843)
This commit is contained in:
parent
7db5ce8c65
commit
7bf05b7fa5
2 changed files with 16 additions and 1 deletions
|
|
@ -857,8 +857,13 @@ ipv6.ip6-privacy=0
|
||||||
<listitem><para>If left unspecified, the default value is 3 tries before failing the connection.
|
<listitem><para>If left unspecified, the default value is 3 tries before failing the connection.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>connection.autoconnect-ports</varname></term>
|
||||||
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>connection.autoconnect-slaves</varname></term>
|
<term><varname>connection.autoconnect-slaves</varname></term>
|
||||||
|
<listitem><para>This is deprecated, please use "connection.autoconnect-ports" instead.
|
||||||
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>connection.down-on-poweroff</varname></term>
|
<term><varname>connection.down-on-poweroff</varname></term>
|
||||||
|
|
|
||||||
|
|
@ -5375,12 +5375,22 @@ should_connect_ports(NMConnection *connection, NMDevice *device)
|
||||||
|
|
||||||
val =
|
val =
|
||||||
nm_config_data_get_connection_default_int64(NM_CONFIG_GET_DATA,
|
nm_config_data_get_connection_default_int64(NM_CONFIG_GET_DATA,
|
||||||
NM_CON_DEFAULT("connection.autoconnect-slaves"),
|
NM_CON_DEFAULT("connection.autoconnect-ports"),
|
||||||
device,
|
device,
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
-1);
|
-1);
|
||||||
|
|
||||||
|
/* Trust "connection.autoconnect-ports" first, if set to default fallback to the deprecated term. */
|
||||||
|
if (val == NM_TERNARY_DEFAULT)
|
||||||
|
val = nm_config_data_get_connection_default_int64(
|
||||||
|
NM_CONFIG_GET_DATA,
|
||||||
|
NM_CON_DEFAULT("connection.autoconnect-slaves"),
|
||||||
|
device,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
-1);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (val == NM_TERNARY_FALSE)
|
if (val == NM_TERNARY_FALSE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue