From 401ceb85bc03fc547af99a217ed7b09c74520e04 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Wed, 26 Jul 2023 16:54:34 +0200 Subject: [PATCH 01/18] release: bump version to 1.45.0 (development) --- configure.ac | 4 ++-- meson.build | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index c48a91d558..6424c3ac26 100644 --- a/configure.ac +++ b/configure.ac @@ -7,8 +7,8 @@ dnl - add corresponding NM_VERSION_x_y_z macros in dnl "shared/nm-version-macros.h.in" dnl - update number in meson.build m4_define([nm_major_version], [1]) -m4_define([nm_minor_version], [43]) -m4_define([nm_micro_version], [90]) +m4_define([nm_minor_version], [45]) +m4_define([nm_micro_version], [0]) m4_define([nm_version], [nm_major_version.nm_minor_version.nm_micro_version]) diff --git a/meson.build b/meson.build index 543bf37ac6..e705d53cfa 100644 --- a/meson.build +++ b/meson.build @@ -6,7 +6,7 @@ project( # - add corresponding NM_VERSION_x_y_z macros in # "src/libnm-core-public/nm-version-macros.h.in" # - update number in configure.ac - version: '1.43.90', + version: '1.45.0', license: 'GPL2+', default_options: [ 'buildtype=debugoptimized', From bba0d553b1954bca9bfa491a8133c452d3cad14f Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 27 Jul 2023 20:56:41 +0200 Subject: [PATCH 02/18] man: clarify relation of "dns.systemd-resolved" setting with "dns" --- man/NetworkManager.conf.xml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml index 3e31ecb759..3e43c37f85 100644 --- a/man/NetworkManager.conf.xml +++ b/man/NetworkManager.conf.xml @@ -421,16 +421,15 @@ no-auto-default=* systemd-resolved - Send the connection DNS configuration to + Additionally, send the connection DNS configuration to systemd-resolved. Defaults to "true". - Note that this setting is complementary to the - dns setting. You can keep this enabled while using - dns set to another DNS plugin alongside - systemd-resolved, or dns set to - systemd-resolved to configure the system resolver to use - systemd-resolved. - If systemd-resolved is enabled, the connectivity check resolves the + Note that this setting has no effect if the main dns + plugin is already systemd-resolved. It is complementary to the + dns setting to configure systemd-resolved alongside the + main plugin. + If systemd-resolved is enabled, either via this setting as the main + DNS plugin, the connectivity check resolves the hostname per-device. From ad6064e4e86dd41bb426a206818095d700d234ca Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 27 Jul 2023 21:37:20 +0200 Subject: [PATCH 03/18] man: fix typo in "NetworkManager.conf" manual --- man/NetworkManager.conf.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml index 3e43c37f85..a21ff9df8c 100644 --- a/man/NetworkManager.conf.xml +++ b/man/NetworkManager.conf.xml @@ -428,7 +428,7 @@ no-auto-default=* plugin is already systemd-resolved. It is complementary to the dns setting to configure systemd-resolved alongside the main plugin. - If systemd-resolved is enabled, either via this setting as the main + If systemd-resolved is enabled, either via this setting or the main DNS plugin, the connectivity check resolves the hostname per-device. From cea9d4634f8235c76accd1416be094e173b61374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= Date: Fri, 28 Jul 2023 15:07:34 +0200 Subject: [PATCH 04/18] gitignore: ignore VSCode project and clangd cache folders --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 4954f04faf..65168cf6b9 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,8 @@ test-*.trs .project .cproject .settings/ +.vscode/ +.cache/ /build/ From ac327cb8552aa056f6d8ec60e1ae5c967076490e Mon Sep 17 00:00:00 2001 From: Frederic Martinsons Date: Sat, 29 Jul 2023 06:26:16 +0200 Subject: [PATCH 05/18] nmcli: avoid freeing NULL GString and correct error message Fixes #1362 Signed-off-by: Frederic Martinsons --- src/nmcli/connections.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/nmcli/connections.c b/src/nmcli/connections.c index d6413c91f5..c4f70bd1b2 100644 --- a/src/nmcli/connections.c +++ b/src/nmcli/connections.c @@ -2262,7 +2262,7 @@ get_connection(NmCli *nmc, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT, _("%s argument is missing"), - selector); + (*argv)[0]); return NULL; } } else { @@ -9369,8 +9369,10 @@ do_connection_delete(const NMCCommand *cmd, NmCli *nmc, int argc, const char *co g_clear_error(&error); if (nmc->return_value != NMC_RESULT_ERROR_NOT_FOUND) { - g_string_free(invalid_cons, TRUE); - invalid_cons = NULL; + if (invalid_cons) { + g_string_free(invalid_cons, TRUE); + invalid_cons = NULL; + } goto finish; } From a44f20c985f919ee936e53072603d2f584605077 Mon Sep 17 00:00:00 2001 From: Fernando Fernandez Mancera Date: Tue, 1 Aug 2023 13:05:09 +0200 Subject: [PATCH 06/18] man: adjust references of nm-settings to nm-settings-nmcli nm-settings was renamed to nm-settings-nmcli therefore we should rename all the references to nm-settings-nmcli. --- man/NetworkManager.conf.xml | 8 ++++---- man/NetworkManager.xml | 2 +- man/nm-openvswitch.xml | 4 ++-- man/nm-settings-ifcfg-rh.xsl | 4 ++-- man/nm-settings-keyfile.xsl | 8 ++++---- man/nmcli-examples.xml | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml index a21ff9df8c..899fdb0705 100644 --- a/man/NetworkManager.conf.xml +++ b/man/NetworkManager.conf.xml @@ -856,7 +856,7 @@ ipv6.ip6-privacy=0 Not all properties can be overwritten, only the following properties are supported to have their default values configured - (see nm-settings5 for details). + (see nm-settings-nmcli5 for details). @@ -1353,7 +1353,7 @@ managed=1 Like the per-connection settings ethernet.generate-mac-address-mask and wifi.generate-mac-address-mask, this allows to configure the - generated MAC addresses during scanning. See nm-settings5 + generated MAC addresses during scanning. See nm-settings-nmcli5 for details. @@ -1656,7 +1656,7 @@ enable=nm-version-min:1.3,nm-version-min:1.2.6,nm-version-min:1.0.16 private keys in plain text, so it will be made readable only to root, and the plugin will ignore files that are readable or writable by any user or group other than root. See "Secret flag types" - in nm-settings5 + in nm-settings-nmcli5 for how to avoid storing passwords in plain text. @@ -1881,7 +1881,7 @@ interface-name:vboxnet*,except:interface-name:vboxnet2 nmcli1, nmcli-examples7, nm-online1, - nm-settings5, + nm-settings-nmcli5, nm-applet1, nm-connection-editor1 diff --git a/man/NetworkManager.xml b/man/NetworkManager.xml index f0b0f33f6b..cc5e9b2c65 100644 --- a/man/NetworkManager.xml +++ b/man/NetworkManager.xml @@ -357,7 +357,7 @@ nmcli1, nmcli-examples7, nm-online1, - nm-settings5, + nm-settings-nmcli5, nm-applet1, nm-connection-editor1, udev7 diff --git a/man/nm-openvswitch.xml b/man/nm-openvswitch.xml index 52ecf96b7d..7bf598d6b8 100644 --- a/man/nm-openvswitch.xml +++ b/man/nm-openvswitch.xml @@ -170,7 +170,7 @@ Connection 'ovs-slave-eth2' (475ac1bf-30b2-4534-a877-27f33f58b082) successfully $ nmcli conn add type ethernet conn.interface eth3 master bond0 Connection 'ovs-slave-eth3' (8dedeecb-ed12-482b-b77a-24a4fb835136) successfully added. - It's just a Port with multiple interfaces. See nm-settings manual for + It's just a Port with multiple interfaces. See nm-settings-nmcli manual for Bonding options you can use with "nmcli c add" or "nmcli c modify". You could even set a VLAN tag on the same Port to do VLAN tagging and bonding at the same time. @@ -197,7 +197,7 @@ Connection 'ovs-slave-eth3' (8dedeecb-ed12-482b-b77a-24a4fb835136) successfully RFC 7047: The Open vSwitch Database Management Protocol, ovs-vsctl8, ovs-vswitchd.conf.db5, - nm-settings5, + nm-settings-nmcli5, nmcli1 diff --git a/man/nm-settings-ifcfg-rh.xsl b/man/nm-settings-ifcfg-rh.xsl index b389b7e913..7b270e9b18 100644 --- a/man/nm-settings-ifcfg-rh.xsl +++ b/man/nm-settings-ifcfg-rh.xsl @@ -36,7 +36,7 @@ Description NetworkManager is based on the concept of connection profiles that contain - network configuration (see nm-settings + network configuration (see nm-settings-nmcli 5 for details). The profiles can be stored in various formats. NetworkManager uses plugins for reading and writing the data. The plugins can be configured in @@ -322,7 +322,7 @@ DEVICETYPE=TeamPort /usr/share/doc/initscripts/sysconfig.txt See Also - nm-settings5, + nm-settings-nmcli5, nm-settings-keyfile5, NetworkManager8, NetworkManager.conf5, diff --git a/man/nm-settings-keyfile.xsl b/man/nm-settings-keyfile.xsl index d63abf0f17..894aad3e88 100644 --- a/man/nm-settings-keyfile.xsl +++ b/man/nm-settings-keyfile.xsl @@ -32,7 +32,7 @@ Description NetworkManager is based on the concept of connection profiles that contain - network configuration (see nm-settings + network configuration (see nm-settings-nmcli 5 for details). The profiles can be stored in various formats. NetworkManager uses plugins for reading and writing the data. The plugins can be configured in @@ -56,7 +56,7 @@ The keyfile config format is a simple .ini-style format. It consists of sections (groups) of key-value pairs. Each section corresponds to a setting name as described in the settings specification - (nm-settings + (nm-settings-nmcli 5). Each configuration key/value pair in the section is one of the properties listed in the settings specification. The majority of properties of the specification is written @@ -195,7 +195,7 @@ id=4 There are several exceptions to this rule, mainly for making keyfile syntax easier for humans. The exceptions handled specially by keyfile plugin are listed below. Refer to - nm-settings5 + nm-settings-nmcli5 for all available settings and properties and their description. Name aliases @@ -246,7 +246,7 @@ id=4 See Also - nm-settings5, + nm-settings-nmcli5, nm-settings-ifcfg-rh5, NetworkManager8, NetworkManager.conf5, diff --git a/man/nmcli-examples.xml b/man/nmcli-examples.xml index 1fd7b76675..36d671ee74 100644 --- a/man/nmcli-examples.xml +++ b/man/nmcli-examples.xml @@ -189,7 +189,7 @@ B,DISPATCH This command activates a VPN connection profile enabling nmcli to interact with the user ('--ask'): this will allow nmcli to prompt for the VPN password on the command line when the password-flags are set to '0x02' ('always ask', see - nm-settings5 + nm-settings-nmcli5 ). This is particularly useful for OTP based VPNs, as the user needs to be prompted for the password each time the connection is activated. @@ -675,7 +675,7 @@ Type "Yes" to commit the changes: Yes nmcli1, NetworkManager8, NetworkManager.conf5, - nm-settings5, + nm-settings-nmcli5, nm-online1, nm-applet1, nm-connection-editor1 From d3620dd286ce1c0c46aa71f6ed2956e50dc0bf32 Mon Sep 17 00:00:00 2001 From: Fernando Fernandez Mancera Date: Thu, 27 Jul 2023 16:23:04 +0200 Subject: [PATCH 07/18] version: add version 1.46 macros --- src/libnm-core-public/nm-version-macros.h.in | 1 + src/libnm-core-public/nm-version.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/libnm-core-public/nm-version-macros.h.in b/src/libnm-core-public/nm-version-macros.h.in index f44199a0d0..072b8ca5e9 100644 --- a/src/libnm-core-public/nm-version-macros.h.in +++ b/src/libnm-core-public/nm-version-macros.h.in @@ -73,6 +73,7 @@ #define NM_VERSION_1_40 (NM_ENCODE_VERSION(1, 40, 0)) #define NM_VERSION_1_42 (NM_ENCODE_VERSION(1, 42, 0)) #define NM_VERSION_1_44 (NM_ENCODE_VERSION(1, 44, 0)) +#define NM_VERSION_1_46 (NM_ENCODE_VERSION(1, 46, 0)) /* For releases, NM_API_VERSION is equal to NM_VERSION. * diff --git a/src/libnm-core-public/nm-version.h b/src/libnm-core-public/nm-version.h index 271535d201..24471129dd 100644 --- a/src/libnm-core-public/nm-version.h +++ b/src/libnm-core-public/nm-version.h @@ -369,6 +369,20 @@ #define NM_AVAILABLE_IN_1_44 #endif +#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_46 +#define NM_DEPRECATED_IN_1_46 G_DEPRECATED +#define NM_DEPRECATED_IN_1_46_FOR(f) G_DEPRECATED_FOR(f) +#else +#define NM_DEPRECATED_IN_1_46 +#define NM_DEPRECATED_IN_1_46_FOR(f) +#endif + +#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_46 +#define NM_AVAILABLE_IN_1_46 G_UNAVAILABLE(1, 46) +#else +#define NM_AVAILABLE_IN_1_46 +#endif + /* * Synchronous API for calling D-Bus in libnm is deprecated. See * https://networkmanager.dev/docs/libnm/latest/usage.html#sync-api From fe48a4b35cf6373ba033134944da10aa51d1d85a Mon Sep 17 00:00:00 2001 From: Fernando Fernandez Mancera Date: Thu, 27 Jul 2023 16:15:47 +0200 Subject: [PATCH 08/18] wifi: parse access point announced bandwidth Parse the access point announced bandwidth in MHz. This is considering both HT and VHT. Please notice that for VHT 80+80 MHz we are representing it as 160 MHz. --- ...freedesktop.NetworkManager.AccessPoint.xml | 7 ++ src/core/devices/wifi/nm-wifi-ap.c | 41 +++++++++ src/core/devices/wifi/nm-wifi-ap.h | 3 + src/core/nm-core-utils.c | 85 +++++++++++++++++++ src/core/nm-core-utils.h | 1 + src/core/supplicant/nm-supplicant-interface.c | 11 ++- src/core/supplicant/nm-supplicant-types.h | 2 + src/libnm-client-impl/libnm.ver | 5 ++ src/libnm-client-impl/nm-access-point.c | 39 +++++++++ src/libnm-client-public/nm-access-point.h | 4 + 10 files changed, 196 insertions(+), 2 deletions(-) diff --git a/introspection/org.freedesktop.NetworkManager.AccessPoint.xml b/introspection/org.freedesktop.NetworkManager.AccessPoint.xml index 7340bda308..287bfaa9a4 100644 --- a/introspection/org.freedesktop.NetworkManager.AccessPoint.xml +++ b/introspection/org.freedesktop.NetworkManager.AccessPoint.xml @@ -79,6 +79,13 @@ --> + + +