NetworkManager/clients/common
Thomas Haller 2e2e2f92df
cli: normalize profile when setting bond options "active_slave" or "primary"
"active_slave" is by now deprecated and became an alias for "primary".
If a profile specifies both properties, only "primary" is honored, without
failing validation (to not break existing behavior).
Maybe we should introduce a normalization for such cases. But normalize
might not do the right thing, if a profile currently has "primary" set,
and the user modifies it to set "active_slave" to a different value,
normalize would not know which setting was set first and remove
"active_slave" again.

In the past, nm_setting_bond_add_option() performed some simple
normalization, but this was dropped, because (such incompatible) settings
can also be created via the GObject property. Our C accessor function
should not be less flexible than other ways of creating a profile.

In the end, whenever a user (or a tool) creates a profile, the tool must
be aware of the semantics. E.g. setting an IP route without a suitable
IP address is unlike to make sense, the tool must understand what it's
doing. The same is true for the bond options. When a tool (or user) sets
the "active_slave" property, then it must clear out the redundant
information from the "primary" setting. There is no alternative to this
problem than having tools smart enough to understand what they are
doing.
2020-09-10 22:09:58 +02:00
..
tests cli/tests: add unit test for nmc_utils_parse_passwd_file() 2020-05-13 10:28:05 +02:00
meson.build docs: move "nm-settings-docs-{dbus,nmcli}.xml" from "libnm/" to "man/" 2020-06-11 10:53:50 +02:00
nm-client-utils.c all: add trailing semicolon to NM_UTILS_LOOKUP_DEFINE()/NM_GOBJECT_PROPERTIES_DEFINE*() 2020-07-19 12:12:58 +02:00
nm-client-utils.h cli: show differnt text for state of externally connected devices 2020-06-10 19:45:47 +02:00
nm-meta-setting-access.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-meta-setting-access.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-meta-setting-desc.c cli: normalize profile when setting bond options "active_slave" or "primary" 2020-09-10 22:09:58 +02:00
nm-meta-setting-desc.h cli: fix alternating miimon/arp_interval settings for bond options in nmcli 2020-07-11 11:18:54 +02:00
nm-polkit-listener.c cli/polkit: add missing variable initialization in retrieve_session_id_cb() 2020-05-07 10:01:52 +02:00
nm-polkit-listener.h cli/polkit: rename NM_POLKIT_LISTENER_SIGNAL_REQUEST signal to "request-sync" 2020-04-10 10:44:52 +02:00
nm-secret-agent-simple.c all: replace cleanup macro "gs_unref_keyfile" by "nm_auto_unref_keyfile" 2020-09-02 17:46:43 +02:00
nm-secret-agent-simple.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-vpn-helpers.c clients: set "ipv[46].dns-priority=-50" during import of WireGuard profiles 2020-09-10 11:22:48 +02:00
nm-vpn-helpers.h clients/trivial: rename VpnPasswordName struct to have NM prefix 2020-04-29 16:18:31 +02:00
qrcodegen.c all: fix typo in man pages 2020-07-03 10:48:04 +02:00
qrcodegen.h cli: add "nmcli d wifi show" 2019-10-18 17:38:57 +02:00
settings-docs.h.in man: explain "/var/lib/NetworkManager/secret-key" in man NetworkManager 2020-09-02 12:10:04 +02:00
settings-docs.xsl cli: fix marking settings docs for translation 2017-04-23 23:45:02 +02:00