NetworkManager/libnm-core
Thomas Haller 4aa46328ca
libnm,core: fix handling miimon and arp_interval as conflicting kernel options
We use sysfs API for setting bond options. Note that the miimon and
arp_interval settings conflict each other, and whenever setting one
of these sysfs values, the other one gets reset. That means,
NetworkManager needs to mediate and handle a profile which has both
these options set.

Before 1.24, the libnm API nm_setting_bond_add_option() API would mangle
the content of the bond settings, to clear the respective other fields
when setting miimon/arp_interval. That also had the effect that the
settings plugins, weren't able to read such (conflicting) settings
back from disk (but they would write them to disk). If a keyfile
specified both miimon and arp_interval keys, then it would depend on
their order in the keyfile which wins.
It is wrong that a libnm property setter mangles the option in such a way,
especially, because you still could set the NM_SETTING_BOND_OPTIONS
property directly and bypass this. So, since 1.24, you can create
profiles that have conflicting options.

Also, we can now not start to reject such settings as invalid, because that
would be an API break. Instead, just make sure that when one of the
settings is set, that the other one consistently gets deactivated.

Also, before 1.24 already, NMDeviceBond would mediate whether to either set
miimon or arp_interval settings. Despite that the keyfile reader would
mangle the settings, it would also prefer miimon over arp_interval,
if both were set.

