After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 776279 - [RFE] allow matching of connection-defaults on connection properties
[RFE] allow matching of connection-defaults on connection properties
Status: RESOLVED OBSOLETE
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks: 732292 776276
 
 
Reported: 2016-12-19 14:54 UTC by Thomas Haller
Modified: 2020-11-12 14:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2016-12-19 14:54:22 UTC
Connection default can be configured in NetworkManager.conf (see `man NetworkManager.conf`).

By specifying a "match-device", this is actually really powerful. For example,
one can configure that WiFi has worse default-route metric then WWAN:

  [connection.route-metric-wlan0]
  device-match=interface-name:wlan0
  ipv4.route-metric=1000

  [connection.route-metric-wwan]
  device-match=type:gsm,type:cdma
  ipv4.route-metric=599


It would be however great to apply default value based on other connection properties. Like:

  [connection.default-stable-id]
  connection-match=is:wifi.cloned-mac-address=stable,unset:connection.stable-id
  connection.stable-id=value

that is, depending on other connection properties, specify a default value.


One difficulty is that libnm doesn't have a convenient API to access connection properties by their name (see bug 732292).




Also, what would be actually more useful is with bug 776276. If the user could tag connections with arbitrary user-data:

For example, I want for all my Wi-Fis to use "wifi.cloned-mac-addres=random" by default. But certain Wi-Fis, I want to tag them (by setting user.my.public-wifi-stable=1) and select the "stable" cloned-mac-address.

  [connection.public-wifi-stable]
  device-match=type:wifi
  connection-match= is:user.my.public-wifi-stable=1 , \ 
                    unset:wifi.cloned-mac-address , \
                    unset:connection.stable-id
  connection.stable-id=$boot-id
  wifi.cloned-mac-address=stable

  [connection.public-wifi]
  device-match=type:wifi
  wifi.cloned-mac-address=random

Note that currently connection.stable-id cannot be configured as global default, but let's assume it could, and setting it to $boot-id would use the value from /proc/sys/kernel/random/boot_id.
Comment 1 André Klapper 2020-11-12 14:35:05 UTC
bugzilla.gnome.org is being shut down in favor of a GitLab instance. 
We are closing all old bug reports and feature requests in GNOME Bugzilla which have not seen updates for a long time.

If you still use NetworkManager and if you still see this bug / want this feature in a recent and supported version of NetworkManager, then please feel free to report it at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/

Thank you for creating this report and we are sorry it could not be implemented (workforce and time is unfortunately limited).