NetworkManager/libnm-core
Thomas Haller ddd148e02b keyfile: let keyfile writer serialize setting with all default values
It's important whether a setting is present or not. Keyfile writer
omits properties that have a default value, that means, if the setting
has all-default values, it would be dropped. For [proxy] that doesn't
really matter, because we tend to normalize it back. For some settings
it matters:

  $ nmcli connection add type bluetooth con-name bt autoconnect no bluetooth.type dun bluetooth.bdaddr aa:bb:cc:dd:ee:ff gsm.apn a
  Connection 'bt' (652cabd8-d350-4246-a6f3-3dc17eeb028f) successfully added.

  $ nmcli connection modify bt gsm.apn ''

When storing this to keyfile, the [gsm] section was dropped
(server-side) and we fail an nm_assert() (omitted from the example
output below).

  <error> [1566732645.9845] BUG: failure to normalized profile that we just wrote to disk: bluetooth: 'dun' connection requires 'gsm' or 'cdma' setting
  <trace> [1566732645.9846] keyfile: commit: "/etc/NetworkManager/system-connections/bt.nmconnection": profile 652cabd8-d350-4246-a6f3-3dc17eeb028f (bt) written
  <trace> [1566732645.9846] settings: update[652cabd8-d350-4246-a6f3-3dc17eeb028f]: update-from-dbus: update profile "bt"
  <trace> [1566732645.9849] settings: storage[652cabd8-d350-4246-a6f3-3dc17eeb028f,3e504752a4a78fb3/keyfile]: change event with connection "bt" (file "/etc/NetworkManager/system-connections/>
  <trace> [1566732645.9849] settings: update[652cabd8-d350-4246-a6f3-3dc17eeb028f]: updating connection "bt" (3e504752a4a78fb3/keyfile)
  <debug> [1566732645.9857] ++ connection 'update connection' (0x7f7918003340/NMSimpleConnection/"bluetooth" < 0x55e1c52480e0/NMSimpleConnection/"bluetooth") [/org/freedesktop/NetworkManager>
  <debug> [1566732645.9857] ++ gsm                       [ 0x55e1c5276f80 < 0x55e1c53205f0 ]
  <debug> [1566732645.9858] ++ gsm.apn                   < 'a'

Of course, after reload the connection on disk is no loner valid.
Keyfile writer wrote an invalid setting.

  # nmcli connection reload

Logfile:

  <warn>  [1566732775.4920] keyfile: load: "/etc/NetworkManager/system-connections/bt.nmconnection": failed to load connection: invalid connection: bluetooth: 'dun' connection requires 'gsm' or 'cdma' setting
  ...
  <trace> [1566732775.5432] settings: update[652cabd8-d350-4246-a6f3-3dc17eeb028f]: delete connection "bt" (3e504752a4a78fb3/keyfile)
  <debug> [1566732775.5434] Deleting secrets for connection /org/freedesktop/NetworkManager/Settings (bt)
  <trace> [1566732775.5436] dbus-object[9a402fbe14c8d975]: unexport: "/org/freedesktop/NetworkManager/Settings/55"
2019-08-27 11:45:14 +02:00
..
tests keyfile: let keyfile writer serialize setting with all default values 2019-08-27 11:45:14 +02:00
meson.build libnm-core: add ovs-dpdk setting 2019-06-14 12:10:20 +02:00
nm-connection-private.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-connection.c libnm: accept %NULL argument in nmtst_connection_assert_unchanging() 2019-07-16 12:35:36 +02:00
nm-connection.h libnm/doc: add missing "Since: 1.20" comments 2019-08-06 12:16:29 +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: add internal _nm_connection_get_setting() accessor 2019-07-29 18:39:49 +02:00
nm-core-types-internal.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-core-types.h libnm-core: add ovs-dpdk setting 2019-06-14 12:10:20 +02:00
nm-crypto-gnutls.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-crypto-impl.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-crypto-nss.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-crypto.c shared,all: return boolean success from nm_utils_file_get_contents() 2019-08-08 11:59:59 +02:00
nm-crypto.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-dbus-interface.h libnm/doc: improve documentation for NMMetered enum (2) 2019-08-27 10:25:59 +02:00
nm-dbus-utils.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-errors.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-errors.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-json.c libnm-core: don't use RTLD_DEEPBIND when building with asan 2018-02-15 15:34:03 +01:00
nm-json.h shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" 2019-04-18 18:59:09 +02:00
nm-keyfile-internal.h settings: support storing "shadowed-storage" to [.nmmeta] section for keyfiles in /run 2019-07-25 22:02:00 +02:00
nm-keyfile-utils.c libnm: set errno in nm_key_file_get_boolean() to distinguish between missing key and error 2019-08-13 10:45:04 +02:00
nm-keyfile-utils.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-keyfile.c keyfile: let keyfile writer serialize setting with all default values 2019-08-27 11:45:14 +02:00
nm-property-compare.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-property-compare.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-6lowpan.c libnm-core: reorder code in settings 2019-01-15 09:55:24 +01:00
nm-setting-6lowpan.h libnm-core: add NMSetting{6Lowpan,Wpan}Class to a public header 2018-06-29 22:34:23 +02:00
nm-setting-8021x.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-8021x.h libnm: fix NMSetting8021xAuthFlags to be a flags type 2019-08-16 08:16:02 +02:00
nm-setting-adsl.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-adsl.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-bluetooth.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-bluetooth.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-bond.c libnm,core: support more "arp_validate" bond options 2019-07-18 12:17:35 +02:00
nm-setting-bond.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-bridge-port.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-bridge-port.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-bridge.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-bridge.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-cdma.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-cdma.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-connection.c libnm,cli,ifcfg-rh: add connection:wait-device-timeout property 2019-07-10 12:43:06 +02:00
nm-setting-connection.h libnm,cli,ifcfg-rh: add connection:wait-device-timeout property 2019-07-10 12:43:06 +02:00
nm-setting-dcb.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-dcb.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-dummy.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-setting-dummy.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-ethtool.c libnm: belatedly expose nm_ethtool_optname_is_feature() in libnm 2019-06-11 14:58:14 +02:00
nm-setting-ethtool.h libnm: belatedly expose nm_ethtool_optname_is_feature() in libnm 2019-06-11 14:58:14 +02:00
nm-setting-generic.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-generic.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-gsm.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-gsm.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-infiniband.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-infiniband.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-ip-config.c all: allow configuring default-routes as manual, static routes 2019-08-13 10:45:04 +02:00
nm-setting-ip-config.h libnm,core: add support for "suppress_prefixlength" rule attribute 2019-07-16 10:03:17 +02:00
nm-setting-ip-tunnel.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-setting-ip-tunnel.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-setting-ip4-config.c libnm: add nm_connection_to_dbus_full() with options argument 2019-06-28 16:48:17 +02:00
nm-setting-ip4-config.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-ip6-config.c libnm-core: fix ifcfg-rh variable name for DHCPv6 hostname 2019-08-05 15:56:16 +02:00
nm-setting-ip6-config.h libnm/doc: add Since tag for %NM_SETTING_IP6_CONFIG_METHOD_DISABLED 2019-08-06 11:50:00 +02:00
nm-setting-macsec.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-setting-macsec.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-macvlan.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-macvlan.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-match.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-setting-match.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-setting-olpc-mesh.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-setting-olpc-mesh.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-setting-ovs-bridge.c core: add ovs-bridge.datapath-type property 2019-07-25 12:32:20 +02:00
nm-setting-ovs-bridge.h core: add ovs-bridge.datapath-type property 2019-07-25 12:32:20 +02:00
nm-setting-ovs-dpdk.c libnm-core: add ovs-dpdk setting 2019-06-14 12:10:20 +02:00
nm-setting-ovs-dpdk.h libnm-core: add ovs-dpdk setting 2019-06-14 12:10:20 +02:00
nm-setting-ovs-interface.c core/ovs-interface: add support for dpdk type 2019-06-14 12:10:20 +02:00
nm-setting-ovs-interface.h libnm-core: add ovs-interface setting 2017-10-30 17:40:08 +01:00
nm-setting-ovs-patch.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-setting-ovs-patch.h libnm-core: add ovs-patch setting 2017-10-30 17:40:08 +01:00
nm-setting-ovs-port.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-setting-ovs-port.h libnm-core: add ovs-port setting 2017-10-30 17:40:08 +01:00
nm-setting-ppp.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-ppp.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-pppoe.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-pppoe.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-private.h libnm: add nm_connection_to_dbus_full() with options argument 2019-06-28 16:48:17 +02:00
nm-setting-proxy.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-proxy.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-serial.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-serial.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-sriov.c wireguard: support configuring policy routing to avoid routing loops 2019-07-29 20:45:49 +02:00
nm-setting-sriov.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-setting-tc-config.c libnm: add nm_connection_to_dbus_full() with options argument 2019-06-28 16:48:17 +02:00
nm-setting-tc-config.h libnm: don't return deep-copied strv array from nm_tc_qdisc_get_attribute_names() 2019-04-20 08:09:52 +02:00
nm-setting-team-port.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-setting-team-port.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-setting-team.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-setting-team.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-setting-tun.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-tun.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-user.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-user.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-vlan.c libnm: fix assertions in NMSettingVlan's priority API 2019-08-02 08:46:40 +02:00
nm-setting-vlan.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-vpn.c libnm: try to avoid coverity warning in assertion() 2019-08-02 08:52:26 +02:00
nm-setting-vpn.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-vxlan.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-vxlan.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-wifi-p2p.c shared: build helper "libnm-libnm-core-{intern|aux}.la" library for libnm-core 2019-04-18 18:59:09 +02:00
nm-setting-wifi-p2p.h core/setting-wifi-p2p: Add WFD IEs property to P2P settings 2019-02-21 10:10:20 +01:00
nm-setting-wimax.c all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-wimax.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-wired.c core/wired: include the invalide MAC address in error messages 2019-07-02 16:06:03 +02:00
nm-setting-wired.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-wireguard.c libnm: fix leak in NMSettingWireGuard's update_one_secret() 2019-08-03 11:25:10 +02:00
nm-setting-wireguard.h wireguard: support configuring policy routing to avoid routing loops 2019-07-29 20:45:49 +02:00
nm-setting-wireless-security.c wifi: drop support for wpa-none key-mgmt 2019-08-26 10:25:00 +02:00
nm-setting-wireless-security.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-setting-wireless.c wifi: drop support for wpa-none key-mgmt 2019-08-26 10:25:00 +02:00
nm-setting-wireless.h libnm/doc: add missing "Since: 1.20" comments 2019-08-06 12:16:29 +02:00
nm-setting-wpan.c libnm-core: reorder code in settings 2019-01-15 09:55:24 +01:00
nm-setting-wpan.h core/setting-wpan: add page and channel properties 2018-10-07 15:46:02 +02:00
nm-setting.c libnm: add nm_connection_to_dbus_full() with options argument 2019-06-28 16:48:17 +02:00
nm-setting.h all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
nm-simple-connection.c libnm: workaround assertion failure for nmtst_connection_assert_unchanging() when disposing connection 2019-06-26 09:53:54 +02:00
nm-simple-connection.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-team-utils.c libnm: remove dead code in nm_team_setting_config_get() 2019-08-02 18:10:58 +02:00
nm-team-utils.h libnm: avoid NM_CONST_MAX() in enum definition for NMTeamAttribute 2019-08-02 08:55:31 +02:00
nm-utils-private.h libnm: add nm_connection_to_dbus_full() with options argument 2019-06-28 16:48:17 +02:00
nm-utils.c wifi: support WPA2 ad-hoc (ibss-rsn) 2019-08-26 10:38:02 +02:00
nm-utils.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-version.h release: bump version to 1.21.0 (development) 2019-07-29 20:56:15 +02:00
nm-vpn-dbus-interface.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-vpn-editor-plugin.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-vpn-editor-plugin.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-vpn-plugin-info.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-vpn-plugin-info.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00