This mechanism was broken since we switch to _bond_get_option_normalized()
for that. As a consequence, NetworkManager would try to set both the
conflicting options. Fix that.
2020-07-10 16:45:06 +02:00
..
nm-keyfile all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-libnm-core-aux all: move "shared/nm-libnm-core-aux" to "libnm-core/nm-libnm-core-aux" 2020-06-11 10:53:50 +02:00
nm-libnm-core-intern libnm: add nm_utils_bond_option_arp_ip_targets_split() helper 2020-07-10 13:12:43 +02:00
tests shared: cleanup dlopening libjansson depending on configure options 2020-07-09 12:57:15 +02:00
meson.build libnm,shared: move nm-json.[hc] to shared/nm-glib-aux 2020-07-09 11:47:05 +02:00
nm-connection-private.h libnm: always return normalized-type from _nm_setting_ovs_interface_verify_interface_type() 2020-02-26 17:51:14 +01:00
nm-connection.c all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-connection.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-core-enum-types.c.template libnm-core: add ovs-dpdk setting 2019-06-14 12:10:20 +02:00
nm-core-enum-types.h.template build: use template files for enum types' sources generation 2017-12-18 11:25:06 +01:00
nm-core-internal.h libnm: use NMStrBuf in "nm-setting-bridge.c" 2020-06-26 09:29:53 +02:00
nm-core-types-internal.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-core-types.h libnm: avoid deprecation warning about NMUtilsPredicateStr 2020-06-22 13:24:43 +02:00
nm-crypto-gnutls.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-crypto-impl.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-crypto-nss.c libnm/crypto: suppress "-Wstrict-prototypes" warning in NSS library 2020-06-03 23:08:33 +02:00
nm-crypto.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-crypto.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-dbus-interface.h all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-dbus-utils.c all: fix typo in man pages 2020-07-03 10:48:04 +02:00
nm-errors.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-errors.h license: relicense "libnm-core/nm-errors.h" under LGPL-2.1+ 2020-02-16 15:55:55 +01:00
nm-property-compare.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-property-compare.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-6lowpan.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-6lowpan.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-8021x.c all: fix typo in man pages 2020-07-03 10:48:04 +02:00
nm-setting-8021x.h Add domain_match mode for wifi certificate domain comparison 2020-03-23 20:31:09 +01:00
nm-setting-adsl.c libnm-core: minor cleanup checks in "nm-setting-adsl.c"'s verify() 2020-03-17 08:02:54 +01:00
nm-setting-adsl.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-bluetooth.c libnm-core: fix wording for 'nm_sett_info_propert_type_mac_addrees' 2020-03-19 16:59:07 +01:00
nm-setting-bluetooth.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-bond.c libnm,core: fix handling miimon and arp_interval as conflicting kernel options 2020-07-10 16:45:06 +02:00
nm-setting-bond.h nm-setting-bond: add API to libnm to get the normalized bond option value 2020-03-06 10:39:00 +01:00
nm-setting-bridge-port.c libnm: adjust bridge defines NM_BRIDGE_PORT_PATH_COST_* 2020-05-08 08:02:49 +02:00
nm-setting-bridge-port.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-bridge.c libnm/doc: clarify values for "bridge.multicast-router" 2020-06-30 16:30:38 +02:00
nm-setting-bridge.h nm-setting-bridge: add 'multicast-startup-query-interval' bridge option 2020-05-04 17:33:01 +02:00
nm-setting-cdma.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-cdma.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-connection.c all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-setting-connection.h libnm: fix API version annotation for nm_setting_connection_get_mud_url() 2020-04-24 10:09:50 +02:00
nm-setting-dcb.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-dcb.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-dummy.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-dummy.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ethtool.c libnm: check options in NMSettingEthtool.verify() in defined order 2020-05-22 15:58:09 +02:00
nm-setting-ethtool.h libnm: remove redundant nm_setting_ethtool_*_coalesce() API 2020-05-22 15:58:09 +02:00
nm-setting-generic.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-generic.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-gsm.c libnm/doc: fix gtk-doc for deprecated markers in libnm 2020-03-23 09:32:04 +01:00
nm-setting-gsm.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-infiniband.c all: fix typo in man pages 2020-07-03 10:48:04 +02:00
nm-setting-infiniband.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ip-config.c all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-setting-ip-config.h platform: add support for local routes 2020-06-16 10:01:22 +02:00
nm-setting-ip-tunnel.c all: fix typo in man pages 2020-07-03 10:48:04 +02:00
nm-setting-ip-tunnel.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ip4-config.c all: fix typo in man pages 2020-07-03 10:48:04 +02:00
nm-setting-ip4-config.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ip6-config.c libnm,cli,ifcfg-rh: add ipv6.ra-timeout configuration option 2020-02-17 14:43:13 +01:00
nm-setting-ip6-config.h libnm,cli,ifcfg-rh: add ipv6.ra-timeout configuration option 2020-02-17 14:43:13 +01:00
nm-setting-macsec.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-macsec.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-macvlan.c all: use nm_utils_ifname_valid_kernel() instead of nm_utils_is_valid_iface_name() 2020-02-17 15:27:35 +01:00
nm-setting-macvlan.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-match.c libnm/match: extend syntax for match patterns with '|', '&', '!' and '\\' 2020-06-26 13:29:01 +02:00
nm-setting-match.h all: add "path" property to the match setting 2020-06-12 16:04:06 +02:00
nm-setting-olpc-mesh.c libnm-core: fix wording for 'nm_sett_info_propert_type_mac_addrees' 2020-03-19 16:59:07 +01:00
nm-setting-olpc-mesh.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ovs-bridge.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-ovs-bridge.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ovs-dpdk.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-ovs-dpdk.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ovs-interface.c libnm: validate "connection.interface-name" at one place only 2020-02-26 17:51:14 +01:00
nm-setting-ovs-interface.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ovs-patch.c libnm-core: interpret ovs-patch.peer as an interface name 2020-06-10 09:28:39 +02:00
nm-setting-ovs-patch.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ovs-port.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-ovs-port.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-ppp.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-ppp.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-pppoe.c all: use nm_utils_ifname_valid_kernel() instead of nm_utils_is_valid_iface_name() 2020-02-17 15:27:35 +01:00
nm-setting-pppoe.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-private.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-proxy.c libnm/proxy: use int type for proxy.method property 2019-12-24 07:48:35 +01:00
nm-setting-proxy.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-serial.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-serial.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-sriov.c all: fix typo in man pages 2020-07-03 10:48:04 +02:00
nm-setting-sriov.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-tc-config.c libnm: use nm_utils_named_values_from_strdict() in "nm-setting-tc-config.c" 2020-06-19 17:07:27 +02:00
nm-setting-tc-config.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-team-port.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-team-port.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-team.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-team.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-tun.c libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances 2019-12-24 07:47:50 +01:00
nm-setting-tun.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-user.c all: use nm_clear_pointer() instead of g_clear_pointer() 2020-03-23 11:22:38 +01:00
nm-setting-user.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-vlan.c all: fix typo in man pages 2020-07-03 10:48:04 +02:00
nm-setting-vlan.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-vpn.c libnm: convert vpn-secrets to D-Bus in stable order 2020-04-04 19:51:34 +02:00
nm-setting-vpn.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-vrf.c libnm-core: remove trailing dot from setting description 2020-03-23 11:42:57 +01:00
nm-setting-vrf.h libnm-core,cli: add VRF setting 2020-01-14 09:49:01 +01:00
nm-setting-vxlan.c all: use nm_utils_ifname_valid_kernel() instead of nm_utils_is_valid_iface_name() 2020-02-17 15:27:35 +01:00
nm-setting-vxlan.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-wifi-p2p.c all: fix typo in man pages 2020-07-03 10:48:04 +02:00
nm-setting-wifi-p2p.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-wimax.c libnm-core: fix wording for 'nm_sett_info_propert_type_mac_addrees' 2020-03-19 16:59:07 +01:00
nm-setting-wimax.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-wired.c libnm-core: fix wording for 'nm_sett_info_propert_type_mac_addrees' 2020-03-19 16:59:07 +01:00
nm-setting-wired.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-wireguard.c all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-setting-wireguard.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-wireless-security.c all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-setting-wireless-security.h all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-setting-wireless.c all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-setting-wireless.h all: add ap-isolation property to wifi setting 2020-07-01 17:36:20 +02:00
nm-setting-wpan.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting-wpan.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-setting.c all: fix typo in man pages 2020-07-03 10:48:04 +02:00
nm-setting.h libnm: add nm_setting_option_clear_by_name() 2020-05-22 15:58:09 +02:00
nm-simple-connection.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-simple-connection.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-team-utils.c shared,libnm: rename nm_json_aux_gstr_*() API to nm_json_gstr_*() 2020-07-09 11:47:06 +02:00
nm-team-utils.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-utils-private.h libnm-core: pass variant-attribute-spec to format function 2020-07-08 09:43:06 +02:00
nm-utils.c shared: merge nm-glib-aux/nm-json.[hc] into nm-json-aux.[hc] 2020-07-09 11:47:06 +02:00
nm-utils.h libnm/utils: add OWE security type 2019-12-05 14:00:10 +01:00
nm-version.h version: add 1.28 macros 2020-06-30 11:29:04 +02:00
nm-vpn-dbus-interface.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-vpn-editor-plugin.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-vpn-editor-plugin.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-vpn-plugin-info.c all: fix minor typos 2020-07-07 11:33:46 +02:00
nm-vpn-plugin-info.h libnm: hide NMVpnPluginInfo structs from public API 2020-03-14 18:04:05 +01:00