NetworkManager/src/nmcli
Íñigo Huguet 7ec363a79a ip6: revert to using sysctl ipv6.conf.default for ip6-privacy
Commit 797f3cafee ('device: fall back to saved use_tempaddr value
instead of rereading /proc') changed the behaviour of how to get the
last resort default value for ip6-privacy property.

Previously we read it from /proc/sys/net/ipv6/conf/default, buf after
this commit we started to read /proc/sys/net/ipv6/conf/<iface> instead,
because the user might have set a different value specific for that device.
As NetworkManager changes that value on connection activation, we used
the value read at the time that NetworkManager was started.

Commit 6cb14ae6a6 ('device: introduce ipv6.temp-valid-lifetime and
ipv6.temp-preferred-lifetime properties') introduced 2 new IPv6 privacy
related properties relying on the same mechanism.

However, this new behaviour is problematic because it's not predictable
nor reliable:
- NetworkManager is normally started at boot time. That means that, if a
  user wants to set a new value to /proc/sys/net/ipv6/conf/<iface>,
  NetworkManager is likely alread running, so the change won't take
  effect.
- If NetworkManager is restarted it will read the value again, but this
  value can be the one set by NetworkManager itself in the last
  activation. This means that different values can be used as default in
  the same system boot depending on the restarts of NetworkManager.

Moreover, this weird situation might happen:
- Connection A with ip6-privacy=2 is activated
- NetworkManager is stopped. The value in
  /proc/sys/net/ipv6/conf/<iface>/use_tempaddr remains as 2.
- NetworkManager starts. It reads from /proc/sys/... and saves the value
  '2' as the default.
- Connection B with no ip6-privacy setting is activated. The '2' saved
  as default value is used. The connection didn't specify any value for
  it, and the value '2' was set by another connection for that specific
  connection only, not manually by a user that wanted '2' to be the
  default.

A user shouldn't have to think on when NetworkManager starts or restarts
to known in an easy and predictable way what the default value for
certain property is. It's totally counterintuitive.

Revert back to the old behaviour of reading from
/proc/sys/net/ipv6/conf/default. Although this value is used by the
kernel only for newly created interfaces, and not for already existing
ones, it is reasonable to think on these settings as "systemwide
defaults" that the user has chosen.

Note that setting a different default in NetworkManager.conf still takes
precedence.
2024-05-10 12:01:08 +00:00
..
agent.c nmcli: replace all uses of g_print()/g_printerr() with nmc_print()/nmc_printerr() 2023-02-08 10:11:18 +01:00
common.c libnmc: allow user input in ECHO mode for 2FA challenges 2024-02-15 09:45:44 +00:00
common.h cli: Implement display of global metered state in nmcli general 2024-02-05 20:54:28 +01:00
connections.c libnm: add generic.device-handler property 2024-02-21 11:16:01 +01:00
connections.h nmcli/trivial: rename monitor functions in internal header file 2023-02-08 10:11:15 +01:00
devices.c cli: sort nmcli device output by active-connection first 2023-11-15 09:34:47 +01:00
devices.h nmcli/trivial: rename monitor functions in internal header file 2023-02-08 10:11:15 +01:00
gen-metadata-nm-settings-nmcli.c wifi: add "wifi.cloned-mac-address=stable-ssid" 2023-11-16 13:07:54 +01:00
gen-metadata-nm-settings-nmcli.xml.in ip6: revert to using sysctl ipv6.conf.default for ip6-privacy 2024-05-10 12:01:08 +00:00
general.c cli: Implement display of global metered state in nmcli general 2024-02-05 20:54:28 +01:00
meson.build nmcli: rename "generate-docs-nm-settings-nmcli" to "gen-metadata-nm-settings-nmcli" 2022-10-31 09:11:30 +01:00
nmcli-completion nmcli-completion: fix support for embedded quote characters 2022-08-04 08:59:01 +02:00
nmcli.c cli: honor CLICOLOR_FORCE= variable to enable colors with nmcli 2023-09-25 09:02:17 +00:00
nmcli.h nmcli: move offline flag from NmCli to NmcConfig struct 2023-07-17 12:56:03 +02:00
polkit-agent.c nmcli: replace all uses of g_print()/g_printerr() with nmc_print()/nmc_printerr() 2023-02-08 10:11:18 +01:00
polkit-agent.h cli: move from "clients/cli/" to "src/nmcli/" 2021-03-15 17:10:54 +01:00
README.md all: add some README.md files describing the purpose of our sources 2021-08-19 17:51:11 +02:00
settings.c libnm: use nm_setting_connection_get_controller() where possible 2024-03-12 09:54:31 +01:00
settings.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
utils.c all: use nm_strv_empty_new() helper 2023-11-30 15:53:21 +01:00
utils.h cli: Implement display of global metered state in nmcli general 2024-02-05 20:54:28 +01:00

nmcli

The command line user interface of NetworkManager. It uses the D-Bus API of NetworkManager (via libnm).

See:

  • man 1 nmcli ([www])
  • man 7 nmcli-examples ([www])
  • man 5 nm-settings-nmcli ([www])

Try also with bash-completion!