From fc9aca6fcbf7464073fc18bbae09cdb8823d1183 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 01 2017 03:28:06 +0000 Subject: import NetworkManager-1.8.0-9.el7 --- diff --git a/.NetworkManager.metadata b/.NetworkManager.metadata index 7b41b4a..23f4a1b 100644 --- a/.NetworkManager.metadata +++ b/.NetworkManager.metadata @@ -1 +1 @@ -96e38ddd0ff256e8e234e76693165192e46d9b13 SOURCES/NetworkManager-1.4.0.tar.xz +ef387c30c8fc0a1aea7c11dc6ef20afbb8c9616c SOURCES/NetworkManager-1.8.0.tar.xz diff --git a/.gitignore b/.gitignore index 5ba46d6..c89fae3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/NetworkManager-1.4.0.tar.xz +SOURCES/NetworkManager-1.8.0.tar.xz diff --git a/SOURCES/0001-cloned-mac-address-permanent-rh1413312.patch b/SOURCES/0001-cloned-mac-address-permanent-rh1413312.patch new file mode 100644 index 0000000..5c73b5e --- /dev/null +++ b/SOURCES/0001-cloned-mac-address-permanent-rh1413312.patch @@ -0,0 +1,105 @@ +From 14dc1e18cf8a7595ca4d4b04203fc8ff7f0a29ca Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Fri, 24 Feb 2017 20:25:56 +0100 +Subject: [PATCH 1/1] Revert "device: change default value for + cloned-mac-address to "preserve" (bgo#770611)" + +https://bugzilla.redhat.com/show_bug.cgi?id=1413312 + +This reverts commit fae5ecec5a4d9987a1915441602cb78275a9f490. +--- + libnm-core/nm-setting-wired.c | 7 +++---- + libnm-core/nm-setting-wireless.c | 7 +++---- + man/NetworkManager.conf.xml | 4 ++-- + src/devices/nm-device.c | 3 ++- + 4 files changed, 10 insertions(+), 11 deletions(-) + +diff --git a/libnm-core/nm-setting-wired.c b/libnm-core/nm-setting-wired.c +index 5569f55..9bf8255 100644 +--- a/libnm-core/nm-setting-wired.c ++++ b/libnm-core/nm-setting-wired.c +@@ -1144,8 +1144,8 @@ nm_setting_wired_class_init (NMSettingWiredClass *setting_wired_class) + /** + * NMSettingWired:cloned-mac-address: + * +- * If specified, request that the device use this MAC address instead. +- * This is known as MAC cloning or spoofing. ++ * If specified, request that the device use this MAC address instead of its ++ * permanent MAC address. This is known as MAC cloning or spoofing. + * + * Beside explicitly specifing a MAC address, the special values "preserve", "permanent", + * "random" and "stable" are supported. +@@ -1156,8 +1156,7 @@ nm_setting_wired_class_init (NMSettingWiredClass *setting_wired_class) + * machine dependent key. + * + * If unspecified, the value can be overwritten via global defaults, see manual +- * of NetworkManager.conf. If still unspecified, it defaults to "preserve" +- * (older versions of NetworkManager may use a different default value). ++ * of NetworkManager.conf. If still unspecified, it defaults to "permanent". + * + * On D-Bus, this field is expressed as "assigned-mac-address" or the deprecated + * "cloned-mac-address". +diff --git a/libnm-core/nm-setting-wireless.c b/libnm-core/nm-setting-wireless.c +index 8ae84d4..316e812 100644 +--- a/libnm-core/nm-setting-wireless.c ++++ b/libnm-core/nm-setting-wireless.c +@@ -1350,8 +1350,8 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *setting_wireless_class) + /** + * NMSettingWireless:cloned-mac-address: + * +- * If specified, request that the device use this MAC address instead. +- * This is known as MAC cloning or spoofing. ++ * If specified, request that the device use this MAC address instead of its ++ * permanent MAC address. This is known as MAC cloning or spoofing. + * + * Beside explicitly specifing a MAC address, the special values "preserve", "permanent", + * "random" and "stable" are supported. +@@ -1362,8 +1362,7 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *setting_wireless_class) + * machine dependent key. + * + * If unspecified, the value can be overwritten via global defaults, see manual +- * of NetworkManager.conf. If still unspecified, it defaults to "preserve" +- * (older versions of NetworkManager may use a different default value). ++ * of NetworkManager.conf. If still unspecified, it defaults to "permanent". + * + * On D-Bus, this field is expressed as "assigned-mac-address" or the deprecated + * "cloned-mac-address". +diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml +index 658fd7c..2a8ba76 100644 +--- a/man/NetworkManager.conf.xml ++++ b/man/NetworkManager.conf.xml +@@ -635,7 +635,7 @@ ipv6.ip6-privacy=0 + + + ethernet.cloned-mac-address +- If left unspecified, it defaults to "preserve". ++ If left unspecified, it defaults to "permanent". + + + ethernet.generate-mac-address-mask +@@ -681,7 +681,7 @@ ipv6.ip6-privacy=0 + + + wifi.cloned-mac-address +- If left unspecified, it defaults to "preserve". ++ If left unspecified, it defaults to "permanent". + + + wifi.generate-mac-address-mask +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index da581a0..9c30790 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -13059,7 +13059,8 @@ _get_cloned_mac_address_setting (NMDevice *self, NMConnection *connection, gbool + is_wifi ? "wifi.cloned-mac-address" : "ethernet.cloned-mac-address", + self); + +- addr = NM_CLONED_MAC_PRESERVE; ++ /* RHEL patches the default to permanent (rh#1413312) */ ++ addr = NM_CLONED_MAC_PERMANENT; + + if (!a) { + if (is_wifi) { +-- +2.9.3 + diff --git a/SOURCES/0001-fix-pregen-doc.patch b/SOURCES/0001-fix-pregen-doc.patch deleted file mode 100644 index ee374ad..0000000 --- a/SOURCES/0001-fix-pregen-doc.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 39b1b6a7881447f7d023ddbf391cc4ee80793f48 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Fri, 19 Aug 2016 10:58:53 +0200 -Subject: [PATCH 1/1] patch documentation for default logging backend in `man 5 - NetworkManager.conf` - -The default logging backend is generated via man/common.ent and during -`make dist` "journal" is embedded in the pre-generated documentation. - -As we don't regenerate the documentation for RHEL, patch it. ---- - man/NetworkManager.conf.5 | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/man/NetworkManager.conf.5 b/man/NetworkManager.conf.5 -index f1d3d75..9b57053 100644 ---- a/man/NetworkManager.conf.5 -+++ b/man/NetworkManager.conf.5 -@@ -218,7 +218,7 @@ rc\-manager\ \&unmanaged - .RS 4 - Set the - resolv\&.conf --management mode\&. The default value depends on how NetworkManager was built, whereas this version of NetworkManager was build with a default of "symlink"\&. Regardless of this setting, NetworkManager will always write resolv\&.conf to its runtime state directory\&. -+management mode\&. The default value depends on NetworkManager build options, and this version of NetworkManager was build with a default of "file"\&. Regardless of this setting, NetworkManager will always write resolv\&.conf to its runtime state directory\&. - .sp - symlink: NetworkManager will symlink - /etc/resolv\&.conf -@@ -492,7 +492,7 @@ INFO\&. - .PP - \fIbackend\fR - .RS 4 --The logging backend\&. Supported values are "debug", "syslog", "journal"\&. "debug" uses syslog and logs to standard error\&. If NetworkManager is started in debug mode (\-\-debug) this option is ignored and "debug" is always used\&. Otherwise, the default is "journal"\&. -+The logging backend\&. Supported values are "debug", "syslog", "journal"\&. "debug" uses syslog and logs to standard error\&. If NetworkManager is started in debug mode (\-\-debug) this option is ignored and "debug" is always used\&. Otherwise, the default is "syslog"\&. - .RE - .PP - \fIaudit\fR -@@ -500,7 +500,7 @@ The logging backend\&. Supported values are "debug", "syslog", "journal"\&. "deb - Whether the audit records are delivered to auditd, the audit daemon\&. If - false, audit records will be sent only to the NetworkManager logging system\&. If set to - true, they will be also sent to auditd\&. The default value is --true\&. -+false\&. - .RE - .SH "CONNECTION SECTION" - .PP --- -2.7.4 - diff --git a/SOURCES/0002-ifcfg-rh-clear-ip-for-slave-rh1368761.patch b/SOURCES/0002-ifcfg-rh-clear-ip-for-slave-rh1368761.patch deleted file mode 100644 index 16f0562..0000000 --- a/SOURCES/0002-ifcfg-rh-clear-ip-for-slave-rh1368761.patch +++ /dev/null @@ -1,271 +0,0 @@ -From caf4671db8d5b910ec0b6b8e9f1e64a21d506a95 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Tue, 23 Aug 2016 13:43:29 +0200 -Subject: [PATCH 1/1] ifcfg-rh: clear IP settings for slave connections - -Clear some IP related entries from the ifcfg-rh file if -the connection is a slave connection. - -Also, drop utils_ignore_ip_config(). It is guaranteed, that -writer only handles connections that verify(). Such connections -have an IPv4/IPv6 setting if (and only if) they are not slave -types. - -https://bugzilla.redhat.com/show_bug.cgi?id=1368761 -(cherry picked from commit cf7b8866ced5ec67e76b8dde530e0350104194d4) -(cherry picked from commit 1d909f422900af442f7946a2775564f4567ebe9e) ---- - .../plugins/ifcfg-rh/tests/test-ifcfg-rh.c | 5 +- - src/settings/plugins/ifcfg-rh/utils.c | 19 ---- - src/settings/plugins/ifcfg-rh/utils.h | 2 - - src/settings/plugins/ifcfg-rh/writer.c | 113 +++++++++++++-------- - 4 files changed, 72 insertions(+), 67 deletions(-) - -diff --git a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c -index 60938f6..b73f2f5 100644 ---- a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c -+++ b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c -@@ -107,11 +107,14 @@ _writer_new_connection (NMConnection *connection, - gboolean success; - GError *error = NULL; - char *filename = NULL; -+ gs_unref_object NMConnection *con_verified = NULL; - - g_assert (NM_IS_CONNECTION (connection)); - g_assert (ifcfg_dir); - -- success = writer_new_connection (connection, -+ con_verified = nmtst_connection_duplicate_and_normalize (connection); -+ -+ success = writer_new_connection (con_verified, - ifcfg_dir, - &filename, - &error); -diff --git a/src/settings/plugins/ifcfg-rh/utils.c b/src/settings/plugins/ifcfg-rh/utils.c -index b602a7d..b9d52b7 100644 ---- a/src/settings/plugins/ifcfg-rh/utils.c -+++ b/src/settings/plugins/ifcfg-rh/utils.c -@@ -382,25 +382,6 @@ utils_has_complex_routes (const char *filename) - return FALSE; - } - --gboolean --utils_ignore_ip_config (NMConnection *connection) --{ -- NMSettingConnection *s_con; -- -- s_con = nm_connection_get_setting_connection (connection); -- g_assert (s_con); -- -- /* bonding slaves have no IP configuration, and the system -- * scripts just ignore it if it's there. -- */ -- if ( nm_setting_connection_is_slave_type (s_con, NM_SETTING_BOND_SETTING_NAME) -- || nm_setting_connection_is_slave_type (s_con, NM_SETTING_BRIDGE_SETTING_NAME) -- || nm_setting_connection_is_slave_type (s_con, NM_SETTING_TEAM_SETTING_NAME)) -- return TRUE; -- -- return FALSE; --} -- - /* Find out if the 'alias' file name might be an alias file for 'ifcfg' file name, - * or any alias when 'ifcfg' is NULL. Does not check that it's actually a valid - * alias name; that happens in reader.c -diff --git a/src/settings/plugins/ifcfg-rh/utils.h b/src/settings/plugins/ifcfg-rh/utils.h -index b8b172e..c105487 100644 ---- a/src/settings/plugins/ifcfg-rh/utils.h -+++ b/src/settings/plugins/ifcfg-rh/utils.h -@@ -54,8 +54,6 @@ shvarFile *utils_get_route6_ifcfg (const char *parent, gboolean should_create); - gboolean utils_has_route_file_new_syntax (const char *filename); - gboolean utils_has_complex_routes (const char *filename); - --gboolean utils_ignore_ip_config (NMConnection *connection); -- - gboolean utils_is_ifcfg_alias_file (const char *alias, const char *ifcfg); - - char *utils_detect_ifcfg_path (const char *path, gboolean only_ifcfg); -diff --git a/src/settings/plugins/ifcfg-rh/writer.c b/src/settings/plugins/ifcfg-rh/writer.c -index 4817549..689af7b 100644 ---- a/src/settings/plugins/ifcfg-rh/writer.c -+++ b/src/settings/plugins/ifcfg-rh/writer.c -@@ -2015,8 +2015,26 @@ write_ip4_setting (NMConnection *connection, shvarFile *ifcfg, GError **error) - const char *method = NULL; - - s_ip4 = nm_connection_get_setting_ip4_config (connection); -- if (s_ip4) -- method = nm_setting_ip_config_get_method (s_ip4); -+ if (!s_ip4) { -+ /* slave-type: clear IPv4 settings. -+ * -+ * Some IPv4 setting related options are not cleared, -+ * for no strong reason. */ -+ svSetValue (ifcfg, "BOOTPROTO", NULL, FALSE); -+ -+ svSetValue (ifcfg, "IPADDR", NULL, FALSE); -+ svSetValue (ifcfg, "PREFIX", NULL, FALSE); -+ svSetValue (ifcfg, "NETMASK", NULL, FALSE); -+ svSetValue (ifcfg, "GATEWAY", NULL, FALSE); -+ -+ svSetValue (ifcfg, "IPADDR0", NULL, FALSE); -+ svSetValue (ifcfg, "PREFIX0", NULL, FALSE); -+ svSetValue (ifcfg, "NETMASK0", NULL, FALSE); -+ svSetValue (ifcfg, "GATEWAY0", NULL, FALSE); -+ return TRUE; -+ } -+ -+ method = nm_setting_ip_config_get_method (s_ip4); - - /* Missing IP4 setting is assumed to be DHCP */ - if (!method) -@@ -2371,12 +2389,11 @@ write_ip4_aliases (NMConnection *connection, char *base_ifcfg_path) - g_dir_close (dir); - } - -- if (utils_ignore_ip_config (connection)) -- return; -- - s_ip4 = nm_connection_get_setting_ip4_config (connection); -- if (!s_ip4) -+ if (!s_ip4) { -+ /* slave-type: no alias files */ - return; -+ } - - num = nm_setting_ip_config_get_num_addresses (s_ip4); - for (i = 0; i < num; i++) { -@@ -2495,16 +2512,19 @@ write_ip6_setting (NMConnection *connection, shvarFile *ifcfg, GError **error) - - s_ip6 = nm_connection_get_setting_ip6_config (connection); - if (!s_ip6) { -- /* Treat missing IPv6 setting as a setting with method "auto" */ -- svSetValue (ifcfg, "IPV6INIT", "yes", FALSE); -- svSetValue (ifcfg, "IPV6_AUTOCONF", "yes", FALSE); -+ /* slave-type: clear IPv6 settings -+ * -+ * Some IPv6 setting related options are not cleared, -+ * for no strong reason. */ -+ svSetValue (ifcfg, "IPV6INIT", NULL, FALSE); -+ svSetValue (ifcfg, "IPV6_AUTOCONF", NULL, FALSE); - svSetValue (ifcfg, "DHCPV6C", NULL, FALSE); -- svSetValue (ifcfg, "IPV6_DEFROUTE", "yes", FALSE); -- svSetValue (ifcfg, "IPV6_PEERDNS", "yes", FALSE); -- svSetValue (ifcfg, "IPV6_PEERROUTES", "yes", FALSE); -- svSetValue (ifcfg, "IPV6_FAILURE_FATAL", "no", FALSE); -+ svSetValue (ifcfg, "IPV6_DEFROUTE", NULL, FALSE); -+ svSetValue (ifcfg, "IPV6_PEERDNS", NULL, FALSE); -+ svSetValue (ifcfg, "IPV6_PEERROUTES", NULL, FALSE); -+ svSetValue (ifcfg, "IPV6_FAILURE_FATAL", NULL, FALSE); - svSetValue (ifcfg, "IPV6_ROUTE_METRIC", NULL, FALSE); -- svSetValue (ifcfg, "IPV6_ADDR_GEN_MODE", "stable-privacy", FALSE); -+ svSetValue (ifcfg, "IPV6_ADDR_GEN_MODE", NULL, FALSE); - return TRUE; - } - -@@ -2695,34 +2715,37 @@ write_res_options (NMConnection *connection, shvarFile *ifcfg, GError **error) - NMSettingIPConfig *s_ip4; - const char *method; - int i, num_options; -- GPtrArray *array; -+ gs_unref_ptrarray GPtrArray *array = NULL; - GString *value; - - s_ip4 = nm_connection_get_setting_ip4_config (connection); -- s_ip6 = nm_connection_get_setting_ip6_config (connection); -+ -+ if (!s_ip4) { -+ /* slave-type: clear res-options */ -+ svSetValue (ifcfg, "RES_OPTIONS", NULL, FALSE); -+ return TRUE; -+ } -+ - array = g_ptr_array_new (); - -- if (s_ip4) { -- method = nm_setting_ip_config_get_method (s_ip4); -- if (g_strcmp0 (method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED)) { -- num_options = nm_setting_ip_config_get_num_dns_options (s_ip4); -- for (i = 0; i < num_options; i++) -- add_dns_option (array, nm_setting_ip_config_get_dns_option (s_ip4, i)); -- } -+ method = nm_setting_ip_config_get_method (s_ip4); -+ if (g_strcmp0 (method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED)) { -+ num_options = nm_setting_ip_config_get_num_dns_options (s_ip4); -+ for (i = 0; i < num_options; i++) -+ add_dns_option (array, nm_setting_ip_config_get_dns_option (s_ip4, i)); - } - -- if (s_ip6) { -- method = nm_setting_ip_config_get_method (s_ip6); -- if (g_strcmp0 (method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) { -- num_options = nm_setting_ip_config_get_num_dns_options (s_ip6); -- for (i = 0; i < num_options; i++) -- add_dns_option (array, nm_setting_ip_config_get_dns_option (s_ip6, i)); -- } -+ s_ip6 = nm_connection_get_setting_ip6_config (connection); -+ method = nm_setting_ip_config_get_method (s_ip6); -+ if (g_strcmp0 (method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) { -+ num_options = nm_setting_ip_config_get_num_dns_options (s_ip6); -+ for (i = 0; i < num_options; i++) -+ add_dns_option (array, nm_setting_ip_config_get_dns_option (s_ip6, i)); - } - -- if (array->len > 0 -- || (s_ip4 && nm_setting_ip_config_has_dns_options (s_ip4)) -- || (s_ip6 && nm_setting_ip_config_has_dns_options (s_ip6))) { -+ if ( array->len > 0 -+ || nm_setting_ip_config_has_dns_options (s_ip4) -+ || nm_setting_ip_config_has_dns_options (s_ip6)) { - value = g_string_new (NULL); - for (i = 0; i < array->len; i++) { - if (i > 0) -@@ -2734,7 +2757,6 @@ write_res_options (NMConnection *connection, shvarFile *ifcfg, GError **error) - } else - svSetValue (ifcfg, "RES_OPTIONS", NULL, FALSE); - -- g_ptr_array_unref (array); - return TRUE; - } - -@@ -2772,6 +2794,9 @@ write_connection (NMConnection *connection, - gboolean no_8021x = FALSE; - gboolean wired = FALSE; - -+ nm_assert (NM_IS_CONNECTION (connection)); -+ nm_assert (nm_connection_verify (connection, NULL)); -+ - if (!writer_can_write_connection (connection, error)) - return FALSE; - -@@ -2876,20 +2901,18 @@ write_connection (NMConnection *connection, - if (!write_dcb_setting (connection, ifcfg, error)) - goto out; - -- if (!utils_ignore_ip_config (connection)) { -- svSetValue (ifcfg, "DHCP_HOSTNAME", NULL, FALSE); -- svSetValue (ifcfg, "DHCP_FQDN", NULL, FALSE); -+ svSetValue (ifcfg, "DHCP_HOSTNAME", NULL, FALSE); -+ svSetValue (ifcfg, "DHCP_FQDN", NULL, FALSE); - -- if (!write_ip4_setting (connection, ifcfg, error)) -- goto out; -- write_ip4_aliases (connection, ifcfg_name); -+ if (!write_ip4_setting (connection, ifcfg, error)) -+ goto out; -+ write_ip4_aliases (connection, ifcfg_name); - -- if (!write_ip6_setting (connection, ifcfg, error)) -- goto out; -+ if (!write_ip6_setting (connection, ifcfg, error)) -+ goto out; - -- if (!write_res_options (connection, ifcfg, error)) -- goto out; -- } -+ if (!write_res_options (connection, ifcfg, error)) -+ goto out; - - write_connection_setting (s_con, ifcfg); - --- -2.7.4 - diff --git a/SOURCES/0002-utils-fix-maybe-uninitialized-in-nm-udev-utils.c.patch b/SOURCES/0002-utils-fix-maybe-uninitialized-in-nm-udev-utils.c.patch new file mode 100644 index 0000000..ac84527 --- /dev/null +++ b/SOURCES/0002-utils-fix-maybe-uninitialized-in-nm-udev-utils.c.patch @@ -0,0 +1,64 @@ +From 1ea56b82121d3f024859da41337cf2406e7f2e61 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Wed, 10 May 2017 15:31:15 +0200 +Subject: [PATCH 1/1] utils: fix maybe-uninitialized in "nm-udev-utils.c" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + + CC shared/nm-utils/libnm_core_libnm_core_la-nm-udev-utils.lo + In file included from ./shared/nm-utils/nm-glib.h:27:0, + from ./shared/nm-utils/nm-macros-internal.h:29, + from ./shared/nm-default.h:178, + from shared/nm-utils/nm-udev-utils.c:21: + shared/nm-utils/nm-udev-utils.c: In function ‘nm_udev_client_enumerate_new’: + ./shared/nm-utils/gsystem-local-alloc.h:53:50: error: ‘to_free’ may be used uninitialized in this function [-Werror=maybe-uninitialized] + GS_DEFINE_CLEANUP_FUNCTION(void*, gs_local_free, g_free) + ^~~~~~ + shared/nm-utils/nm-udev-utils.c:147:18: note: ‘to_free’ was declared here + gs_free char *to_free; + ^~~~~~~ + In file included from ./shared/nm-utils/nm-glib.h:27:0, + from ./shared/nm-utils/nm-macros-internal.h:29, + from ./shared/nm-default.h:178, + from shared/nm-utils/nm-udev-utils.c:21: + shared/nm-utils/nm-udev-utils.c: In function ‘nm_udev_client_new’: + ./shared/nm-utils/gsystem-local-alloc.h:53:50: error: ‘to_free’ may be used uninitialized in this function [-Werror=maybe-uninitialized] + GS_DEFINE_CLEANUP_FUNCTION(void*, gs_local_free, g_free) + ^~~~~~ + shared/nm-utils/nm-udev-utils.c:243:20: note: ‘to_free’ was declared here + gs_free char *to_free; + ^~~~~~~ + +Fixes: e32839838e5ea74ba490cf912e20939afa0e4f40 +(cherry picked from commit 0893c3756ef898f8fe6e2367d5167a345299dcd4) +(cherry picked from commit e2902f61a4462e6d197a20bf3d0ab996b64305b1) +--- + shared/nm-utils/nm-udev-utils.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/shared/nm-utils/nm-udev-utils.c b/shared/nm-utils/nm-udev-utils.c +index 5552d59..bf0ad5b 100644 +--- a/shared/nm-utils/nm-udev-utils.c ++++ b/shared/nm-utils/nm-udev-utils.c +@@ -144,7 +144,7 @@ nm_udev_utils_enumerate (struct udev *uclient, + for (n = 0; subsystems[n]; n++) { + const char *subsystem; + const char *devtype; +- gs_free char *to_free; ++ gs_free char *to_free = NULL; + + _subsystem_split (subsystems[n], &subsystem, &devtype, &to_free); + +@@ -240,7 +240,7 @@ nm_udev_client_new (const char *const*subsystems, + /* install subsystem filters to only wake up for certain events */ + for (n = 0; self->subsystems[n]; n++) { + if (self->monitor) { +- gs_free char *to_free; ++ gs_free char *to_free = NULL; + const char *subsystem; + const char *devtype; + +-- +2.9.3 + diff --git a/SOURCES/0003-fix-device-run-state-unknown-rh1440171.patch b/SOURCES/0003-fix-device-run-state-unknown-rh1440171.patch new file mode 100644 index 0000000..7f2778b --- /dev/null +++ b/SOURCES/0003-fix-device-run-state-unknown-rh1440171.patch @@ -0,0 +1,140 @@ +From f2d099c8c534ee426dbc31a3a61fcf27c18b92d8 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Thu, 11 May 2017 19:26:28 +0200 +Subject: [PATCH 1/2] core: cleanup logging reading device-state + +- print string value instead of numerical "managed" +- for missing state, print the same format. After all, + some defaults apply and it is interesting to know what + they are. + +(cherry picked from commit 81008c90ac9832ade1c9783078823fdd45221225) +(cherry picked from commit 8da225283b9977554a6b78e73dc03d22b8703027) +--- + src/nm-config.c | 30 +++++++++++++----------------- + 1 file changed, 13 insertions(+), 17 deletions(-) + +diff --git a/src/nm-config.c b/src/nm-config.c +index 2cdf855..954cad7 100644 +--- a/src/nm-config.c ++++ b/src/nm-config.c +@@ -1873,6 +1873,13 @@ _nm_config_state_set (NMConfig *self, + #define DEVICE_RUN_STATE_KEYFILE_KEY_DEVICE_PERM_HW_ADDR_FAKE "perm-hw-addr-fake" + #define DEVICE_RUN_STATE_KEYFILE_KEY_DEVICE_CONNECTION_UUID "connection-uuid" + ++NM_UTILS_LOOKUP_STR_DEFINE_STATIC (_device_state_managed_type_to_str, NMConfigDeviceStateManagedType, ++ NM_UTILS_LOOKUP_DEFAULT_NM_ASSERT ("unknown"), ++ NM_UTILS_LOOKUP_STR_ITEM (NM_CONFIG_DEVICE_STATE_MANAGED_TYPE_UNKNOWN, "unknown"), ++ NM_UTILS_LOOKUP_STR_ITEM (NM_CONFIG_DEVICE_STATE_MANAGED_TYPE_UNMANAGED, "unmanaged"), ++ NM_UTILS_LOOKUP_STR_ITEM (NM_CONFIG_DEVICE_STATE_MANAGED_TYPE_MANAGED, "managed"), ++); ++ + static NMConfigDeviceStateData * + _config_device_state_data_new (int ifindex, GKeyFile *kf) + { +@@ -1968,27 +1975,16 @@ nm_config_device_state_load (int ifindex) + + device_state = _config_device_state_data_new (ifindex, kf); + +- if (kf) { +- _LOGT ("device-state: read #%d (%s); managed=%d%s%s%s%s%s%s", +- ifindex, path, +- device_state->managed, +- NM_PRINT_FMT_QUOTED (device_state->connection_uuid, ", connection-uuid=", device_state->connection_uuid, "", ""), +- NM_PRINT_FMT_QUOTED (device_state->perm_hw_addr_fake, ", perm-hw-addr-fake=", device_state->perm_hw_addr_fake, "", "")); +- } else { +- _LOGT ("device-state: read #%d (%s); no persistent state", +- ifindex, path); +- } ++ _LOGT ("device-state: %s #%d (%s); managed=%s%s%s%s%s%s%s", ++ kf ? "read" : "miss", ++ ifindex, path, ++ _device_state_managed_type_to_str (device_state->managed), ++ NM_PRINT_FMT_QUOTED (device_state->connection_uuid, ", connection-uuid=", device_state->connection_uuid, "", ""), ++ NM_PRINT_FMT_QUOTED (device_state->perm_hw_addr_fake, ", perm-hw-addr-fake=", device_state->perm_hw_addr_fake, "", "")); + + return device_state; + } + +-NM_UTILS_LOOKUP_STR_DEFINE_STATIC (_device_state_managed_type_to_str, NMConfigDeviceStateManagedType, +- NM_UTILS_LOOKUP_DEFAULT_NM_ASSERT ("unknown"), +- NM_UTILS_LOOKUP_STR_ITEM (NM_CONFIG_DEVICE_STATE_MANAGED_TYPE_UNKNOWN, "unknown"), +- NM_UTILS_LOOKUP_STR_ITEM (NM_CONFIG_DEVICE_STATE_MANAGED_TYPE_UNMANAGED, "unmanaged"), +- NM_UTILS_LOOKUP_STR_ITEM (NM_CONFIG_DEVICE_STATE_MANAGED_TYPE_MANAGED, "managed"), +-); +- + gboolean + nm_config_device_state_write (int ifindex, + NMConfigDeviceStateManagedType managed, +-- +2.9.3 + + +From 41ff1247a2dcfd6c781cbce2fac12ab6ae657727 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Thu, 11 May 2017 19:40:55 +0200 +Subject: [PATCH 2/2] core: fix reading device state file + +For manged=unknown, we don't write the value to the +device state keyfile. The results in an empty file, +or at least, a keyfile that doesn't have device.managed +set. + +On read, we must treat a missing device.managed flag as +unknown, and not as unmanaged. Otherwise, on restart +a device becomes marked as explicitly unmanaged. + +This was broken by commit 142ebb1 "core: only persist explicit managed +state in device's state file", where we started conditionally +to no longer write the managed state. + +Reported-by: Michael Biebl +Fixes: 142ebb10376ec592593f15b0359f38be89c97620 +(cherry picked from commit 348ffdec183ee198499dad1365906e8d16ff4122) +(cherry picked from commit 33d3ec3b3e5d2e737afc8db6c64850e67db5c12d) +--- + src/nm-config.c | 24 +++++++++++++----------- + 1 file changed, 13 insertions(+), 11 deletions(-) + +diff --git a/src/nm-config.c b/src/nm-config.c +index 954cad7..54ccf9a 100644 +--- a/src/nm-config.c ++++ b/src/nm-config.c +@@ -1894,21 +1894,23 @@ _config_device_state_data_new (int ifindex, GKeyFile *kf) + nm_assert (ifindex > 0); + + if (kf) { +- gboolean managed; +- +- managed = nm_config_keyfile_get_boolean (kf, +- DEVICE_RUN_STATE_KEYFILE_GROUP_DEVICE, +- DEVICE_RUN_STATE_KEYFILE_KEY_DEVICE_MANAGED, +- FALSE); +- managed_type = managed +- ? NM_CONFIG_DEVICE_STATE_MANAGED_TYPE_MANAGED +- : NM_CONFIG_DEVICE_STATE_MANAGED_TYPE_UNMANAGED; +- +- if (managed) { ++ switch (nm_config_keyfile_get_boolean (kf, ++ DEVICE_RUN_STATE_KEYFILE_GROUP_DEVICE, ++ DEVICE_RUN_STATE_KEYFILE_KEY_DEVICE_MANAGED, ++ -1)) { ++ case TRUE: ++ managed_type = NM_CONFIG_DEVICE_STATE_MANAGED_TYPE_MANAGED; + connection_uuid = nm_config_keyfile_get_value (kf, + DEVICE_RUN_STATE_KEYFILE_GROUP_DEVICE, + DEVICE_RUN_STATE_KEYFILE_KEY_DEVICE_CONNECTION_UUID, + NM_CONFIG_GET_VALUE_STRIP | NM_CONFIG_GET_VALUE_NO_EMPTY); ++ break; ++ case FALSE: ++ managed_type = NM_CONFIG_DEVICE_STATE_MANAGED_TYPE_UNMANAGED; ++ break; ++ case -1: ++ /* missing property in keyfile. */ ++ break; + } + + perm_hw_addr_fake = nm_config_keyfile_get_value (kf, +-- +2.9.3 + diff --git a/SOURCES/0003-ifcfg-rh-accept-team-without-devicetype.patch b/SOURCES/0003-ifcfg-rh-accept-team-without-devicetype.patch deleted file mode 100644 index 67dae52..0000000 --- a/SOURCES/0003-ifcfg-rh-accept-team-without-devicetype.patch +++ /dev/null @@ -1,400 +0,0 @@ -From 969a08cff1196185cc630a1898793b80b3d94da6 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Tue, 23 Aug 2016 16:19:42 +0200 -Subject: [PATCH 1/2] ifcfg-rh: make out_unhandled argument non-optional - -Depending on the connection we are about to read, -we would assert that the user provided a @out_unhandled -argument. - -That means, the user must always provide a valid @out_unhandled -pointer, because he cannot know beforehand how the reading -of the ifcfg file goes. - -(cherry picked from commit 50d7ac4af3f6908a09a857d4127e196b2df37c27) -(cherry picked from commit 6de181247f2f999b8ebec75e21bdd07f1c1f18bb) ---- - src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c | 4 +++- - src/settings/plugins/ifcfg-rh/reader.c | 9 ++------- - src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c | 10 ++++++---- - 3 files changed, 11 insertions(+), 12 deletions(-) - -diff --git a/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c b/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c -index 82f2059..184e95b 100644 ---- a/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c -+++ b/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c -@@ -395,7 +395,9 @@ commit_changes (NMSettingsConnection *connection, - */ - filename = nm_settings_connection_get_filename (connection); - if (filename) { -- reread = connection_from_file (filename, NULL, NULL, NULL); -+ gs_free char *unhandled = NULL; -+ -+ reread = connection_from_file (filename, &unhandled, NULL, NULL); - if (reread) { - same = nm_connection_compare (NM_CONNECTION (connection), - reread, -diff --git a/src/settings/plugins/ifcfg-rh/reader.c b/src/settings/plugins/ifcfg-rh/reader.c -index af5d291..e3d8ee1 100644 ---- a/src/settings/plugins/ifcfg-rh/reader.c -+++ b/src/settings/plugins/ifcfg-rh/reader.c -@@ -4848,7 +4848,7 @@ create_unhandled_connection (const char *filename, shvarFile *ifcfg, - NMSetting *s_con; - char *value; - -- g_assert (out_spec != NULL); -+ nm_assert (out_spec && !*out_spec); - - connection = nm_simple_connection_new (); - -@@ -4963,8 +4963,7 @@ connection_from_file_full (const char *filename, - const char *ifcfg_name = NULL; - - g_return_val_if_fail (filename != NULL, NULL); -- if (out_unhandled) -- g_return_val_if_fail (*out_unhandled == NULL, NULL); -+ g_return_val_if_fail (out_unhandled && !*out_unhandled, NULL); - - /* Non-NULL only for unit tests; normally use /etc/sysconfig/network */ - if (!network_file) -@@ -4982,8 +4981,6 @@ connection_from_file_full (const char *filename, - return NULL; - - if (!svGetValueBoolean (parsed, "NM_CONTROLLED", TRUE)) { -- g_assert (out_unhandled != NULL); -- - connection = create_unhandled_connection (filename, parsed, "unmanaged", out_unhandled); - if (!connection) - g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_FAILED, -@@ -5136,8 +5133,6 @@ connection_from_file_full (const char *filename, - else if (!strcasecmp (type, TYPE_BRIDGE)) - connection = bridge_connection_from_ifcfg (filename, parsed, error); - else { -- g_assert (out_unhandled != NULL); -- - connection = create_unhandled_connection (filename, parsed, "unrecognized", out_unhandled); - if (!connection) - PARSE_WARNING ("connection type was unrecognized but device was not uniquely identified; device may be managed"); -diff --git a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c -index b73f2f5..3a67a83 100644 ---- a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c -+++ b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c -@@ -67,11 +67,14 @@ _connection_from_file (const char *filename, - { - NMConnection *connection; - GError *error = NULL; -+ char *unhandled_fallback = NULL; - - g_assert (!out_unhandled || !*out_unhandled); - -- connection = connection_from_file_test (filename, network_file, test_type, out_unhandled, &error); -+ connection = connection_from_file_test (filename, network_file, test_type, -+ out_unhandled ?: &unhandled_fallback, &error); - g_assert_no_error (error); -+ g_assert (!unhandled_fallback); - - if (out_unhandled && *out_unhandled) - nmtst_assert_connection_verifies (connection); -@@ -89,13 +92,12 @@ _connection_from_file_fail (const char *filename, - NMConnection *connection; - GError *local = NULL; - char *unhandled = NULL; -- char **p_unhandled = (nmtst_get_rand_int () % 2) ? &unhandled : NULL; - -- connection = connection_from_file_test (filename, network_file, test_type, p_unhandled, &local); -+ connection = connection_from_file_test (filename, network_file, test_type, &unhandled, &local); - - g_assert (!connection); - g_assert (local); -- g_assert (!p_unhandled || !*p_unhandled); -+ g_assert (!unhandled); - g_propagate_error (error, local); - } - --- -2.7.4 - - -From eb446ad72bfdac1f5f93dcc2714cb222b0a18dc5 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Tue, 23 Aug 2016 14:36:09 +0200 -Subject: [PATCH 2/2] ifcfg-rh: accept TEAM connections also without DEVICETYPE - setting - -Allow omitting DEVICETYPE=Team or DEVICETYPE=TeamPort and accept -team connections based on the presence of TEAM_CONFIG/TEAM_MASTER -alone. - -Also, check first for a team slave before checking for bond -slave. That is what initscripts do and matters if somebody wrongly -sets MASTER and TEAM_MASTER. - -libteam: https://github.com/jpirko/libteam/commit/20d45a1e026c27f4ec37383d4bb2c446a2744c02 -initscripts: https://git.fedorahosted.org/cgit/initscripts.git/commit/?id=3235be4a3da91bc91c698b318935240dbdf81aac - -https://bugzilla.redhat.com/show_bug.cgi?id=1367180 -(cherry picked from commit 114eb5b9634353731ed50b44299e650958bff596) -(cherry picked from commit a82b7c8d5e5753ebdf92b285cfc3ed74208d8901) ---- - src/settings/plugins/ifcfg-rh/reader.c | 48 +++++++++++++--------- - .../ifcfg-rh/tests/network-scripts/Makefile.am | 6 ++- - .../tests/network-scripts/ifcfg-test-team-master | 6 --- - .../tests/network-scripts/ifcfg-test-team-master-1 | 6 +++ - .../tests/network-scripts/ifcfg-test-team-master-2 | 5 +++ - .../tests/network-scripts/ifcfg-test-team-port | 5 --- - .../tests/network-scripts/ifcfg-test-team-port-1 | 5 +++ - .../tests/network-scripts/ifcfg-test-team-port-2 | 4 ++ - .../plugins/ifcfg-rh/tests/test-ifcfg-rh.c | 18 ++++---- - 9 files changed, 62 insertions(+), 41 deletions(-) - delete mode 100644 src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master - create mode 100644 src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master-1 - create mode 100644 src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master-2 - delete mode 100644 src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-port - create mode 100644 src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-port-1 - create mode 100644 src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-port-2 - -diff --git a/src/settings/plugins/ifcfg-rh/reader.c b/src/settings/plugins/ifcfg-rh/reader.c -index e3d8ee1..d1ea597 100644 ---- a/src/settings/plugins/ifcfg-rh/reader.c -+++ b/src/settings/plugins/ifcfg-rh/reader.c -@@ -1621,26 +1621,29 @@ check_if_bond_slave (shvarFile *ifcfg, - */ - } - --static void -+static gboolean - check_if_team_slave (shvarFile *ifcfg, - NMSettingConnection *s_con) - { -- char *value; -+ gs_free char *value = NULL; - -- value = svGetValue (ifcfg, "DEVICETYPE", FALSE); -- if (!value) -- return; -- if (strcasecmp (value, TYPE_TEAM_PORT)) { -- g_free (value); -- return; -- } -- g_free (value); - value = svGetValue (ifcfg, "TEAM_MASTER", FALSE); - if (!value) -- return; -+ return FALSE; - g_object_set (s_con, NM_SETTING_CONNECTION_MASTER, value, NULL); - g_object_set (s_con, NM_SETTING_CONNECTION_SLAVE_TYPE, NM_SETTING_TEAM_SETTING_NAME, NULL); -- g_free (value); -+ return TRUE; -+} -+ -+static void -+check_if_slave (shvarFile *ifcfg, -+ NMSettingConnection *s_con) -+{ -+ g_return_if_fail (NM_IS_SETTING_CONNECTION (s_con)); -+ -+ if (check_if_team_slave (ifcfg, s_con)) -+ return; -+ check_if_bond_slave (ifcfg, s_con); - } - - typedef struct { -@@ -3948,8 +3951,7 @@ wired_connection_from_ifcfg (const char *file, - g_object_unref (connection); - return NULL; - } -- check_if_bond_slave (ifcfg, NM_SETTING_CONNECTION (con_setting)); -- check_if_team_slave (ifcfg, NM_SETTING_CONNECTION (con_setting)); -+ check_if_slave (ifcfg, (NMSettingConnection *) con_setting); - nm_connection_add_setting (connection, con_setting); - - wired_setting = make_wired_setting (ifcfg, file, &s_8021x, error); -@@ -4099,8 +4101,7 @@ infiniband_connection_from_ifcfg (const char *file, - g_object_unref (connection); - return NULL; - } -- check_if_bond_slave (ifcfg, NM_SETTING_CONNECTION (con_setting)); -- check_if_team_slave (ifcfg, NM_SETTING_CONNECTION (con_setting)); -+ check_if_slave (ifcfg, (NMSettingConnection *) con_setting); - nm_connection_add_setting (connection, con_setting); - - infiniband_setting = make_infiniband_setting (ifcfg, file, error); -@@ -4599,8 +4600,6 @@ is_bond_device (const char *name, shvarFile *parsed) - - if (svGetValueBoolean (parsed, "BONDING_MASTER", FALSE)) - return TRUE; -- -- /* XXX: Check for "bond[\d]+"? */ - - return FALSE; - } -@@ -4816,8 +4815,7 @@ vlan_connection_from_ifcfg (const char *file, - g_object_unref (connection); - return NULL; - } -- check_if_bond_slave (ifcfg, NM_SETTING_CONNECTION (con_setting)); -- check_if_team_slave (ifcfg, NM_SETTING_CONNECTION (con_setting)); -+ check_if_slave (ifcfg, (NMSettingConnection *) con_setting); - nm_connection_add_setting (connection, con_setting); - - vlan_setting = make_vlan_setting (ifcfg, file, error); -@@ -5008,6 +5006,16 @@ connection_from_file_full (const char *filename, - type = g_strdup (TYPE_ETHERNET); - g_free (devtype); - } -+ if (!type) { -+ gs_free char *t = NULL; -+ -+ /* Team and TeamPort types are also accepted by the mere -+ * presense of TEAM_CONFIG/TEAM_MASTER. They don't require -+ * DEVICETYPE. */ -+ t = svGetValue (parsed, "TEAM_CONFIG", FALSE); -+ if (t) -+ type = g_strdup (TYPE_TEAM); -+ } - - if (!type) - type = svGetValue (parsed, "TYPE", FALSE); -diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am b/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am -index fc759e6..7531ec0 100644 ---- a/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am -+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am -@@ -132,8 +132,10 @@ EXTRA_DIST = \ - ifcfg-test-dcb-pgpct-not-100 \ - ifcfg-test-fcoe-fabric \ - ifcfg-test-fcoe-vn2vn \ -- ifcfg-test-team-master \ -- ifcfg-test-team-port \ -+ ifcfg-test-team-master-1 \ -+ ifcfg-test-team-master-2 \ -+ ifcfg-test-team-port-1 \ -+ ifcfg-test-team-port-2 \ - ifcfg-test-team-port-empty-config \ - ifcfg-test-vlan-trailing-spaces \ - ifcfg-test-dns-options \ -diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master -deleted file mode 100644 -index 7edc736..0000000 ---- a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master -+++ /dev/null -@@ -1,6 +0,0 @@ --DEVICE=team0 --ONBOOT=no --DEVICETYPE=Team --BOOTPROTO=dhcp --TEAM_CONFIG="{ \"device\": \"team0\", \"link_watch\": { \"name\": \"ethtool\" } }" -- -diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master-1 b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master-1 -new file mode 100644 -index 0000000..7edc736 ---- /dev/null -+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master-1 -@@ -0,0 +1,6 @@ -+DEVICE=team0 -+ONBOOT=no -+DEVICETYPE=Team -+BOOTPROTO=dhcp -+TEAM_CONFIG="{ \"device\": \"team0\", \"link_watch\": { \"name\": \"ethtool\" } }" -+ -diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master-2 b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master-2 -new file mode 100644 -index 0000000..d01e37c ---- /dev/null -+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master-2 -@@ -0,0 +1,5 @@ -+DEVICE=team0 -+ONBOOT=no -+BOOTPROTO=dhcp -+TEAM_CONFIG="{ \"device\": \"team0\", \"link_watch\": { \"name\": \"ethtool\" } }" -+ -diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-port b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-port -deleted file mode 100644 -index 966bec6..0000000 ---- a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-port -+++ /dev/null -@@ -1,5 +0,0 @@ --TYPE=Ethernet --TEAM_PORT_CONFIG="{ \"p4p1\": { \"prio\": -10, \"sticky\": true } }" --DEVICE=p4p1 --TEAM_MASTER=team0 --DEVICETYPE=TeamPort -diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-port-1 b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-port-1 -new file mode 100644 -index 0000000..966bec6 ---- /dev/null -+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-port-1 -@@ -0,0 +1,5 @@ -+TYPE=Ethernet -+TEAM_PORT_CONFIG="{ \"p4p1\": { \"prio\": -10, \"sticky\": true } }" -+DEVICE=p4p1 -+TEAM_MASTER=team0 -+DEVICETYPE=TeamPort -diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-port-2 b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-port-2 -new file mode 100644 -index 0000000..992510e ---- /dev/null -+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-port-2 -@@ -0,0 +1,4 @@ -+TYPE=Ethernet -+TEAM_PORT_CONFIG="{ \"p4p1\": { \"prio\": -10, \"sticky\": true } }" -+DEVICE=p4p1 -+TEAM_MASTER=team0 -diff --git a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c -index 3a67a83..3e3f7ca 100644 ---- a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c -+++ b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c -@@ -8430,15 +8430,15 @@ test_write_fcoe_mode (gconstpointer user_data) - } - - static void --test_read_team_master (void) -+test_read_team_master (gconstpointer user_data) - { -+ const char *const PATH_NAME = user_data; - NMConnection *connection; - NMSettingConnection *s_con; - NMSettingTeam *s_team; - const char *expected_config = "{ \"device\": \"team0\", \"link_watch\": { \"name\": \"ethtool\" } }"; - -- connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-master", -- NULL, TYPE_ETHERNET, NULL); -+ connection = _connection_from_file (PATH_NAME, NULL, TYPE_ETHERNET, NULL); - - g_assert_cmpstr (nm_connection_get_interface_name (connection), ==, "team0"); - -@@ -8546,15 +8546,15 @@ test_write_team_master (void) - } - - static void --test_read_team_port (void) -+test_read_team_port (gconstpointer user_data) - { -+ const char *const PATH_NAME = user_data; - NMConnection *connection; - NMSettingConnection *s_con; - NMSettingTeamPort *s_team_port; - const char *expected_config = "{ \"p4p1\": { \"prio\": -10, \"sticky\": true } }"; - -- connection = _connection_from_file (TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-port", -- NULL, TYPE_ETHERNET, NULL); -+ connection = _connection_from_file (PATH_NAME, NULL, TYPE_ETHERNET, NULL); - - s_con = nm_connection_get_setting_connection (connection); - g_assert (s_con); -@@ -9048,9 +9048,11 @@ int main (int argc, char **argv) - g_test_add_func (TPATH "bridge/write-component", test_write_bridge_component); - g_test_add_func (TPATH "bridge/read-missing-stp", test_read_bridge_missing_stp); - -- g_test_add_func (TPATH "team/read-master", test_read_team_master); -+ g_test_add_data_func (TPATH "team/read-master-1", TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-master-1", test_read_team_master); -+ g_test_add_data_func (TPATH "team/read-master-2", TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-master-2", test_read_team_master); - g_test_add_func (TPATH "team/write-master", test_write_team_master); -- g_test_add_func (TPATH "team/read-port", test_read_team_port); -+ g_test_add_data_func (TPATH "team/read-port-1", TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-port-1", test_read_team_port); -+ g_test_add_data_func (TPATH "team/read-port-2", TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-port-2", test_read_team_port); - g_test_add_func (TPATH "team/write-port", test_write_team_port); - g_test_add_func (TPATH "team/read-port-empty-config", test_read_team_port_empty_config); - --- -2.7.4 - diff --git a/SOURCES/0004-proxy-crash-rh1450459.patch b/SOURCES/0004-proxy-crash-rh1450459.patch new file mode 100644 index 0000000..473cd7f --- /dev/null +++ b/SOURCES/0004-proxy-crash-rh1450459.patch @@ -0,0 +1,65 @@ +From 4bf6a4dd5b73fcea36fcfa4a97091665b233bc15 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Thu, 11 May 2017 12:09:45 +0200 +Subject: [PATCH 1/2] proxy: fix refcount handing for DestroyProxyConfiguration + operation + +Fixes: e895beb0da38fc87ce93fe7403a6b50e92f0dd82 +(cherry picked from commit df137fdf9a7077c20d8923f068568c22fb479e5a) +(cherry picked from commit 10373de9072f0318ea1150c85fd7b7ebfa5a9655) +--- + src/nm-pacrunner-manager.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/nm-pacrunner-manager.c b/src/nm-pacrunner-manager.c +index cfc028c..fd3d1f8 100644 +--- a/src/nm-pacrunner-manager.c ++++ b/src/nm-pacrunner-manager.c +@@ -250,6 +250,7 @@ pacrunner_send_done (GDBusProxy *proxy, GAsyncResult *res, gpointer user_data) + _LOG2D (config, "sent"); + + if (config->removed) { ++ config_ref (config); + g_dbus_proxy_call (priv->pacrunner, + "DestroyProxyConfiguration", + g_variant_new ("(o)", config->path), +-- +2.9.3 + + +From 617aa8fd2fccbd8a8cb76fbf9bce3e74eac78f8c Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Thu, 11 May 2017 12:32:22 +0200 +Subject: [PATCH 2/2] proxy: fix passing cancellable to async D-Bus operations + +We must not cancel pacrunner_cancellable when the D-Bus proxy is +created. Instead, keep it around and use it later for the asynchronous +D-Bus operations. + +This doesn't really matter at the moment, because the pacrunner manager +is only destroyed when NetworkManager is about to terminated. That is +the only time when we actually cancel the asynchronous request. Also, +at that time we no longer iterate the mainloop, so the pending requests +are never completed anyway. + +(cherry picked from commit a08540d967812457af192ebd34497412da5d143e) +(cherry picked from commit 6cfd9279625366c24808d86e1c3b04a18a036eb6) +--- + src/nm-pacrunner-manager.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/nm-pacrunner-manager.c b/src/nm-pacrunner-manager.c +index fd3d1f8..87e0a36 100644 +--- a/src/nm-pacrunner-manager.c ++++ b/src/nm-pacrunner-manager.c +@@ -330,7 +330,6 @@ pacrunner_proxy_cb (GObject *source, GAsyncResult *res, gpointer user_data) + priv = NM_PACRUNNER_MANAGER_GET_PRIVATE (self); + + priv->pacrunner = proxy; +- nm_clear_g_cancellable (&priv->pacrunner_cancellable); + + g_signal_connect (priv->pacrunner, "notify::g-name-owner", + G_CALLBACK (name_owner_changed_cb), self); +-- +2.9.3 + diff --git a/SOURCES/0004-wifi-set-mac-addr-workaround-rh1371623.patch b/SOURCES/0004-wifi-set-mac-addr-workaround-rh1371623.patch deleted file mode 100644 index 4acfc30..0000000 --- a/SOURCES/0004-wifi-set-mac-addr-workaround-rh1371623.patch +++ /dev/null @@ -1,326 +0,0 @@ -From c01db59a7cc5d13f2305e0d44c97e1c7af028752 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Sun, 28 Aug 2016 13:52:32 +0200 -Subject: [PATCH 1/6] platform: split processing result from do_change_link() - -(cherry picked from commit 3dc09446771a3434ed948bdd5e6ca9f6ef9a9e76) -(cherry picked from commit 471521ca84187cd32afcd20aebe5a369fe7368dc) ---- - src/platform/nm-linux-platform.c | 35 +++++++++++++++++++++++++++-------- - 1 file changed, 27 insertions(+), 8 deletions(-) - -diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c -index 98c4e46..eeb24ca 100644 ---- a/src/platform/nm-linux-platform.c -+++ b/src/platform/nm-linux-platform.c -@@ -4060,18 +4060,14 @@ out: - return !!nmp_cache_lookup_obj (priv->cache, obj_id); - } - --static NMPlatformError --do_change_link (NMPlatform *platform, -- int ifindex, -- struct nl_msg *nlmsg) -+static WaitForNlResponseResult -+do_change_link_request (NMPlatform *platform, -+ int ifindex, -+ struct nl_msg *nlmsg) - { - nm_auto_pop_netns NMPNetns *netns = NULL; - WaitForNlResponseResult seq_result = WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN; - int nle; -- char s_buf[256]; -- NMPlatformError result = NM_PLATFORM_ERROR_SUCCESS; -- NMLogLevel log_level = LOGL_DEBUG; -- const char *log_result = "failure", *log_detail = ""; - - if (!nm_platform_netns_push (platform, &netns)) - return NM_PLATFORM_ERROR_UNSPECIFIED; -@@ -4098,6 +4094,18 @@ retry: - nlmsg_hdr (nlmsg)->nlmsg_type = RTM_SETLINK; - goto retry; - } -+ return seq_result; -+} -+ -+static NMPlatformError -+do_change_link_result (NMPlatform *platform, -+ int ifindex, -+ WaitForNlResponseResult seq_result) -+{ -+ char s_buf[256]; -+ NMPlatformError result = NM_PLATFORM_ERROR_SUCCESS; -+ NMLogLevel log_level = LOGL_DEBUG; -+ const char *log_result = "failure", *log_detail = ""; - - if (seq_result == WAIT_FOR_NL_RESPONSE_RESULT_RESPONSE_OK) { - log_result = "success"; -@@ -4123,6 +4131,17 @@ retry: - return result; - } - -+static NMPlatformError -+do_change_link (NMPlatform *platform, -+ int ifindex, -+ struct nl_msg *nlmsg) -+{ -+ WaitForNlResponseResult seq_result; -+ -+ seq_result = do_change_link_request (platform, ifindex, nlmsg); -+ return do_change_link_result (platform, ifindex, seq_result); -+} -+ - static gboolean - link_add (NMPlatform *platform, - const char *name, --- -2.7.4 - - -From b2fcc8f414aefd1e6caf64e45a9ff1ba543f5b09 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Sun, 28 Aug 2016 14:08:42 +0200 -Subject: [PATCH 2/6] platform: workaround kernel wrongly returning ENFILE when - changing MAC address - -https://bugzilla.gnome.org/show_bug.cgi?id=770456 -(cherry picked from commit 2bef71611bd9fd2e333a7522205f0262ac25680f) -(cherry picked from commit 06d1679aa9867682297316e7b2cfac6fc8f67c2a) ---- - src/platform/nm-linux-platform.c | 27 ++++++++++++++++++++++++++- - 1 file changed, 26 insertions(+), 1 deletion(-) - -diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c -index eeb24ca..c36e967 100644 ---- a/src/platform/nm-linux-platform.c -+++ b/src/platform/nm-linux-platform.c -@@ -4449,6 +4449,8 @@ link_set_address (NMPlatform *platform, int ifindex, gconstpointer address, size - { - nm_auto_nlmsg struct nl_msg *nlmsg = NULL; - gs_free char *mac = NULL; -+ WaitForNlResponseResult seq_result; -+ char s_buf[256]; - - if (!address || !length) - g_return_val_if_reached (NM_PLATFORM_ERROR_BUG); -@@ -4468,7 +4470,30 @@ link_set_address (NMPlatform *platform, int ifindex, gconstpointer address, size - - NLA_PUT (nlmsg, IFLA_ADDRESS, length, address); - -- return do_change_link (platform, ifindex, nlmsg); -+ seq_result = do_change_link_request (platform, ifindex, nlmsg); -+ -+ if (NM_IN_SET (-((int) seq_result), ENFILE)) { -+ const NMPObject *obj_cache; -+ -+ /* workaround ENFILE which may be wrongly returned (bgo #770456). -+ * If the MAC address is as expected, assume success? */ -+ -+ obj_cache = nmp_cache_lookup_link (NM_LINUX_PLATFORM_GET_PRIVATE (platform)->cache, ifindex); -+ if ( obj_cache -+ && obj_cache->link.addr.len == length -+ && memcmp (obj_cache->link.addr.data, address, length) == 0) { -+ _NMLOG (LOGL_DEBUG, -+ "do-change-link[%d]: %s changing link: %s%s", -+ ifindex, -+ "success", -+ wait_for_nl_response_to_string (seq_result, s_buf, sizeof (s_buf)), -+ " (assume success changing address)"); -+ return NM_PLATFORM_ERROR_SUCCESS; -+ } -+ } -+ -+ return do_change_link_result (platform, ifindex, seq_result); -+ - nla_put_failure: - g_return_val_if_reached (NM_PLATFORM_ERROR_UNSPECIFIED); - } --- -2.7.4 - - -From aa0bc143376d7d4a50d45909a9776e161ee60b37 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Mon, 29 Aug 2016 17:14:04 +0200 -Subject: [PATCH 3/6] device: fix spelling in logging - -(cherry picked from commit d51f2c2a4e99799739e2adbeaf578144b556c4b9) -(cherry picked from commit b1f5d3d798498c53fe65257490b2df3e3f71e364) ---- - src/devices/nm-device.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c -index 199acc6..305a1bb 100644 ---- a/src/devices/nm-device.c -+++ b/src/devices/nm-device.c -@@ -11820,7 +11820,7 @@ _hw_addr_set (NMDevice *self, - operation, addr, detail); - } else { - _LOGW (LOGD_DEVICE, -- "set-hw-addr: new MAC address %s not successfully set to %s (%s)", -+ "set-hw-addr: new MAC address %s not successfully %s (%s)", - addr, operation, detail); - success = FALSE; - } --- -2.7.4 - - -From 9e3e5bbd0d0f36a117115783457caec359b763a7 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Mon, 29 Aug 2016 18:28:34 +0200 -Subject: [PATCH 4/6] device: add hack to wait after changing MAC address - -It seems some drivers return success for nm_platform_link_set_address(), -but at that point the address did not yet actually change *sigh*. -It changes a bit later, possibly after setting the device up. - -Add a workaround to retry reading the MAC address when platform indicates -success but the address still differs at first. - -https://bugzilla.gnome.org/show_bug.cgi?id=770456 -(cherry picked from commit 67b685235847ac49712d77023e23ef5c38e82a9e) -(cherry picked from commit 3b51959f48f2b40a4d85e1d36fd69a46548369cb) ---- - src/devices/nm-device.c | 28 +++++++++++++++++++++++++--- - 1 file changed, 25 insertions(+), 3 deletions(-) - -diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c -index 305a1bb..6939332 100644 ---- a/src/devices/nm-device.c -+++ b/src/devices/nm-device.c -@@ -11774,6 +11774,7 @@ _hw_addr_set (NMDevice *self, - { - NMDevicePrivate *priv; - gboolean success = FALSE; -+ gboolean needs_refresh = FALSE; - NMPlatformError plerr; - const char *cur_addr; - guint8 addr_bytes[NM_UTILS_HWADDR_LEN_MAX]; -@@ -11819,10 +11820,10 @@ _hw_addr_set (NMDevice *self, - _LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s (%s)", - operation, addr, detail); - } else { -- _LOGW (LOGD_DEVICE, -- "set-hw-addr: new MAC address %s not successfully %s (%s)", -+ _LOGD (LOGD_DEVICE, -+ "set-hw-addr: new MAC address %s not successfully %s (%s) (refresh link)", - addr, operation, detail); -- success = FALSE; -+ needs_refresh = TRUE; - } - } else { - _NMLOG (plerr == NM_PLATFORM_ERROR_NOT_FOUND ? LOGL_DEBUG : LOGL_WARN, -@@ -11836,6 +11837,27 @@ _hw_addr_set (NMDevice *self, - return FALSE; - } - -+ if (needs_refresh) { -+ /* The platform call indicated success, however the address is not -+ * as expected. May be a kernel issue and the MAC address takes -+ * a moment to change (bgo#770456). -+ * -+ * Try to reload the link and check again. */ -+ nm_platform_link_refresh (NM_PLATFORM_GET, nm_device_get_ip_ifindex (self)); -+ -+ nm_device_update_hw_address (self); -+ cur_addr = nm_device_get_hw_address (self); -+ if (cur_addr && nm_utils_hwaddr_matches (cur_addr, -1, addr, -1)) { -+ _LOGI (LOGD_DEVICE, "set-hw-addr: %s MAC address to %s (%s)", -+ operation, addr, detail); -+ } else { -+ _LOGW (LOGD_DEVICE, -+ "set-hw-addr: new MAC address %s not successfully %s (%s)", -+ addr, operation, detail); -+ return FALSE; -+ } -+ } -+ - return success; - } - --- -2.7.4 - - -From fb4ca54a6dc66ca14e5c085cdb390959ebbc861e Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Tue, 30 Aug 2016 15:05:39 +0200 -Subject: [PATCH 5/6] platform: fix build - -Fixes: 471521ca84187cd32afcd20aebe5a369fe7368dc -(cherry picked from commit 02fb3eff481f79d3caa67fdde20b2ae7aa5e640b) -(cherry picked from commit 4cf61eeafd62f7c0ac9cd71b8526577d1262e152) ---- - src/platform/nm-linux-platform.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c -index c36e967..e3ab5e6 100644 ---- a/src/platform/nm-linux-platform.c -+++ b/src/platform/nm-linux-platform.c -@@ -4070,7 +4070,7 @@ do_change_link_request (NMPlatform *platform, - int nle; - - if (!nm_platform_netns_push (platform, &netns)) -- return NM_PLATFORM_ERROR_UNSPECIFIED; -+ return seq_result; - - retry: - nle = _nl_send_auto_with_seq (platform, nlmsg, &seq_result, NULL); -@@ -4078,7 +4078,7 @@ retry: - _LOGE ("do-change-link[%d]: failure sending netlink request \"%s\" (%d)", - ifindex, - nl_geterror (nle), -nle); -- return NM_PLATFORM_ERROR_UNSPECIFIED; -+ return seq_result; - } - - /* always refetch the link after changing it. There seems to be issues --- -2.7.4 - - -From 395a0fb95d59a384dbe26cb727db5fe4212bc598 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Tue, 30 Aug 2016 16:20:40 +0200 -Subject: [PATCH 6/6] platform: fix return value for error case in - do_change_link_request() - -There is a "goto retry" in do_change_link_request(), at that point, -seq_result has the value -EOPNOTSUPP, instead of -WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN. - -Fixes: 02fb3eff481f79d3caa67fdde20b2ae7aa5e640b -(cherry picked from commit 145d199589d34f8844d8e9cafc3c2c2ea8ec4d53) -(cherry picked from commit 89d68b1a96b382f692e61b57239baae504e62d04) ---- - src/platform/nm-linux-platform.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c -index e3ab5e6..070a83e 100644 ---- a/src/platform/nm-linux-platform.c -+++ b/src/platform/nm-linux-platform.c -@@ -4070,7 +4070,7 @@ do_change_link_request (NMPlatform *platform, - int nle; - - if (!nm_platform_netns_push (platform, &netns)) -- return seq_result; -+ return WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN; - - retry: - nle = _nl_send_auto_with_seq (platform, nlmsg, &seq_result, NULL); -@@ -4078,7 +4078,7 @@ retry: - _LOGE ("do-change-link[%d]: failure sending netlink request \"%s\" (%d)", - ifindex, - nl_geterror (nle), -nle); -- return seq_result; -+ return WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN; - } - - /* always refetch the link after changing it. There seems to be issues --- -2.7.4 - diff --git a/SOURCES/0005-dbus-prop-changed-signal-source-rh1371920.patch b/SOURCES/0005-dbus-prop-changed-signal-source-rh1371920.patch deleted file mode 100644 index f7321b7..0000000 --- a/SOURCES/0005-dbus-prop-changed-signal-source-rh1371920.patch +++ /dev/null @@ -1,289 +0,0 @@ -From 55afece5d291e692d3b54caa4e070f565c16e814 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Wed, 31 Aug 2016 11:21:08 +0200 -Subject: [PATCH 1/2] exported-object: fix source interface for - PropertiesChanged D-Bus signal - -nm_exported_object_notify() hooks GObject's property-change signal -and searches for the D-Bus interface to which to send the -PropertiesChanged signal. -Then it would enqueue the value encoded as GVariant in pending_notifications. -However, thereby the association between the property that changed and the -interface was lost. So later in idle_emit_properties_changed() it would -just pick the first interface with a properties-changed-id. - -That is wrong. pending_notifications must be associated with the D-Bus -interface that we are going to notify. That is, each InterfaceData must -have its own separate list. - -This is broken since introducing NMExportedObject and moving to gdbus. -Only now it was discovered as NMDevice itself has two D-Bus interfaces: -"Device" and "Device.Statistics". - -Note that the order of the PropertiesChanged in our D-Bus API is not defined -so that later signals can reach the receiver before earlier signals. -Also, multiple change signals for one property may be combined. -That is not changed by this patch and is not considered a bug, but something -that our D-Bus API wrt. PropertiesChanged does not guarantee. - -https://bugzilla.gnome.org/show_bug.cgi?id=770629 -(cherry picked from commit 82e94390deb86eab25290e83ca0cd0e5a703fd73) -(cherry picked from commit 8d9ea18b3d4a3c76fea7a9f07cd02772cc906732) ---- - src/nm-exported-object.c | 104 ++++++++++++++++++++++++----------------------- - 1 file changed, 53 insertions(+), 51 deletions(-) - -diff --git a/src/nm-exported-object.c b/src/nm-exported-object.c -index c4dbab8..31ca3f2 100644 ---- a/src/nm-exported-object.c -+++ b/src/nm-exported-object.c -@@ -38,14 +38,13 @@ G_DEFINE_ABSTRACT_TYPE (NMExportedObject, nm_exported_object, G_TYPE_DBUS_OBJECT - typedef struct { - GDBusInterfaceSkeleton *interface; - guint property_changed_signal_id; -+ GHashTable *pending_notifies; - } InterfaceData; - - typedef struct { - NMBusManager *bus_mgr; - char *path; - -- GHashTable *pending_notifies; -- - InterfaceData *interfaces; - guint num_interfaces; - -@@ -268,8 +267,8 @@ nm_exported_object_class_add_interface (NMExportedObjectClass *object_class, - nm_exported_object_class_info_quark (), classinfo); - } - -- classinfo->skeleton_types = g_slist_prepend (classinfo->skeleton_types, -- GSIZE_TO_POINTER (dbus_skeleton_type)); -+ classinfo->skeleton_types = g_slist_append (classinfo->skeleton_types, -+ GSIZE_TO_POINTER (dbus_skeleton_type)); - - /* Ensure @dbus_skeleton_type's class_init has run, so its signals/properties - * will be defined. -@@ -492,6 +491,11 @@ nm_exported_object_create_skeletons (NMExportedObject *self, - g_dbus_object_skeleton_add_interface ((GDBusObjectSkeleton *) self, ifdata->interface); - - ifdata->property_changed_signal_id = g_signal_lookup ("properties-changed", G_OBJECT_TYPE (ifdata->interface)); -+ -+ ifdata->pending_notifies = g_hash_table_new_full (g_direct_hash, -+ g_direct_equal, -+ NULL, -+ (GDestroyNotify) g_variant_unref); - } - nm_assert (i == 0); - -@@ -542,6 +546,7 @@ nm_exported_object_destroy_skeletons (NMExportedObject *self) - - g_dbus_object_skeleton_remove_interface ((GDBusObjectSkeleton *) self, ifdata->interface); - nm_exported_object_skeleton_release (ifdata->interface); -+ g_hash_table_destroy (ifdata->pending_notifies); - } - - g_slice_free1 (sizeof (InterfaceData) * n, priv->interfaces); -@@ -701,11 +706,7 @@ nm_exported_object_unexport (NMExportedObject *self) - - g_clear_pointer (&priv->path, g_free); - -- if (nm_clear_g_source (&priv->notify_idle_id)) { -- /* We had a notification queued. Since we removed all interfaces, -- * the notification is obsolete and must be cleaned up. */ -- g_hash_table_remove_all (priv->pending_notifies); -- } -+ nm_clear_g_source (&priv->notify_idle_id); - } - - /*****************************************************************************/ -@@ -784,53 +785,60 @@ static gboolean - idle_emit_properties_changed (gpointer self) - { - NMExportedObjectPrivate *priv = NM_EXPORTED_OBJECT_GET_PRIVATE (self); -- gs_unref_variant GVariant *variant = NULL; -- InterfaceData *ifdata = NULL; -- GHashTableIter hash_iter; -- GVariantBuilder notifies; -- guint i, n; -- PendingNotifiesItem *values; -+ guint k; - - priv->notify_idle_id = 0; - -+ for (k = 0; k < priv->num_interfaces; k++) { -+ InterfaceData *ifdata = &priv->interfaces[k]; -+ gs_unref_variant GVariant *variant = NULL; -+ PendingNotifiesItem *values; -+ GVariantBuilder notifies; -+ GHashTableIter hash_iter; -+ guint i, n; -+ -+ n = g_hash_table_size (ifdata->pending_notifies); -+ if (n == 0) -+ continue; - -- n = g_hash_table_size (priv->pending_notifies); -- g_return_val_if_fail (n > 0, FALSE); -+ if (!ifdata->property_changed_signal_id) -+ goto next; - -- values = g_alloca (sizeof (values[0]) * n); -+ /* We use here alloca in a loop, something that is usually avoided. -+ * But the number of interfaces "priv->num_interfaces" is small (determined by -+ * the depth of the type inheritence) and the number of possible pending_notifies -+ * "n" is small (determined by the number of GObject properties). */ -+ values = g_alloca (sizeof (values[0]) * n); - -- i = 0; -- g_hash_table_iter_init (&hash_iter, priv->pending_notifies); -- while (g_hash_table_iter_next (&hash_iter, (gpointer) &values[i].property_name, (gpointer) &values[i].variant)) -- i++; -- nm_assert (i == n); -+ i = 0; -+ g_hash_table_iter_init (&hash_iter, ifdata->pending_notifies); -+ while (g_hash_table_iter_next (&hash_iter, (gpointer) &values[i].property_name, (gpointer) &values[i].variant)) -+ i++; -+ nm_assert (i == n); - -- g_qsort_with_data (values, n, sizeof (values[0]), _sort_pending_notifies, NULL); -+ g_qsort_with_data (values, n, sizeof (values[0]), _sort_pending_notifies, NULL); - -- g_variant_builder_init (¬ifies, G_VARIANT_TYPE_VARDICT); -- for (i = 0; i < n; i++) -- g_variant_builder_add (¬ifies, "{sv}", values[i].property_name, values[i].variant); -- variant = g_variant_ref_sink (g_variant_builder_end (¬ifies)); -+ g_variant_builder_init (¬ifies, G_VARIANT_TYPE_VARDICT); -+ for (i = 0; i < n; i++) -+ g_variant_builder_add (¬ifies, "{sv}", values[i].property_name, values[i].variant); -+ variant = g_variant_ref_sink (g_variant_builder_end (¬ifies)); - -- g_hash_table_remove_all (priv->pending_notifies); - -- for (i = 0; i < priv->num_interfaces; i++) { -- if (priv->interfaces[i].property_changed_signal_id != 0) { -- ifdata = &priv->interfaces[i]; -- break; -+ if (nm_logging_enabled (LOGL_DEBUG, LOGD_DBUS_PROPS)) { -+ gs_free char *notification = g_variant_print (variant, TRUE); -+ -+ nm_log_dbg (LOGD_DBUS_PROPS, "PropertiesChanged %s, %s, %p: %s", -+ G_OBJECT_TYPE_NAME (self), G_OBJECT_TYPE_NAME (ifdata->interface), -+ self, notification); - } -- } -- g_return_val_if_fail (ifdata, FALSE); - -- if (nm_logging_enabled (LOGL_DEBUG, LOGD_DBUS_PROPS)) { -- gs_free char *notification = g_variant_print (variant, TRUE); -+ g_signal_emit (ifdata->interface, ifdata->property_changed_signal_id, 0, variant); - -- nm_log_dbg (LOGD_DBUS_PROPS, "PropertiesChanged %s %p: %s", -- G_OBJECT_TYPE_NAME (self), self, notification); -+next: -+ g_hash_table_remove_all (ifdata->pending_notifies); - } - -- g_signal_emit (ifdata->interface, ifdata->property_changed_signal_id, 0, variant); -- return FALSE; -+ return G_SOURCE_REMOVE; - } - - static void -@@ -841,6 +849,7 @@ nm_exported_object_notify (GObject *object, GParamSpec *pspec) - GType type; - const char *dbus_property_name = NULL; - GValue value = G_VALUE_INIT; -+ InterfaceData *ifdata = NULL; - const GVariantType *vtype; - guint i, j; - -@@ -863,10 +872,10 @@ nm_exported_object_notify (GObject *object, GParamSpec *pspec) - } - - for (i = 0; i < priv->num_interfaces; i++) { -- GDBusInterfaceSkeleton *skel = priv->interfaces[i].interface; - GDBusInterfaceInfo *iinfo; - -- iinfo = g_dbus_interface_skeleton_get_info (skel); -+ ifdata = &priv->interfaces[i]; -+ iinfo = g_dbus_interface_skeleton_get_info (ifdata->interface); - for (j = 0; iinfo->properties[j]; j++) { - if (nm_streq (iinfo->properties[j]->name, dbus_property_name)) { - vtype = G_VARIANT_TYPE (iinfo->properties[j]->signature); -@@ -882,7 +891,7 @@ vtype_found: - - /* @dbus_property_name is inside classinfo and never freed, thus we don't clone it. - * Also, we do a pointer, not string comparison. */ -- g_hash_table_insert (priv->pending_notifies, -+ g_hash_table_insert (ifdata->pending_notifies, - (gpointer) dbus_property_name, - g_dbus_gvalue_to_gvariant (&value, vtype)); - g_value_unset (&value); -@@ -896,12 +905,6 @@ vtype_found: - static void - nm_exported_object_init (NMExportedObject *self) - { -- NMExportedObjectPrivate *priv = NM_EXPORTED_OBJECT_GET_PRIVATE (self); -- -- priv->pending_notifies = g_hash_table_new_full (g_direct_hash, -- g_direct_equal, -- NULL, -- (GDestroyNotify) g_variant_unref); - } - - static void -@@ -937,7 +940,6 @@ nm_exported_object_dispose (GObject *object) - } else - g_clear_pointer (&priv->path, g_free); - -- g_clear_pointer (&priv->pending_notifies, g_hash_table_destroy); - nm_clear_g_source (&priv->notify_idle_id); - - G_OBJECT_CLASS (nm_exported_object_parent_class)->dispose (object); --- -2.7.4 - - -From a7c15ef9713a25c34c244f3684df564da09af093 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Wed, 31 Aug 2016 11:33:01 +0200 -Subject: [PATCH 2/2] exported-object: cleanup logging about properties-changed - -(cherry picked from commit 46f285e3d38d64af647495d0d83efa2f9a8ea1aa) -(cherry picked from commit 4f452eedab24f9c9a0d282691ae2e600c6b6c310) ---- - src/nm-exported-object.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/src/nm-exported-object.c b/src/nm-exported-object.c -index 31ca3f2..d99a9ce 100644 ---- a/src/nm-exported-object.c -+++ b/src/nm-exported-object.c -@@ -827,9 +827,9 @@ idle_emit_properties_changed (gpointer self) - if (nm_logging_enabled (LOGL_DEBUG, LOGD_DBUS_PROPS)) { - gs_free char *notification = g_variant_print (variant, TRUE); - -- nm_log_dbg (LOGD_DBUS_PROPS, "PropertiesChanged %s, %s, %p: %s", -- G_OBJECT_TYPE_NAME (self), G_OBJECT_TYPE_NAME (ifdata->interface), -- self, notification); -+ nm_log_dbg (LOGD_DBUS_PROPS, "properties-changed[%p]: type %s, iface %s: %s", -+ self, G_OBJECT_TYPE_NAME (self), G_OBJECT_TYPE_NAME (ifdata->interface), -+ notification); - } - - g_signal_emit (ifdata->interface, ifdata->property_changed_signal_id, 0, variant); -@@ -866,8 +866,8 @@ nm_exported_object_notify (GObject *object, GParamSpec *pspec) - break; - } - if (!dbus_property_name) { -- nm_log_trace (LOGD_DBUS_PROPS, "ignoring notification for prop %s on type %s", -- pspec->name, G_OBJECT_TYPE_NAME (object)); -+ nm_log_trace (LOGD_DBUS_PROPS, "properties-changed[%p]: ignoring notification for prop %s on type %s", -+ object, pspec->name, G_OBJECT_TYPE_NAME (object)); - return; - } - --- -2.7.4 - diff --git a/SOURCES/0005-device-fix-wait-carrier-rh1450444.patch b/SOURCES/0005-device-fix-wait-carrier-rh1450444.patch new file mode 100644 index 0000000..50918dd --- /dev/null +++ b/SOURCES/0005-device-fix-wait-carrier-rh1450444.patch @@ -0,0 +1,586 @@ +From fde61a81ee3ff70c85aed230bcfda79f2fb70ea8 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Fri, 12 May 2017 16:17:18 +0200 +Subject: [PATCH 1/7] device: don't call virtual function carrier_changed() + directly + +Don't give the subclass the ability to override the parents +behavior. The parent implementation is not intended to allow +for that. Instead, restrict the flexibility of how the virtual +function integrates with the larger picture. That means, the +virtual function is only called at one place, and there is only +one implementation in NMDeviceEthernet (and it doesn't really +matter whether the implementation chains up the parent implementation +or not). + +(cherry picked from commit 5a7374d8be33086a5c00a450a472069595ba1734) +(cherry picked from commit e9aa3cc3575b8456eb712c0e06dc815940b49cbc) +--- + src/devices/nm-device-ethernet.c | 7 +++---- + src/devices/nm-device.c | 17 ++++++++++++----- + src/devices/nm-device.h | 2 +- + 3 files changed, 16 insertions(+), 10 deletions(-) + +diff --git a/src/devices/nm-device-ethernet.c b/src/devices/nm-device-ethernet.c +index 4c5aeb5..8a04d40 100644 +--- a/src/devices/nm-device-ethernet.c ++++ b/src/devices/nm-device-ethernet.c +@@ -1597,12 +1597,11 @@ get_link_speed (NMDevice *device) + } + + static void +-carrier_changed (NMDevice *device, gboolean carrier) ++carrier_changed_notify (NMDevice *device, gboolean carrier) + { + if (carrier) + get_link_speed (device); +- +- NM_DEVICE_CLASS (nm_device_ethernet_parent_class)->carrier_changed (device, carrier); ++ NM_DEVICE_CLASS (nm_device_ethernet_parent_class)->carrier_changed_notify (device, carrier); + } + + static void +@@ -1764,7 +1763,7 @@ nm_device_ethernet_class_init (NMDeviceEthernetClass *klass) + parent_class->deactivate = deactivate; + parent_class->get_s390_subchannels = get_s390_subchannels; + parent_class->update_connection = update_connection; +- parent_class->carrier_changed = carrier_changed; ++ parent_class->carrier_changed_notify = carrier_changed_notify; + parent_class->link_changed = link_changed; + parent_class->is_available = is_available; + parent_class->can_reapply_change = can_reapply_change; +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index 9c30790..652bede 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -2168,10 +2168,18 @@ nm_device_update_dynamic_ip_setup (NMDevice *self) + } + + static void ++carrier_changed_notify (NMDevice *self, gboolean carrier) ++{ ++ /* stub */ ++} ++ ++static void + carrier_changed (NMDevice *self, gboolean carrier) + { + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); + ++ NM_DEVICE_GET_CLASS (self)->carrier_changed_notify (self, carrier); ++ + if (priv->state <= NM_DEVICE_STATE_UNMANAGED) + return; + +@@ -2245,7 +2253,7 @@ link_disconnect_action_cb (gpointer user_data) + + priv->carrier_defer_id = 0; + +- NM_DEVICE_GET_CLASS (self)->carrier_changed (self, FALSE); ++ carrier_changed (self, FALSE); + + return FALSE; + } +@@ -2266,7 +2274,6 @@ void + nm_device_set_carrier (NMDevice *self, gboolean carrier) + { + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); +- NMDeviceClass *klass = NM_DEVICE_GET_CLASS (self); + NMDeviceState state = nm_device_get_state (self); + + if (priv->carrier == carrier) +@@ -2278,7 +2285,7 @@ nm_device_set_carrier (NMDevice *self, gboolean carrier) + if (priv->carrier) { + _LOGI (LOGD_DEVICE, "link connected"); + link_disconnect_action_cancel (self); +- klass->carrier_changed (self, TRUE); ++ carrier_changed (self, TRUE); + + if (nm_clear_g_source (&priv->carrier_wait_id)) { + nm_device_remove_pending_action (self, NM_PENDING_ACTION_CARRIER_WAIT, TRUE); +@@ -2287,7 +2294,7 @@ nm_device_set_carrier (NMDevice *self, gboolean carrier) + } else if ( state <= NM_DEVICE_STATE_DISCONNECTED + && !priv->queued_act_request) { + _LOGD (LOGD_DEVICE, "link disconnected"); +- klass->carrier_changed (self, FALSE); ++ carrier_changed (self, FALSE); + } else { + priv->carrier_defer_id = g_timeout_add_seconds (LINK_DISCONNECT_DELAY, + link_disconnect_action_cb, self); +@@ -14162,7 +14169,7 @@ nm_device_class_init (NMDeviceClass *klass) + klass->can_unmanaged_external_down = can_unmanaged_external_down; + klass->realize_start_notify = realize_start_notify; + klass->unrealize_notify = unrealize_notify; +- klass->carrier_changed = carrier_changed; ++ klass->carrier_changed_notify = carrier_changed_notify; + klass->get_ip_iface_identifier = get_ip_iface_identifier; + klass->unmanaged_on_quit = unmanaged_on_quit; + klass->deactivate_reset_hw_addr = deactivate_reset_hw_addr; +diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h +index be328eb..5e6abb4 100644 +--- a/src/devices/nm-device.h ++++ b/src/devices/nm-device.h +@@ -261,7 +261,7 @@ typedef struct { + gboolean (*can_unmanaged_external_down) (NMDevice *self); + + /* Carrier state (IFF_LOWER_UP) */ +- void (*carrier_changed) (NMDevice *, gboolean carrier); ++ void (*carrier_changed_notify) (NMDevice *, gboolean carrier); + + gboolean (* get_ip_iface_identifier) (NMDevice *self, NMUtilsIPv6IfaceId *out_iid); + +-- +2.9.4 + + +From 02daf0bdd66115456c6d9ccbf99909996013239d Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Fri, 12 May 2017 16:21:55 +0200 +Subject: [PATCH 2/7] device/trivial: rename functions related to "carrier" + +(cherry picked from commit a07c6255a02e098dae934ee0e6765e1ce5b927ae) +(cherry picked from commit 0ed6b5bfff4d8a915e69866d15027d26e3785271) +--- + src/devices/nm-device.c | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index 652bede..e615f32 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -2167,6 +2167,8 @@ nm_device_update_dynamic_ip_setup (NMDevice *self) + } + } + ++/*****************************************************************************/ ++ + static void + carrier_changed_notify (NMDevice *self, gboolean carrier) + { +@@ -2244,7 +2246,7 @@ carrier_changed (NMDevice *self, gboolean carrier) + #define LINK_DISCONNECT_DELAY 4 + + static gboolean +-link_disconnect_action_cb (gpointer user_data) ++carrier_disconnected_action_cb (gpointer user_data) + { + NMDevice *self = NM_DEVICE (user_data); + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); +@@ -2259,7 +2261,7 @@ link_disconnect_action_cb (gpointer user_data) + } + + static void +-link_disconnect_action_cancel (NMDevice *self) ++carrier_disconnected_action_cancel (NMDevice *self) + { + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); + +@@ -2284,7 +2286,7 @@ nm_device_set_carrier (NMDevice *self, gboolean carrier) + + if (priv->carrier) { + _LOGI (LOGD_DEVICE, "link connected"); +- link_disconnect_action_cancel (self); ++ carrier_disconnected_action_cancel (self); + carrier_changed (self, TRUE); + + if (nm_clear_g_source (&priv->carrier_wait_id)) { +@@ -2297,12 +2299,14 @@ nm_device_set_carrier (NMDevice *self, gboolean carrier) + carrier_changed (self, FALSE); + } else { + priv->carrier_defer_id = g_timeout_add_seconds (LINK_DISCONNECT_DELAY, +- link_disconnect_action_cb, self); ++ carrier_disconnected_action_cb, self); + _LOGD (LOGD_DEVICE, "link disconnected (deferring action for %d seconds) (id=%u)", + LINK_DISCONNECT_DELAY, priv->carrier_defer_id); + } + } + ++/*****************************************************************************/ ++ + static void + device_recheck_slave_status (NMDevice *self, const NMPlatformLink *plink) + { +@@ -13775,7 +13779,7 @@ dispose (GObject *object) + + nm_clear_g_source (&priv->stats.timeout_id); + +- link_disconnect_action_cancel (self); ++ carrier_disconnected_action_cancel (self); + + if (priv->ifindex > 0) { + priv->ifindex = 0; +-- +2.9.4 + + +From 5385cb00a8686c55e84f1924038ec20102939ac9 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Fri, 12 May 2017 16:22:47 +0200 +Subject: [PATCH 3/7] device: minor cleanup of + carrier_disconnected_action_cancel() + +(cherry picked from commit 6c5d883a4bd9ef167ee4fe8ec2b0187c7bc77142) +(cherry picked from commit 62f1875766a181528c36596b7bd16a78663879cc) +--- + src/devices/nm-device.c | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index e615f32..dabe87e 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -2254,9 +2254,7 @@ carrier_disconnected_action_cb (gpointer user_data) + _LOGD (LOGD_DEVICE, "link disconnected (calling deferred action) (id=%u)", priv->carrier_defer_id); + + priv->carrier_defer_id = 0; +- + carrier_changed (self, FALSE); +- + return FALSE; + } + +@@ -2264,11 +2262,11 @@ static void + carrier_disconnected_action_cancel (NMDevice *self) + { + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); ++ guint id = priv->carrier_defer_id; + +- if (priv->carrier_defer_id) { +- g_source_remove (priv->carrier_defer_id); +- _LOGD (LOGD_DEVICE, "link disconnected (canceling deferred action) (id=%u)", priv->carrier_defer_id); +- priv->carrier_defer_id = 0; ++ if (nm_clear_g_source (&priv->carrier_defer_id)) { ++ _LOGD (LOGD_DEVICE, "link disconnected (canceling deferred action) (id=%u)", ++ id); + } + } + +-- +2.9.4 + + +From 68703df31190d899d881490ce3f0742890a3f5d2 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Fri, 12 May 2017 16:48:57 +0200 +Subject: [PATCH 4/7] device: downgrade logging messages about (non) pending + action + +Adding/Removing a pending action with assert_not_yet_pending/ +assert_is_pending means that we expect that no action is taken. + +Downgrade the logging level in those cases to . + +(cherry picked from commit eaba285375248a691aaa896fecdd991ad695c1b1) +(cherry picked from commit f4600c7fa5afd960fb3657ca6d694e56f5dc5dac) +--- + src/devices/nm-device.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index dabe87e..d58c50d 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -11821,7 +11821,7 @@ nm_device_add_pending_action (NMDevice *self, const char *action, gboolean asser + count + g_slist_length (iter), action); + g_return_val_if_reached (FALSE); + } else { +- _LOGD (LOGD_DEVICE, "add_pending_action (%d): '%s' already pending (expected)", ++ _LOGT (LOGD_DEVICE, "add_pending_action (%d): '%s' already pending (expected)", + count + g_slist_length (iter), action); + } + return FALSE; +@@ -11882,7 +11882,7 @@ nm_device_remove_pending_action (NMDevice *self, const char *action, gboolean as + _LOGW (LOGD_DEVICE, "remove_pending_action (%d): '%s' not pending", count, action); + g_return_val_if_reached (FALSE); + } else +- _LOGD (LOGD_DEVICE, "remove_pending_action (%d): '%s' not pending (expected)", count, action); ++ _LOGT (LOGD_DEVICE, "remove_pending_action (%d): '%s' not pending (expected)", count, action); + + return FALSE; + } +-- +2.9.4 + + +From 8615608b36b72f8c47ae813583bad31ae7f7ec0c Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Sun, 14 May 2017 22:08:26 +0200 +Subject: [PATCH 5/7] device: rename and minor refactoring of check_carrier() + +The name should mirror what we already have: nm_device_set_carrier(). +Also, move the code closer to nm_device_set_carrier() and refactor +it a bit. + +(cherry picked from commit 7e472b4eb36347684e81e1c3a2bd7348e19eb628) +(cherry picked from commit 83c2243d800fb20a651f787b65e6c5586a6f970d) +--- + src/devices/nm-device.c | 23 ++++++++++++----------- + 1 file changed, 12 insertions(+), 11 deletions(-) + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index d58c50d..4a330d0 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -2303,6 +2303,16 @@ nm_device_set_carrier (NMDevice *self, gboolean carrier) + } + } + ++static void ++nm_device_set_carrier_from_platform (NMDevice *self) ++{ ++ if (!nm_device_has_capability (self, NM_DEVICE_CAP_NONSTANDARD_CARRIER)) { ++ nm_device_set_carrier (self, ++ nm_platform_link_is_connected (nm_device_get_platform (self), ++ nm_device_get_ip_ifindex (self))); ++ } ++} ++ + /*****************************************************************************/ + + static void +@@ -2881,15 +2891,6 @@ config_changed (NMConfig *config, + } + + static void +-check_carrier (NMDevice *self) +-{ +- int ifindex = nm_device_get_ip_ifindex (self); +- +- if (!nm_device_has_capability (self, NM_DEVICE_CAP_NONSTANDARD_CARRIER)) +- nm_device_set_carrier (self, nm_platform_link_is_connected (nm_device_get_platform (self), ifindex)); +-} +- +-static void + realize_start_notify (NMDevice *self, + const NMPlatformLink *pllink) + { +@@ -3020,7 +3021,7 @@ realize_start_setup (NMDevice *self, + } + + if (nm_device_has_capability (self, NM_DEVICE_CAP_CARRIER_DETECT)) { +- check_carrier (self); ++ nm_device_set_carrier_from_platform (self); + _LOGD (LOGD_PLATFORM, + "carrier is %s%s", + priv->carrier ? "ON" : "OFF", +@@ -10343,7 +10344,7 @@ nm_device_bring_up (NMDevice *self, gboolean block, gboolean *no_firmware) + + /* Store carrier immediately. */ + if (nm_device_has_capability (self, NM_DEVICE_CAP_CARRIER_DETECT)) +- check_carrier (self); ++ nm_device_set_carrier_from_platform (self); + + device_is_up = nm_device_is_up (self); + if (block && !device_is_up) { +-- +2.9.4 + + +From 1520c770db02577c54bf25736adba5d344378568 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Mon, 15 May 2017 11:35:41 +0200 +Subject: [PATCH 6/7] device: cleanup nm_device_set_carrier_from_platform() + +nm_device_set_carrier_from_platform() is only called from two places. + +- both check for NM_DEVICE_CAP_CARRIER_DETECT, so move that check + inside the function. +- drop the logging in realize_start_setup(). nm_device_set_carrier() already + does logging. +- always set the fake carrier in nm_device_set_carrier_from_platform(). + For the fake carrer, we anyway expect it to be already TRUE in most + case, so usually this should have no effect. + Also emit a property changed signal. That is necessary to refresh the + D-Bus property. + +(cherry picked from commit 02bb4ce7eb518bf955ed802511f1efde921bc919) +(cherry picked from commit 3786e17c0f86561e23779490ec5032b432aa7178) +--- + src/devices/nm-device.c | 32 ++++++++++++++++---------------- + 1 file changed, 16 insertions(+), 16 deletions(-) + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index 4a330d0..851e0a3 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -2306,10 +2306,20 @@ nm_device_set_carrier (NMDevice *self, gboolean carrier) + static void + nm_device_set_carrier_from_platform (NMDevice *self) + { +- if (!nm_device_has_capability (self, NM_DEVICE_CAP_NONSTANDARD_CARRIER)) { +- nm_device_set_carrier (self, +- nm_platform_link_is_connected (nm_device_get_platform (self), +- nm_device_get_ip_ifindex (self))); ++ if (nm_device_has_capability (self, NM_DEVICE_CAP_CARRIER_DETECT)) { ++ if (!nm_device_has_capability (self, NM_DEVICE_CAP_NONSTANDARD_CARRIER)) { ++ nm_device_set_carrier (self, ++ nm_platform_link_is_connected (nm_device_get_platform (self), ++ nm_device_get_ip_ifindex (self))); ++ } ++ } else { ++ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); ++ ++ /* Fake online link when carrier detection is not available. */ ++ if (!priv->carrier) { ++ priv->carrier = TRUE; ++ _notify (self, PROP_CARRIER); ++ } + } + } + +@@ -3020,16 +3030,7 @@ realize_start_setup (NMDevice *self, + self); + } + +- if (nm_device_has_capability (self, NM_DEVICE_CAP_CARRIER_DETECT)) { +- nm_device_set_carrier_from_platform (self); +- _LOGD (LOGD_PLATFORM, +- "carrier is %s%s", +- priv->carrier ? "ON" : "OFF", +- priv->ignore_carrier ? " (but ignored)" : ""); +- } else { +- /* Fake online link when carrier detection is not available. */ +- priv->carrier = TRUE; +- } ++ nm_device_set_carrier_from_platform (self); + + device_init_sriov_num_vfs (self); + +@@ -10343,8 +10344,7 @@ nm_device_bring_up (NMDevice *self, gboolean block, gboolean *no_firmware) + } + + /* Store carrier immediately. */ +- if (nm_device_has_capability (self, NM_DEVICE_CAP_CARRIER_DETECT)) +- nm_device_set_carrier_from_platform (self); ++ nm_device_set_carrier_from_platform (self); + + device_is_up = nm_device_is_up (self); + if (block && !device_is_up) { +-- +2.9.4 + + +From 15bb8709410d829c63b502ac845b93a8c95c3f15 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Fri, 12 May 2017 16:32:15 +0200 +Subject: [PATCH 7/7] device: fix delaying startup complete waiting for carrier + + platform: signal: link changed: 2: eth0 mtu ... + ... + device[0x7f90c29c64d0] (eth0): bringing up device + ... + platform: signal: link changed: 2: eth0 mtu ... + ... + device (eth0): link connected + ... + device[0x7f90c29c64d0] (eth0): add_pending_action (2): 'carrier wait' + +Note how we schedule the pending action 'carrier-wait', although the device +already has carrier. That means, the pending action will not be removed +until timeout, 5 seconds later. + +Avoid scheduling 'carrier-wait' if we already have carrier. + +However, don't just add the pending action 'carrier-wait' only during +nm_device_bring_up(). Instead, always schedule the carrier_wait timeout. +This gives a grace period during which we keep setting 'carrier-wait' whenever +we have no carrier. This should prevent two cases: + - during nm_device_bring_up() the platform state might not yet have + caught up. If we don't add the pending action there, we will add + it a moment later when carrier goes away. + - bringing the interface up might cause carrier to get lost for a + moment (flapping). If that happens within the timeout, also add the + pending action. + +(cherry picked from commit 9f874d166d260bb4b9af32cb8d12d287341a9a8b) +(cherry picked from commit 51a1fc3cd9f281f1348cf0ec1ea17d4d03ecd0b7) +--- + src/devices/nm-device.c | 47 +++++++++++++++++++++++++++++------------------ + 1 file changed, 29 insertions(+), 18 deletions(-) + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index 851e0a3..8540b4c 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -2287,19 +2287,23 @@ nm_device_set_carrier (NMDevice *self, gboolean carrier) + carrier_disconnected_action_cancel (self); + carrier_changed (self, TRUE); + +- if (nm_clear_g_source (&priv->carrier_wait_id)) { +- nm_device_remove_pending_action (self, NM_PENDING_ACTION_CARRIER_WAIT, TRUE); ++ if (priv->carrier_wait_id) { ++ nm_device_remove_pending_action (self, NM_PENDING_ACTION_CARRIER_WAIT, FALSE); + _carrier_wait_check_queued_act_request (self); + } +- } else if ( state <= NM_DEVICE_STATE_DISCONNECTED +- && !priv->queued_act_request) { +- _LOGD (LOGD_DEVICE, "link disconnected"); +- carrier_changed (self, FALSE); + } else { +- priv->carrier_defer_id = g_timeout_add_seconds (LINK_DISCONNECT_DELAY, +- carrier_disconnected_action_cb, self); +- _LOGD (LOGD_DEVICE, "link disconnected (deferring action for %d seconds) (id=%u)", +- LINK_DISCONNECT_DELAY, priv->carrier_defer_id); ++ if (priv->carrier_wait_id) ++ nm_device_add_pending_action (self, NM_PENDING_ACTION_CARRIER_WAIT, FALSE); ++ if ( state <= NM_DEVICE_STATE_DISCONNECTED ++ && !priv->queued_act_request) { ++ _LOGD (LOGD_DEVICE, "link disconnected"); ++ carrier_changed (self, FALSE); ++ } else { ++ priv->carrier_defer_id = g_timeout_add_seconds (LINK_DISCONNECT_DELAY, ++ carrier_disconnected_action_cb, self); ++ _LOGD (LOGD_DEVICE, "link disconnected (deferring action for %d seconds) (id=%u)", ++ LINK_DISCONNECT_DELAY, priv->carrier_defer_id); ++ } + } + } + +@@ -10297,12 +10301,12 @@ static gboolean + carrier_wait_timeout (gpointer user_data) + { + NMDevice *self = NM_DEVICE (user_data); ++ NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); + +- NM_DEVICE_GET_PRIVATE (self)->carrier_wait_id = 0; +- nm_device_remove_pending_action (self, NM_PENDING_ACTION_CARRIER_WAIT, TRUE); +- +- _carrier_wait_check_queued_act_request (self); +- ++ priv->carrier_wait_id = 0; ++ nm_device_remove_pending_action (self, NM_PENDING_ACTION_CARRIER_WAIT, FALSE); ++ if (!priv->carrier) ++ _carrier_wait_check_queued_act_request (self); + return G_SOURCE_REMOVE; + } + +@@ -10379,8 +10383,14 @@ nm_device_bring_up (NMDevice *self, gboolean block, gboolean *no_firmware) + * a timeout is reached. + */ + if (nm_device_has_capability (self, NM_DEVICE_CAP_CARRIER_DETECT)) { +- if (!nm_clear_g_source (&priv->carrier_wait_id)) +- nm_device_add_pending_action (self, NM_PENDING_ACTION_CARRIER_WAIT, TRUE); ++ /* we start a grace period of 5 seconds during which we will schedule ++ * a pending action whenever we have no carrier. ++ * ++ * If during that time carrier goes away, we declare the interface ++ * as not ready. */ ++ nm_clear_g_source (&priv->carrier_wait_id); ++ if (!priv->carrier) ++ nm_device_add_pending_action (self, NM_PENDING_ACTION_CARRIER_WAIT, FALSE); + priv->carrier_wait_id = g_timeout_add_seconds (5, carrier_wait_timeout, self); + } + +@@ -13793,7 +13803,8 @@ dispose (GObject *object) + + available_connections_del_all (self); + +- nm_clear_g_source (&priv->carrier_wait_id); ++ if (nm_clear_g_source (&priv->carrier_wait_id)) ++ nm_device_remove_pending_action (self, NM_PENDING_ACTION_CARRIER_WAIT, FALSE); + + _clear_queued_act_request (priv); + +-- +2.9.4 + diff --git a/SOURCES/0006-dhcp-don-t-add-route-to-DHCP4-server-rh1448987.patch b/SOURCES/0006-dhcp-don-t-add-route-to-DHCP4-server-rh1448987.patch new file mode 100644 index 0000000..d122472 --- /dev/null +++ b/SOURCES/0006-dhcp-don-t-add-route-to-DHCP4-server-rh1448987.patch @@ -0,0 +1,85 @@ +From bed605f5bd8524779b3cf3d3e02baf06a76f4054 Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Wed, 10 May 2017 16:17:48 +0200 +Subject: [PATCH] dhcp: don't add route to DHCP4 server + +This basically reverts commit 31fe84e46773 "core: Add host route for +DHCP4 server if outside assigned subnet (bgo #721767)" because the +additional route added by NM does more harm than good. + +First, the code does not consider routes pushed by the server and thus +it can add a route conflicting with the ones from the network +administrator. + +Second, there is no specification on what a DHCP client should do when +the server is not reachable via unicast, and adding arbitrary logic +into the client is likely to break things in specific cases. If +network administrators want to make the DHCP server reachable from a +client in a different subnet, they should push proper routes with the +lease. + +In any case, if the DHCP server is not reachable through unicast, +before the lease expiration (after timeout T2) the client will resort +to broadcast and so there won't be any network disruption; the renewal +will only happen at a later time. + +Fixes: 31fe84e467732463eabc8f70c2a419008e7a227c + +https://bugzilla.redhat.com/show_bug.cgi?id=1448987 +(cherry picked from commit 36e97f5d7beba7ab5446c2b7c6c22523b1bca476) +(cherry picked from commit cbf5a776f72d1895405b71f45a74cf4fe9046dae) +--- + src/dhcp/nm-dhcp-utils.c | 37 ------------------------------------- + 1 file changed, 37 deletions(-) + +diff --git a/src/dhcp/nm-dhcp-utils.c b/src/dhcp/nm-dhcp-utils.c +index e020ca3..e55a21b 100644 +--- a/src/dhcp/nm-dhcp-utils.c ++++ b/src/dhcp/nm-dhcp-utils.c +@@ -450,43 +450,6 @@ nm_dhcp_utils_ip4_config_from_options (int ifindex, + } + } + +- /* +- * RFC 2132, section 9.7 +- * DHCP clients use the contents of the 'server identifier' field +- * as the destination address for any DHCP messages unicast to +- * the DHCP server. +- * +- * Some ISP's provide leases from central servers that are on +- * different subnets that the address offered. If the host +- * does not configure the interface as the default route, the +- * dhcp server may not be reachable via unicast, and a host +- * specific route is needed. +- **/ +- str = g_hash_table_lookup (options, "dhcp_server_identifier"); +- if (str) { +- if (inet_pton (AF_INET, str, &tmp_addr) > 0) { +- +- _LOG2I (LOGD_DHCP4, iface, " server identifier %s", str); +- if ( nm_utils_ip4_address_clear_host_address(tmp_addr, address.plen) != nm_utils_ip4_address_clear_host_address(address.address, address.plen) +- && !nm_ip4_config_get_direct_route_for_host (ip4_config, tmp_addr)) { +- /* DHCP server not on assigned subnet and the no direct route was returned. Add route */ +- NMPlatformIP4Route route = { 0 }; +- +- route.network = tmp_addr; +- route.plen = 32; +- /* this will be a device route if gwaddr is 0 */ +- route.gateway = gwaddr; +- route.rt_source = NM_IP_CONFIG_SOURCE_DHCP; +- route.metric = priority; +- nm_ip4_config_add_route (ip4_config, &route); +- _LOG2D (LOGD_IP, iface, "adding route for server identifier: %s", +- nm_platform_ip4_route_to_string (&route, NULL, 0)); +- } +- } +- else +- _LOG2W (LOGD_DHCP4, iface, "ignoring invalid server identifier '%s'", str); +- } +- + str = g_hash_table_lookup (options, "dhcp_lease_time"); + if (str) { + address.lifetime = address.preferred = strtoul (str, NULL, 10); +-- +2.9.3 + diff --git a/SOURCES/0006-team-validate-json-config.patch b/SOURCES/0006-team-validate-json-config.patch deleted file mode 100644 index d9e00f9..0000000 --- a/SOURCES/0006-team-validate-json-config.patch +++ /dev/null @@ -1,416 +0,0 @@ -From 91ed0449e96051cde51625c8cacecfd5760abd31 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Tue, 30 Aug 2016 15:22:04 +0200 -Subject: [PATCH 1/3] Revert "libnm-core/team: normalize invalid config to - NULL" - -It's better to fail the validation of any invalid configuration -instead of silently ignoring it. - -This reverts commit 476810c29016d569ac3885542a6c91e7af8a7f6d. - -(cherry picked from commit 39ad134b0ca1918084b2b1fc5856cc0b7a6becfc) -(cherry picked from commit 4f5059306be98748d2bede9cb5f011e889c81805) ---- - libnm-core/nm-connection.c | 5 ++--- - libnm-core/nm-setting-team-port.c | 12 ++---------- - libnm-core/nm-setting-team.c | 12 ++---------- - 3 files changed, 6 insertions(+), 23 deletions(-) - -diff --git a/libnm-core/nm-connection.c b/libnm-core/nm-connection.c -index f39d41c..57f9640 100644 ---- a/libnm-core/nm-connection.c -+++ b/libnm-core/nm-connection.c -@@ -28,7 +28,6 @@ - #include "nm-connection.h" - #include "nm-connection-private.h" - #include "nm-utils.h" --#include "nm-utils-private.h" - #include "nm-setting-private.h" - #include "nm-core-internal.h" - -@@ -916,7 +915,7 @@ _normalize_team_config (NMConnection *self, GHashTable *parameters) - if (s_team) { - const char *config = nm_setting_team_get_config (s_team); - -- if (config && !_nm_utils_check_valid_json (config, NULL)) { -+ if (config && !*config) { - g_object_set (s_team, NM_SETTING_TEAM_CONFIG, NULL, NULL); - return TRUE; - } -@@ -932,7 +931,7 @@ _normalize_team_port_config (NMConnection *self, GHashTable *parameters) - if (s_team_port) { - const char *config = nm_setting_team_port_get_config (s_team_port); - -- if (config && !_nm_utils_check_valid_json (config, NULL)) { -+ if (config && !*config) { - g_object_set (s_team_port, NM_SETTING_TEAM_PORT_CONFIG, NULL, NULL); - return TRUE; - } -diff --git a/libnm-core/nm-setting-team-port.c b/libnm-core/nm-setting-team-port.c -index 0d175d5..123304f 100644 ---- a/libnm-core/nm-setting-team-port.c -+++ b/libnm-core/nm-setting-team-port.c -@@ -122,19 +122,11 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) - "%s.%s: ", - NM_SETTING_TEAM_PORT_SETTING_NAME, - NM_SETTING_TEAM_PORT_CONFIG); -- /* for backward compatibility, we accept invalid json and normalize it */ -- if (!priv->config[0]) { -- /* be more forgiving to "" and let it verify() as valid because -- * at least anaconda used to write such configs */ -- return NM_SETTING_VERIFY_NORMALIZABLE; -- } -- return NM_SETTING_VERIFY_NORMALIZABLE_ERROR; -+ /* We treat an empty string as no config for compatibility. */ -+ return *priv->config ? FALSE : NM_SETTING_VERIFY_NORMALIZABLE; - } - } - -- /* NOTE: normalizable/normalizable-errors must appear at the end with decreasing severity. -- * Take care to properly order statements with priv->config above. */ -- - return TRUE; - } - -diff --git a/libnm-core/nm-setting-team.c b/libnm-core/nm-setting-team.c -index a559e0d..df89694 100644 ---- a/libnm-core/nm-setting-team.c -+++ b/libnm-core/nm-setting-team.c -@@ -94,19 +94,11 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) - "%s.%s: ", - NM_SETTING_TEAM_SETTING_NAME, - NM_SETTING_TEAM_CONFIG); -- /* for backward compatibility, we accept invalid json and normalize it */ -- if (!priv->config[0]) { -- /* be more forgiving to "" and let it verify() as valid because -- * at least anaconda used to write such configs */ -- return NM_SETTING_VERIFY_NORMALIZABLE; -- } -- return NM_SETTING_VERIFY_NORMALIZABLE_ERROR; -+ /* We treat an empty string as no config for compatibility. */ -+ return *priv->config ? FALSE : NM_SETTING_VERIFY_NORMALIZABLE; - } - } - -- /* NOTE: normalizable/normalizable-errors must appear at the end with decreasing severity. -- * Take care to properly order statements with priv->config above. */ -- - return TRUE; - } - --- -2.5.5 - -From f1e9f50ebe20b32a3f5903b6b07c437c23bd5ac1 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Tue, 30 Aug 2016 15:21:16 +0200 -Subject: [PATCH 2/3] team: normalize invalid configuration during load - -Now that we validate the JSON syntax of a team/team-port -configuration, any existing connection with invalid JSON configuration -would fail to load and disappear upon upgrade. Instead, modify the -setting plugins to emit a warning but still load the connection with -empty configuration. - -(cherry picked from commit d6ec009afd7dadf925d5bb8e5dd855c493dd0104) -(cherry picked from commit 67f064f11ba3858ea9429f0989b81feeaaa9d8bb) ---- - libnm-core/nm-core-internal.h | 5 +++ - libnm-core/nm-keyfile-reader.c | 26 ++++++++++++ - libnm-core/nm-utils-private.h | 3 -- - libnm-core/tests/test-keyfile.c | 49 ++++++++++++++++++++++ - src/settings/plugins/ifcfg-rh/reader.c | 7 ++++ - .../ifcfg-rh/tests/network-scripts/Makefile.am | 1 + - .../network-scripts/ifcfg-test-team-master-invalid | 4 ++ - .../plugins/ifcfg-rh/tests/test-ifcfg-rh.c | 26 ++++++++++++ - 8 files changed, 118 insertions(+), 3 deletions(-) - create mode 100644 src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master-invalid - -diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h -index 94e473d..e491bce 100644 ---- a/libnm-core/nm-core-internal.h -+++ b/libnm-core/nm-core-internal.h -@@ -326,4 +326,9 @@ gboolean _nm_setting_bond_option_supported (const char *option, NMBondMode mode) - - gboolean _nm_utils_inet6_is_token (const struct in6_addr *in6addr); - -+/***********************************************************/ -+ -+gboolean _nm_utils_check_valid_json (const char *json, GError **error); -+gboolean _nm_utils_team_config_equal (const char *conf1, const char *conf2, gboolean port); -+ - #endif -diff --git a/libnm-core/nm-keyfile-reader.c b/libnm-core/nm-keyfile-reader.c -index 54a694e..16f0c22 100644 ---- a/libnm-core/nm-keyfile-reader.c -+++ b/libnm-core/nm-keyfile-reader.c -@@ -1167,6 +1167,24 @@ parity_parser (KeyfileReaderInfo *info, NMSetting *setting, const char *key) - g_object_set (setting, key, parity, NULL); - } - -+static void -+team_config_parser (KeyfileReaderInfo *info, NMSetting *setting, const char *key) -+{ -+ const char *setting_name = nm_setting_get_name (setting); -+ gs_free char *conf = NULL; -+ gs_free_error GError *error = NULL; -+ -+ conf = nm_keyfile_plugin_kf_get_string (info->keyfile, setting_name, key, NULL); -+ if (conf && conf[0] && !_nm_utils_check_valid_json (conf, &error)) { -+ handle_warn (info, key, NM_KEYFILE_WARN_SEVERITY_WARN, -+ _("ignoring invalid team configuration: %s"), -+ error->message); -+ g_clear_pointer (&conf, g_free); -+ } -+ -+ g_object_set (G_OBJECT (setting), key, conf, NULL); -+} -+ - typedef struct { - const char *setting_name; - const char *key; -@@ -1285,6 +1303,14 @@ static KeyParser key_parsers[] = { - NM_SETTING_SERIAL_PARITY, - TRUE, - parity_parser }, -+ { NM_SETTING_TEAM_SETTING_NAME, -+ NM_SETTING_TEAM_CONFIG, -+ TRUE, -+ team_config_parser }, -+ { NM_SETTING_TEAM_PORT_SETTING_NAME, -+ NM_SETTING_TEAM_CONFIG, -+ TRUE, -+ team_config_parser }, - { NULL, NULL, FALSE } - }; - -diff --git a/libnm-core/nm-utils-private.h b/libnm-core/nm-utils-private.h -index bd54756..fab3803 100644 ---- a/libnm-core/nm-utils-private.h -+++ b/libnm-core/nm-utils-private.h -@@ -31,9 +31,6 @@ - gboolean _nm_utils_string_slist_validate (GSList *list, - const char **valid_values); - --gboolean _nm_utils_check_valid_json (const char *json, GError **error); --gboolean _nm_utils_team_config_equal (const char *conf1, const char *conf2, gboolean port); -- - /* D-Bus transform funcs */ - - GVariant *_nm_utils_hwaddr_cloned_get (NMSetting *setting, -diff --git a/libnm-core/tests/test-keyfile.c b/libnm-core/tests/test-keyfile.c -index ecb7cd5..4ec6b80 100644 ---- a/libnm-core/tests/test-keyfile.c -+++ b/libnm-core/tests/test-keyfile.c -@@ -27,6 +27,7 @@ - #include "nm-setting-connection.h" - #include "nm-setting-wired.h" - #include "nm-setting-8021x.h" -+#include "nm-setting-team.h" - - #include "nm-utils/nm-test-utils.h" - -@@ -518,6 +519,52 @@ test_8021x_cert_read (void) - CLEAR (&con, &keyfile); - } - -+static void -+test_team_conf_read_valid (void) -+{ -+ GKeyFile *keyfile = NULL; -+ gs_unref_object NMConnection *con = NULL; -+ NMSettingTeam *s_team; -+ -+ con = nmtst_create_connection_from_keyfile ( -+ "[connection]\n" -+ "type=team\n" -+ "interface-name=nm-team1\n" -+ "[team]\n" -+ "config={\"foo\":\"bar\"}", -+ "/test_team_conf_read/valid", NULL); -+ -+ g_assert (con); -+ s_team = nm_connection_get_setting_team (con); -+ g_assert (s_team); -+ g_assert_cmpstr (nm_setting_team_get_config (s_team), ==, "{\"foo\":\"bar\"}"); -+ -+ CLEAR (&con, &keyfile); -+} -+ -+static void -+test_team_conf_read_invalid (void) -+{ -+ GKeyFile *keyfile = NULL; -+ gs_unref_object NMConnection *con = NULL; -+ NMSettingTeam *s_team; -+ -+ con = nmtst_create_connection_from_keyfile ( -+ "[connection]\n" -+ "type=team\n" -+ "interface-name=nm-team1\n" -+ "[team]\n" -+ "config={foobar}", -+ "/test_team_conf_read/invalid", NULL); -+ -+ g_assert (con); -+ s_team = nm_connection_get_setting_team (con); -+ g_assert (s_team); -+ g_assert (nm_setting_team_get_config (s_team) == NULL); -+ -+ CLEAR (&con, &keyfile); -+} -+ - /******************************************************************************/ - - NMTST_DEFINE (); -@@ -528,6 +575,8 @@ int main (int argc, char **argv) - - g_test_add_func ("/core/keyfile/test_8021x_cert", test_8021x_cert); - g_test_add_func ("/core/keyfile/test_8021x_cert_read", test_8021x_cert_read); -+ g_test_add_func ("/core/keyfile/test_team_conf_read/valid", test_team_conf_read_valid); -+ g_test_add_func ("/core/keyfile/test_team_conf_read/invalid", test_team_conf_read_invalid); - - return g_test_run (); - } -diff --git a/src/settings/plugins/ifcfg-rh/reader.c b/src/settings/plugins/ifcfg-rh/reader.c -index d1ea597..afc9238 100644 ---- a/src/settings/plugins/ifcfg-rh/reader.c -+++ b/src/settings/plugins/ifcfg-rh/reader.c -@@ -4238,6 +4238,7 @@ bond_connection_from_ifcfg (const char *file, - static char * - read_team_config (shvarFile *ifcfg, const char *key, GError **error) - { -+ gs_free_error GError *local_error = NULL; - char *value; - size_t l; - -@@ -4258,6 +4259,12 @@ read_team_config (shvarFile *ifcfg, const char *key, GError **error) - return NULL; - } - svUnescape (value); -+ -+ if (value && value[0] && !_nm_utils_check_valid_json (value, &local_error)) { -+ PARSE_WARNING ("ignoring invalid team configuration: %s", local_error->message); -+ g_clear_pointer (&value, g_free); -+ } -+ - return value; - } - -diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am b/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am -index 7531ec0..de9c1ed 100644 ---- a/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am -+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am -@@ -134,6 +134,7 @@ EXTRA_DIST = \ - ifcfg-test-fcoe-vn2vn \ - ifcfg-test-team-master-1 \ - ifcfg-test-team-master-2 \ -+ ifcfg-test-team-master-invalid \ - ifcfg-test-team-port-1 \ - ifcfg-test-team-port-2 \ - ifcfg-test-team-port-empty-config \ -diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master-invalid b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master-invalid -new file mode 100644 -index 0000000..4534882 ---- /dev/null -+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master-invalid -@@ -0,0 +1,4 @@ -+DEVICE=team0 -+ONBOOT=no -+BOOTPROTO=dhcp -+TEAM_CONFIG="{ foobar }" -diff --git a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c -index 3e3f7ca..9ed48be 100644 ---- a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c -+++ b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c -@@ -8454,6 +8454,31 @@ test_read_team_master (gconstpointer user_data) - } - - static void -+test_read_team_master_invalid (gconstpointer user_data) -+{ -+ const char *const PATH_NAME = user_data; -+ NMConnection *connection; -+ NMSettingConnection *s_con; -+ NMSettingTeam *s_team; -+ -+ g_test_expect_message ("NetworkManager", G_LOG_LEVEL_MESSAGE, "*ignoring invalid team configuration*"); -+ connection = _connection_from_file (PATH_NAME, NULL, TYPE_ETHERNET, NULL); -+ g_test_assert_expected_messages (); -+ -+ g_assert_cmpstr (nm_connection_get_interface_name (connection), ==, "team0"); -+ -+ s_con = nm_connection_get_setting_connection (connection); -+ g_assert (s_con); -+ g_assert_cmpstr (nm_setting_connection_get_connection_type (s_con), ==, NM_SETTING_TEAM_SETTING_NAME); -+ -+ s_team = nm_connection_get_setting_team (connection); -+ g_assert (s_team); -+ g_assert (nm_setting_team_get_config (s_team) == NULL); -+ -+ g_object_unref (connection); -+} -+ -+static void - test_write_team_master (void) - { - NMConnection *connection, *reread; -@@ -9050,6 +9075,7 @@ int main (int argc, char **argv) - - g_test_add_data_func (TPATH "team/read-master-1", TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-master-1", test_read_team_master); - g_test_add_data_func (TPATH "team/read-master-2", TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-master-2", test_read_team_master); -+ g_test_add_data_func (TPATH "team/read-master-invalid", TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-master-invalid", test_read_team_master_invalid); - g_test_add_func (TPATH "team/write-master", test_write_team_master); - g_test_add_data_func (TPATH "team/read-port-1", TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-port-1", test_read_team_port); - g_test_add_data_func (TPATH "team/read-port-2", TEST_IFCFG_DIR"/network-scripts/ifcfg-test-team-port-2", test_read_team_port); --- -2.5.5 - -From 875d750a9329e4478f3dec107d77041d51a12742 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Tue, 30 Aug 2016 16:37:54 +0200 -Subject: [PATCH 3/3] libnm: restore verify() comments in team/team-port - settings - -Restore the comments removed in commit -a524091966afb884cdb8db48067d5599a685a8eb. - -(cherry picked from commit d06279f3db794f5c7177d85b4dd5e732d6a90364) -(cherry picked from commit bf422e972abe9c14b385401ad72b01f3fcef8d40) ---- - libnm-core/nm-setting-team-port.c | 3 +++ - libnm-core/nm-setting-team.c | 3 +++ - 2 files changed, 6 insertions(+) - -diff --git a/libnm-core/nm-setting-team-port.c b/libnm-core/nm-setting-team-port.c -index 123304f..e3ddbda 100644 ---- a/libnm-core/nm-setting-team-port.c -+++ b/libnm-core/nm-setting-team-port.c -@@ -127,6 +127,9 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) - } - } - -+ /* NOTE: normalizable/normalizable-errors must appear at the end with decreasing severity. -+ * Take care to properly order statements with priv->config above. */ -+ - return TRUE; - } - -diff --git a/libnm-core/nm-setting-team.c b/libnm-core/nm-setting-team.c -index df89694..5bf11ed 100644 ---- a/libnm-core/nm-setting-team.c -+++ b/libnm-core/nm-setting-team.c -@@ -99,6 +99,9 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) - } - } - -+ /* NOTE: normalizable/normalizable-errors must appear at the end with decreasing severity. -+ * Take care to properly order statements with priv->config above. */ -+ - return TRUE; - } - --- -2.5.5 - diff --git a/SOURCES/0007-device-set-fw-zone-assumed-connections.patch b/SOURCES/0007-device-set-fw-zone-assumed-connections.patch deleted file mode 100644 index 3f70911..0000000 --- a/SOURCES/0007-device-set-fw-zone-assumed-connections.patch +++ /dev/null @@ -1,77 +0,0 @@ -From fe2c4e618bda3b012688d69d3174aea43a86e69a Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Tue, 23 Aug 2016 16:44:28 +0200 -Subject: [PATCH] device: manage firewall zone for assumed persistent - connections - -After the fix in [1], if the connection is assumed we don't update its -firewall zone. The goal of that change was to prevent NM from -interfering with the configuration done externally on devices not -created by NM. - -However if there is an assumed persistent connection active on the -device NM touches the configuration in other ways, for example it -configures DHCP and manages the default route. So it seems correct to -also update the firewall zone. - -OTOH, if the connection is assumed-generated there is no persistent -connection specifying a firewall zone and updating it makes no sense. - -Bug [1] was about not interfering with devices unknown to NM (for -which there is no persistent connection) and so this change should not -conflict with the previous fix. - -[1] https://bugzilla.redhat.com/show_bug.cgi?id=1098281 - -https://bugzilla.redhat.com/show_bug.cgi?id=1366288 -(cherry picked from commit c39e03edbf8d2ce4dd49504229487d0a714e4b17) -(cherry picked from commit 9740a5903522cc2ccbab335be5480caa669b34de) ---- - src/devices/nm-device.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c -index 6939332..325cb08 100644 ---- a/src/devices/nm-device.c -+++ b/src/devices/nm-device.c -@@ -7005,7 +7005,7 @@ nm_device_activate_schedule_stage3_ip_config_start (NMDevice *self) - s_con = nm_connection_get_setting_connection (connection); - - if (!priv->fw_ready) { -- if (nm_device_uses_assumed_connection (self)) -+ if (nm_device_uses_generated_assumed_connection (self)) - priv->fw_ready = TRUE; - else { - if (!priv->fw_call) { -@@ -10181,8 +10181,8 @@ nm_device_update_firewall_zone (NMDevice *self) - return; - - s_con = nm_connection_get_setting_connection (applied_connection); -- if ( nm_device_get_state (self) == NM_DEVICE_STATE_ACTIVATED -- && !nm_device_uses_assumed_connection (self)) { -+ if ( nm_device_get_state (self) == NM_DEVICE_STATE_ACTIVATED -+ && !nm_device_uses_generated_assumed_connection (self)) { - nm_firewall_manager_add_or_change_zone (nm_firewall_manager_get (), - nm_device_get_ip_iface (self), - nm_setting_connection_get_zone (s_con), -@@ -10673,7 +10673,7 @@ _cleanup_generic_pre (NMDevice *self, CleanupType cleanup_type) - connection = nm_device_get_applied_connection (self); - if ( cleanup_type == CLEANUP_TYPE_DECONFIGURE - && connection -- && !nm_device_uses_assumed_connection (self)) { -+ && !nm_device_uses_generated_assumed_connection (self)) { - nm_firewall_manager_remove_from_zone (nm_firewall_manager_get (), - nm_device_get_ip_iface (self), - NULL, -@@ -11374,7 +11374,7 @@ _set_state_full (NMDevice *self, - - if ( applied_connection - && priv->ifindex != priv->ip_ifindex -- && !nm_device_uses_assumed_connection (self)) { -+ && !nm_device_uses_generated_assumed_connection (self)) { - NMSettingConnection *s_con; - const char *zone; - --- -2.5.5 - diff --git a/SOURCES/0007-device-update-ext-conf-before-commit-rh1449873.patch b/SOURCES/0007-device-update-ext-conf-before-commit-rh1449873.patch new file mode 100644 index 0000000..a379892 --- /dev/null +++ b/SOURCES/0007-device-update-ext-conf-before-commit-rh1449873.patch @@ -0,0 +1,165 @@ +From b870115d83ddb2f7091e7b5e1f65b64261c53557 Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Fri, 12 May 2017 12:00:20 +0200 +Subject: [PATCH 1/2] device: update external configuration before commit + +If the platform signaled that the external configuration changed (and +thus update_ipX_config() is scheduled) and we are doing a commit of +the new configuration, update priv->ext_ipX_config. Without this, the +commit will remove addresses added externally but not yet captured in +the external configuration. + +https://bugzilla.redhat.com/show_bug.cgi?id=1449873 +(cherry picked from commit a21b8882cc9defc43248afc94bf59ca0f84f0d27) +(cherry picked from commit bf5407992f54440b586e1d0b3792f93eb2c464f3) +--- + src/devices/nm-device.c | 21 +++++++++++++++++++-- + 1 file changed, 19 insertions(+), 2 deletions(-) + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index 8540b4c..87cd296 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -5487,8 +5487,15 @@ ip4_config_merge_and_apply (NMDevice *self, + composite = nm_ip4_config_new (nm_device_get_ip_ifindex (self)); + init_ip4_config_dns_priority (self, composite); + +- if (commit) ++ if (commit) { + ensure_con_ip4_config (self); ++ if (priv->queued_ip4_config_id) { ++ g_clear_object (&priv->ext_ip4_config); ++ priv->ext_ip4_config = nm_ip4_config_capture (nm_device_get_platform (self), ++ nm_device_get_ifindex (self), ++ FALSE); ++ } ++ } + + if (priv->dev_ip4_config) { + nm_ip4_config_merge (composite, priv->dev_ip4_config, +@@ -6223,8 +6230,18 @@ ip6_config_merge_and_apply (NMDevice *self, + NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN); + init_ip6_config_dns_priority (self, composite); + +- if (commit) ++ if (commit) { + ensure_con_ip6_config (self); ++ if (priv->queued_ip6_config_id) { ++ g_clear_object (&priv->ext_ip6_config); ++ g_clear_object (&priv->ext_ip6_config_captured); ++ priv->ext_ip6_config_captured = nm_ip6_config_capture (nm_device_get_platform (self), ++ nm_device_get_ifindex (self), ++ FALSE, ++ NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN); ++ priv->ext_ip6_config = nm_ip6_config_new_cloned (priv->ext_ip6_config_captured); ++ } ++ } + + /* Merge all the IP configs into the composite config */ + if (priv->ac_ip6_config) { +-- +2.9.3 + +From 2d0d1643e59f4ac935e2288a02da8774b6b237dc Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Wed, 17 May 2017 09:46:22 +0200 +Subject: [PATCH 2/2] device: fix crash in ip6_config_merge_and_apply() + +nm_ip6_config_capture() returns NULL for slaves. Fixes the following: + + nm_ip6_config_new_cloned: assertion 'NM_IS_IP6_CONFIG (src)' failed + + #0 g_logv () at /lib64/libglib-2.0.so.0 + #1 g_log () at /lib64/libglib-2.0.so.0 + #2 nm_ip6_config_new_cloned (src=0x0) at src/nm-ip6-config.c:2272 + #3 ip6_config_merge_and_apply (self=self@entry=0x200d8f0, commit=commit@entry=1) at src/devices/nm-device.c:6192 + #4 nm_device_bring_up (self=self@entry=0x200d8f0, block=block@entry=1, no_firmware=no_firmware@entry=0x0) at src/devices/nm-device.c:10369 + #5 _hw_addr_set (self=self@entry=0x200d8f0, addr=addr@entry=0x2095ea0 "6A:1C:00:2A:68:7C", operation=operation@entry=0x64f8ba "set", detail=detail@entry=0x67369d "restore") at src/devices/nm-device.c:13225 + #6 nm_device_hw_addr_set (self=self@entry=0x200d8f0, addr=addr@entry=0x2095ea0 "6A:1C:00:2A:68:7C", detail=detail@entry=0x67369d "restore", set_permanent=set_permanent@entry=0) at src/devices/nm-device.c:13255 + #7 release_slave (device=0x200d8f0, slave=0x1ef2990, configure=) at src/devices/nm-device-bond.c:463 + #8 nm_device_master_release_one_slave (self=self@entry=0x200d8f0, slave=slave@entry=0x1ef2990, configure=1, reason=reason@entry=NM_DEVICE_STATE_REASON_CONNECTION_REMOVED) at src/devices/nm-device.c:2041 + #9 slave_state_changed (slave=0x1ef2990, slave_new_state=NM_DEVICE_STATE_DEACTIVATING, slave_old_state=NM_DEVICE_STATE_ACTIVATED, reason=NM_DEVICE_STATE_REASON_CONNECTION_REMOVED, self=0x200d8f0) + at src/devices/nm-device.c:3366 + ... + +Fixes: a21b8882cc9defc43248afc94bf59ca0f84f0d27 +(cherry picked from commit 1e78f50b8e5e24d13547b478165170117c1ac8ae) +(cherry picked from commit bf28e0845fa38cdd3556fb61a7e725ac42a7d50a) +--- + src/devices/nm-device.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index 87cd296..b14dc49 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -6239,7 +6239,8 @@ ip6_config_merge_and_apply (NMDevice *self, + nm_device_get_ifindex (self), + FALSE, + NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN); +- priv->ext_ip6_config = nm_ip6_config_new_cloned (priv->ext_ip6_config_captured); ++ if (priv->ext_ip6_config_captured) ++ priv->ext_ip6_config = nm_ip6_config_new_cloned (priv->ext_ip6_config_captured); + } + } + +-- +2.9.3 + +From 8a7f6f2cd2c210a29daae39b1d0b0923d78d3ed0 Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Sun, 21 May 2017 15:47:33 +0200 +Subject: [PATCH] device: fix capture of device config in + ipX_config_merge_and_apply() + +Use nm_device_get_ip_ifindex() to obtain the right ifindex for the +device. Fixes the following: + + nm_platform_ip4_address_get_all: assertion 'ifindex > 0' failed + #0 _g_log_abort () from target:/lib64/libglib-2.0.so.0 + #1 g_logv () from target:/lib64/libglib-2.0.so.0 + #2 g_log () from target:/lib64/libglib-2.0.so.0 + #3 nm_platform_ip4_address_get_all (self=self@entry=0x1181020, ifindex=ifindex@entry=0) at src/platform/nm-platform.c:2640 + #4 nm_ip4_config_capture (platform=0x1181020, ifindex=ifindex@entry=0, capture_resolv_conf=capture_resolv_conf@entry=0) at src/nm-ip4-config.c:271 + #5 ip4_config_merge_and_apply (self=self@entry=0x1254a70, config=config@entry=0x0, commit=commit@entry=1) at src/devices/nm-device.c:5447 + #6 activate_stage5_ip4_config_commit (self=0x1254a70) at src/devices/nm-device.c:8299 + #7 activation_source_handle_cb (self=0x1254a70, family=family@entry=2) at src/devices/nm-device.c:4421 + #8 activation_source_handle_cb4 (user_data=) at src/devices/nm-device.c:4358 + #9 g_idle_dispatch () from target:/lib64/libglib-2.0.so.0 + #10 g_main_context_dispatch () from target:/lib64/libglib-2.0.so.0 + #11 g_main_context_iterate.isra () from target:/lib64/libglib-2.0.so.0 + #12 g_main_loop_run () from target:/lib64/libglib-2.0.so.0 + #13 main (argc=, argv=) at src/main.c:435 + +Fixes: a21b8882cc9defc43248afc94bf59ca0f84f0d27 +(cherry picked from commit 6389d637a7e8d20e037e4bd9cea917dfc372ef17) +(cherry picked from commit 4b6955095b4d857bccb265c22c22b2da2f382d45) +--- + src/devices/nm-device.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index e61bde3..be37116 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -5492,7 +5492,7 @@ ip4_config_merge_and_apply (NMDevice *self, + if (priv->queued_ip4_config_id) { + g_clear_object (&priv->ext_ip4_config); + priv->ext_ip4_config = nm_ip4_config_capture (nm_device_get_platform (self), +- nm_device_get_ifindex (self), ++ nm_device_get_ip_ifindex (self), + FALSE); + } + } +@@ -6236,7 +6236,7 @@ ip6_config_merge_and_apply (NMDevice *self, + g_clear_object (&priv->ext_ip6_config); + g_clear_object (&priv->ext_ip6_config_captured); + priv->ext_ip6_config_captured = nm_ip6_config_capture (nm_device_get_platform (self), +- nm_device_get_ifindex (self), ++ nm_device_get_ip_ifindex (self), + FALSE, + NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN); + if (priv->ext_ip6_config_captured) +-- +2.9.3 + diff --git a/SOURCES/0008-device-avoid-unenslave-on-external-down-rh1357738.patch b/SOURCES/0008-device-avoid-unenslave-on-external-down-rh1357738.patch deleted file mode 100644 index a7b4d0c..0000000 --- a/SOURCES/0008-device-avoid-unenslave-on-external-down-rh1357738.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 7e96eb5e667d73b3a92e3cbafbe005ddeb4895a3 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Tue, 30 Aug 2016 19:17:46 +0200 -Subject: [PATCH] device: don't let external changes cause a release of the - slave - -At this point we don't know if the slave has been using an assumed -connection that just vanished -- the best bet is to let the device be. - -If it's meant to be unenslaved, it won't be due to an external event. - -https://bugzilla.redhat.com/show_bug.cgi?id=1357738 -(cherry picked from commit 3127fb0d17bff0b250218c7bf82b4335b5290825) ---- - src/devices/nm-device.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c -index 1523018..693058e 100644 ---- a/src/devices/nm-device.c -+++ b/src/devices/nm-device.c -@@ -2628,6 +2628,7 @@ slave_state_changed (NMDevice *slave, - { - NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); - gboolean release = FALSE; -+ gboolean configure = TRUE; - - _LOGD (LOGD_DEVICE, "slave %s state change %d (%s) -> %d (%s)", - nm_device_get_iface (slave), -@@ -2650,8 +2651,12 @@ slave_state_changed (NMDevice *slave, - release = TRUE; - } - -+ /* Don't touch the device if its state changed externally. */ -+ if (reason == NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED) -+ configure = FALSE; -+ - if (release) { -- nm_device_master_release_one_slave (self, slave, TRUE, reason); -+ nm_device_master_release_one_slave (self, slave, configure, reason); - /* Bridge/bond/team interfaces are left up until manually deactivated */ - if (priv->slaves == NULL && priv->state == NM_DEVICE_STATE_ACTIVATED) - _LOGD (LOGD_DEVICE, "last slave removed; remaining activated"); --- -2.7.4 - diff --git a/SOURCES/0008-utf8safe-fixes-rh1443114.patch b/SOURCES/0008-utf8safe-fixes-rh1443114.patch new file mode 100644 index 0000000..2a410bd --- /dev/null +++ b/SOURCES/0008-utf8safe-fixes-rh1443114.patch @@ -0,0 +1,1803 @@ +From 7f3d60df818fb2b1dd99b12f893a50fd2402968f Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Wed, 17 May 2017 16:45:46 +0200 +Subject: [PATCH 01/13] libnm: fix unterminated NUL string when parsing UDev + properties + +This can result in trailing garbage (which fails UTF-8 validation +checks) or even worse, in read-out-of-bounds. + +Fixes: 6808bf8195d427975638610781f8c5384228218d + +https://bugzilla.redhat.com/show_bug.cgi?id=1443114 +https://bugzilla.redhat.com/show_bug.cgi?id=1451160 +https://bugzilla.redhat.com/show_bug.cgi?id=1451286 +(cherry picked from commit 9594ee6e6921c3e37615a572de7e986274a68500) +(cherry picked from commit 5eb11aa8ec4e402b3e5795723519cdaab1cfb828) +--- + shared/nm-utils/nm-udev-utils.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/shared/nm-utils/nm-udev-utils.c b/shared/nm-utils/nm-udev-utils.c +index bf0ad5b..1f1811c 100644 +--- a/shared/nm-utils/nm-udev-utils.c ++++ b/shared/nm-utils/nm-udev-utils.c +@@ -89,6 +89,7 @@ nm_udev_utils_property_decode (const char *uproperty, char **to_free) + return uproperty; + } + ++ *n++ = '\0'; + return (*to_free = unescaped); + } + +-- +2.9.4 + + +From be2a87e07f7a75e568d68afed1532b24edbee414 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Wed, 17 May 2017 17:04:13 +0200 +Subject: [PATCH 02/13] libnm: don't cunescape \x00 encoding in + nm_udev_utils_property_decode() + +UDev never creates such invalid escape sequences. Anyway, +we cannot accept a NUL character at this point. Just take +the ill escape verbatim -- it should never happen anyway. + +(cherry picked from commit c15eae92c0c5fc12017dd84a66ee0bbb9638b270) +(cherry picked from commit 822282754d1653ac24f6e5a9bf616fc74f957050) +--- + shared/nm-utils/nm-udev-utils.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/shared/nm-utils/nm-udev-utils.c b/shared/nm-utils/nm-udev-utils.c +index 1f1811c..79d4426 100644 +--- a/shared/nm-utils/nm-udev-utils.c ++++ b/shared/nm-utils/nm-udev-utils.c +@@ -67,8 +67,9 @@ nm_udev_utils_property_decode (const char *uproperty, char **to_free) + if ( p[0] == '\\' + && p[1] == 'x' + && (a = g_ascii_xdigit_value (p[2])) >= 0 +- && (b = g_ascii_xdigit_value (p[3])) >= 0) { +- if (!unescaped) { ++ && (b = g_ascii_xdigit_value (p[3])) >= 0 ++ && (a || b)) { ++ if (!n) { + gssize l = p - uproperty; + + unescaped = g_malloc (l + strlen (p) + 1 - 3); +@@ -84,7 +85,7 @@ nm_udev_utils_property_decode (const char *uproperty, char **to_free) + } + } + +- if (!unescaped) { ++ if (!n) { + *to_free = NULL; + return uproperty; + } +-- +2.9.4 + + +From e1679a6a48ba7367528927f3e7f0021be71e37d6 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Wed, 17 May 2017 15:18:20 +0200 +Subject: [PATCH 03/13] device: fix setting device's UDI property + +Fixes: e8139f56c26ae3bcc5e14abdb29970ae07e93299 +(cherry picked from commit 5eac18b58d2be9b5b611f4b4e356b2ac59e46bce) +(cherry picked from commit 4ae14d3677609ef3c702c1a7a706b6bc38030958) +--- + src/devices/nm-device.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index b14dc49..62cb5dd 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -2460,7 +2460,7 @@ device_link_changed (NMDevice *self) + info = *pllink; + + udi = nm_platform_link_get_udi (nm_device_get_platform (self), info.ifindex); +- if (udi && g_strcmp0 (udi, priv->udi)) { ++ if (udi && !nm_streq0 (udi, priv->udi)) { + /* Update UDI to what udev gives us */ + g_free (priv->udi); + priv->udi = g_strdup (udi); +@@ -2841,7 +2841,7 @@ update_device_from_platform_link (NMDevice *self, const NMPlatformLink *plink) + g_return_if_fail (plink != NULL); + + udi = nm_platform_link_get_udi (nm_device_get_platform (self), plink->ifindex); +- if (udi && !g_strcmp0 (udi, priv->udi)) { ++ if (udi && !nm_streq0 (udi, priv->udi)) { + g_free (priv->udi); + priv->udi = g_strdup (udi); + _notify (self, PROP_UDI); +-- +2.9.4 + + +From 84b1c78c2474d9e579955fa0ebdfc6a8c0761548 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Wed, 17 May 2017 15:01:10 +0200 +Subject: [PATCH 04/13] device: make UDI property construct-only + +(cherry picked from commit e216d5eac0768b5936f3415cde7808982c74f0ac) +(cherry picked from commit c3b180198fe10d1fe84fea8b9944834be4f4ad56) +--- + src/devices/nm-device.c | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index 62cb5dd..ed9bc49 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -13894,14 +13894,11 @@ set_property (GObject *object, guint prop_id, + + switch (prop_id) { + case PROP_UDI: +- if (g_value_get_string (value)) { +- g_free (priv->udi); +- priv->udi = g_value_dup_string (value); +- } ++ /* construct-only */ ++ priv->udi = g_value_dup_string (value); + break; + case PROP_IFACE: + /* construct-only */ +- g_return_if_fail (!priv->iface); + priv->iface = g_value_dup_string (value); + break; + case PROP_DRIVER: +@@ -14212,7 +14209,7 @@ nm_device_class_init (NMDeviceClass *klass) + obj_properties[PROP_UDI] = + g_param_spec_string (NM_DEVICE_UDI, "", "", + NULL, +- G_PARAM_READWRITE | G_PARAM_CONSTRUCT | ++ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS); + obj_properties[PROP_IFACE] = + g_param_spec_string (NM_DEVICE_IFACE, "", "", +-- +2.9.4 + + +From c63800b21cb46b7fbdc318205ed6af93aac9aeac Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Tue, 16 May 2017 18:50:21 +0200 +Subject: [PATCH 05/13] shared: add nm_utils_str_utf8safe_*() API to sanitize + UTF-8 strings + +Use C-style backslash escaping to sanitize non-UTF-8 strings. +The functions are compatible with glib's g_strcompress() and +g_strescape(). + +The difference is only that g_strescape() escapes all non-printable, +non ASCII character as well, while nm_utils_str_utf8safe_escape() +-- depending on the flags -- preserves valid UTF-8 sequence except +backslash. + +The flags allow to optionally escape ASCII control characters and +all non-ASCII (valid UTF-8) characters. But the option to preserve +valid UTF-8 (non-ASCII) characters verbatim, is what distinguishes +from g_strescape(). + +(cherry picked from commit df6d27b33a86e2ecdc5a8e1deff275d19b2cbde1) +(cherry picked from commit 52105f27df974715a8481fb240f98f73a6a8be08) +--- + libnm-core/tests/test-general.c | 95 ++++++++++++++++++++++++++ + shared/nm-utils/nm-shared-utils.c | 138 ++++++++++++++++++++++++++++++++++++++ + shared/nm-utils/nm-shared-utils.h | 16 +++++ + 3 files changed, 249 insertions(+) + +diff --git a/libnm-core/tests/test-general.c b/libnm-core/tests/test-general.c +index 7ecd681..fbcfa7d 100644 +--- a/libnm-core/tests/test-general.c ++++ b/libnm-core/tests/test-general.c +@@ -5248,6 +5248,100 @@ static void test_nm_utils_enum (void) + + /*****************************************************************************/ + ++static void ++do_test_utils_str_utf8safe (const char *str, const char *expected, NMUtilsStrUtf8SafeFlags flags) ++{ ++ const char *str_safe, *s; ++ gs_free char *str2 = NULL; ++ gs_free char *str3 = NULL; ++ ++ str_safe = nm_utils_str_utf8safe_escape (str, flags, &str2); ++ ++ str3 = nm_utils_str_utf8safe_escape_cp (str, flags); ++ g_assert_cmpstr (str3, ==, str_safe); ++ g_assert ((!str && !str3) || (str != str3)); ++ g_clear_pointer (&str3, g_free); ++ ++ if (expected == NULL) { ++ g_assert (str_safe == str); ++ g_assert (!str2); ++ if (str) { ++ g_assert (!strchr (str, '\\')); ++ g_assert (g_utf8_validate (str, -1, NULL)); ++ } ++ ++ g_assert (str == nm_utils_str_utf8safe_unescape (str_safe, &str3)); ++ g_assert (!str3); ++ ++ str3 = nm_utils_str_utf8safe_unescape_cp (str_safe); ++ if (str) { ++ g_assert (str3 != str); ++ g_assert_cmpstr (str3, ==, str); ++ } else ++ g_assert (!str3); ++ g_clear_pointer (&str3, g_free); ++ return; ++ } ++ ++ g_assert (str); ++ g_assert (str_safe != str); ++ g_assert (str_safe == str2); ++ g_assert ( strchr (str, '\\') ++ || !g_utf8_validate (str, -1, NULL) ++ || ( NM_FLAGS_HAS (flags, NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_NON_ASCII) ++ && NM_STRCHAR_ANY (str, ch, (guchar) ch >= 127)) ++ || ( NM_FLAGS_HAS (flags, NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL) ++ && NM_STRCHAR_ANY (str, ch, (guchar) ch < ' '))); ++ g_assert (g_utf8_validate (str_safe, -1, NULL)); ++ ++ str3 = g_strcompress (str_safe); ++ g_assert_cmpstr (str, ==, str3); ++ g_clear_pointer (&str3, g_free); ++ ++ str3 = nm_utils_str_utf8safe_unescape_cp (str_safe); ++ g_assert (str3 != str); ++ g_assert_cmpstr (str3, ==, str); ++ g_clear_pointer (&str3, g_free); ++ ++ s = nm_utils_str_utf8safe_unescape (str_safe, &str3); ++ g_assert (str3 != str); ++ g_assert (s == str3); ++ g_assert_cmpstr (str3, ==, str); ++ g_clear_pointer (&str3, g_free); ++ ++ g_assert_cmpstr (str_safe, ==, expected); ++} ++ ++static void ++test_utils_str_utf8safe (void) ++{ ++ do_test_utils_str_utf8safe (NULL, NULL, NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("", NULL, NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("\314", "\\314", NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("\314\315x\315\315x", "\\314\\315x\\315\\315x", NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("\314\315xx", "\\314\\315xx", NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("\314xx", "\\314xx", NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("\xa0", "\\240", NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("\xe2\x91\xa0", NULL, NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("\xe2\xe2\x91\xa0", "\\342\xe2\x91\xa0", NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("\xe2\xe2\x91\xa0\xa0", "\\342\xe2\x91\xa0\\240", NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("a", NULL, NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("ab", NULL, NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("ab\314", "ab\\314", NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("ab\314adsf", "ab\\314adsf", NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("abadsf", NULL, NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("abäb", NULL, NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("x\xa0", "x\\240", NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("Ä\304ab\\äb", "Ä\\304ab\\\\äb", NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("Äab\\äb", "Äab\\\\äb", NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("ÄÄab\\äb", "ÄÄab\\\\äb", NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("㈞abä㈞b", NULL, NM_UTILS_STR_UTF8_SAFE_FLAG_NONE); ++ do_test_utils_str_utf8safe ("abäb", "ab\\303\\244b", NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_NON_ASCII); ++ do_test_utils_str_utf8safe ("ab\ab", "ab\\007b", NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL); ++} ++ ++/*****************************************************************************/ ++ + static int + _test_nm_in_set_get (int *call_counter, gboolean allow_called, int value) + { +@@ -5605,6 +5699,7 @@ int main (int argc, char **argv) + nmtst_init (&argc, &argv, TRUE); + + /* The tests */ ++ g_test_add_func ("/core/general/test_utils_str_utf8safe", test_utils_str_utf8safe); + g_test_add_func ("/core/general/test_nm_in_set", test_nm_in_set); + g_test_add_func ("/core/general/test_nm_in_strset", test_nm_in_strset); + g_test_add_func ("/core/general/test_setting_vpn_items", test_setting_vpn_items); +diff --git a/shared/nm-utils/nm-shared-utils.c b/shared/nm-utils/nm-shared-utils.c +index 413526d..e7f31cb 100644 +--- a/shared/nm-utils/nm-shared-utils.c ++++ b/shared/nm-utils/nm-shared-utils.c +@@ -364,3 +364,141 @@ nm_g_object_set_property (GObject *object, + } + + /*****************************************************************************/ ++ ++static void ++_str_append_escape (GString *s, char ch) ++{ ++ g_string_append_c (s, '\\'); ++ g_string_append_c (s, '0' + ((((guchar) ch) >> 6) & 07)); ++ g_string_append_c (s, '0' + ((((guchar) ch) >> 3) & 07)); ++ g_string_append_c (s, '0' + ( ((guchar) ch) & 07)); ++} ++ ++/** ++ * nm_utils_str_utf8safe_escape: ++ * @str: NUL terminated input string, possibly in utf-8 encoding ++ * @flags: #NMUtilsStrUtf8SafeFlags flags ++ * @to_free: (out): return the pointer location of the string ++ * if a copying was necessary. ++ * ++ * Returns the possible non-UTF-8 NUL terminated string @str ++ * and uses backslash escaping (C escaping, like g_strescape()) ++ * to sanitize non UTF-8 characters. The result is valid ++ * UTF-8. ++ * ++ * The operation can be reverted with g_strcompress() or ++ * nm_utils_str_utf8safe_unescape(). ++ * ++ * Depending on @flags, valid UTF-8 characters are not escaped at all ++ * (except the escape character '\\'). This is the difference to g_strescape(), ++ * which escapes all non-ASCII characters. This allows to pass on ++ * valid UTF-8 characters as-is and can be directly shown to the user ++ * as UTF-8 -- with exception of the backslash escape character, ++ * invalid UTF-8 sequences, and other (depending on @flags). ++ * ++ * Returns: the escaped input string, as valid UTF-8. If no escaping ++ * is necessary, it returns the input @str. Otherwise, an allocated ++ * string @to_free is returned which must be freed by the caller ++ * with g_free. The escaping can be reverted by g_strcompress(). ++ **/ ++const char * ++nm_utils_str_utf8safe_escape (const char *str, NMUtilsStrUtf8SafeFlags flags, char **to_free) ++{ ++ const char *p = NULL; ++ GString *s; ++ ++ g_return_val_if_fail (to_free, NULL); ++ ++ *to_free = NULL; ++ if (!str || !str[0]) ++ return str; ++ ++ if ( g_utf8_validate (str, -1, &p) ++ && !NM_STRCHAR_ANY (str, ch, ++ ( ch == '\\' \ ++ || ( NM_FLAGS_HAS (flags, NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL) \ ++ && ch < ' ') \ ++ || ( NM_FLAGS_HAS (flags, NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_NON_ASCII) \ ++ && ((guchar) ch) >= 127)))) ++ return str; ++ ++ s = g_string_sized_new ((p - str) + strlen (p) + 5); ++ ++ do { ++ for (; str < p; str++) { ++ char ch = str[0]; ++ ++ if (ch == '\\') ++ g_string_append (s, "\\\\"); ++ else if ( ( NM_FLAGS_HAS (flags, NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL) \ ++ && ch < ' ') \ ++ || ( NM_FLAGS_HAS (flags, NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_NON_ASCII) \ ++ && ((guchar) ch) >= 127)) ++ _str_append_escape (s, ch); ++ else ++ g_string_append_c (s, ch); ++ } ++ ++ if (p[0] == '\0') ++ break; ++ _str_append_escape (s, p[0]); ++ ++ str = &p[1]; ++ g_utf8_validate (str, -1, &p); ++ } while (TRUE); ++ ++ *to_free = g_string_free (s, FALSE); ++ return *to_free; ++} ++ ++const char * ++nm_utils_str_utf8safe_unescape (const char *str, char **to_free) ++{ ++ g_return_val_if_fail (to_free, NULL); ++ ++ if (!str || !strchr (str, '\\')) { ++ *to_free = NULL; ++ return str; ++ } ++ return (*to_free = g_strcompress (str)); ++} ++ ++/** ++ * nm_utils_str_utf8safe_escape_cp: ++ * @str: NUL terminated input string, possibly in utf-8 encoding ++ * @flags: #NMUtilsStrUtf8SafeFlags flags ++ * ++ * Like nm_utils_str_utf8safe_escape(), except the returned value ++ * is always a copy of the input and must be freed by the caller. ++ * ++ * Returns: the escaped input string in UTF-8 encoding. The returned ++ * value should be freed with g_free(). ++ * The escaping can be reverted by g_strcompress(). ++ **/ ++char * ++nm_utils_str_utf8safe_escape_cp (const char *str, NMUtilsStrUtf8SafeFlags flags) ++{ ++ char *s; ++ ++ nm_utils_str_utf8safe_escape (str, flags, &s); ++ return s ?: g_strdup (str); ++} ++ ++char * ++nm_utils_str_utf8safe_unescape_cp (const char *str) ++{ ++ return str ? g_strcompress (str) : NULL; ++} ++ ++char * ++nm_utils_str_utf8safe_escape_take (char *str, NMUtilsStrUtf8SafeFlags flags) ++{ ++ char *str_to_free; ++ ++ nm_utils_str_utf8safe_escape (str, flags, &str_to_free); ++ if (str_to_free) { ++ g_free (str); ++ return str_to_free; ++ } ++ return str; ++} +diff --git a/shared/nm-utils/nm-shared-utils.h b/shared/nm-utils/nm-shared-utils.h +index f1f9f51..69f9533 100644 +--- a/shared/nm-utils/nm-shared-utils.h ++++ b/shared/nm-utils/nm-shared-utils.h +@@ -86,4 +86,20 @@ gboolean nm_g_object_set_property (GObject *object, + + /*****************************************************************************/ + ++typedef enum { ++ NM_UTILS_STR_UTF8_SAFE_FLAG_NONE = 0, ++ NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL = 0x0001, ++ NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_NON_ASCII = 0x0002, ++} NMUtilsStrUtf8SafeFlags; ++ ++const char *nm_utils_str_utf8safe_escape (const char *str, NMUtilsStrUtf8SafeFlags flags, char **to_free); ++const char *nm_utils_str_utf8safe_unescape (const char *str, char **to_free); ++ ++char *nm_utils_str_utf8safe_escape_cp (const char *str, NMUtilsStrUtf8SafeFlags flags); ++char *nm_utils_str_utf8safe_unescape_cp (const char *str); ++ ++char *nm_utils_str_utf8safe_escape_take (char *str, NMUtilsStrUtf8SafeFlags flags); ++ ++/*****************************************************************************/ ++ + #endif /* __NM_SHARED_UTILS_H__ */ +-- +2.9.4 + + +From e9eee9c65818e7dd85e79c1db6ad4c32b4c7fb52 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Tue, 16 May 2017 14:11:07 +0200 +Subject: [PATCH 06/13] device: sanitze UTF-8 values for D-Bus + + ip link add name $'d\xccf\\c' type dummy + +Use nm_utils_str_utf8safe_escape() to sanitize non UTF-8 sequences +before exposing them on D-Bus. The operation can be reverted client +side via nm_utils_str_utf8safe_unescape() or simply g_strcompress(). + +Note that this preserves all valid UTF-8 sequences as-is, with exception +of the backslash escape character and ASCII control characters. Thus, this +is a change in behavior for strings that contain such characters. + +Note that nmcli is not changed to somehow unescape the string before +printing. As the string is not valid UTF-8 (or contains ASCII characters +that need escaping), they are not printable as-is, so unescaping before +printing makes little sense. + +(cherry picked from commit 0870906540506d0157f305df32b6b1f65b10ee85) +(cherry picked from commit 3a96772918a391ec8186183b5c14c9b165322d3a) +--- + .../org.freedesktop.NetworkManager.Device.xml | 15 +++++++++++ + src/devices/nm-device.c | 31 ++++++++++++++++------ + 2 files changed, 38 insertions(+), 8 deletions(-) + +diff --git a/introspection/org.freedesktop.NetworkManager.Device.xml b/introspection/org.freedesktop.NetworkManager.Device.xml +index ee42410..be0a612 100644 +--- a/introspection/org.freedesktop.NetworkManager.Device.xml ++++ b/introspection/org.freedesktop.NetworkManager.Device.xml +@@ -21,6 +21,9 @@ + each device in your application, use the object path. If you're looking + for a way to track a specific piece of hardware across reboot or hotplug, + use a MAC address or USB serial number. ++ ++ Note that non-UTF-8 characters are backslash escaped. Use g_strcompress() ++ to obtain the true (non-UTF-8) string. + --> + + +@@ -28,6 +31,9 @@ + Interface: + + The name of the device's control (and often data) interface. ++ Note that non UTF-8 characters are backslash escaped, so the ++ resulting name may be longer then 15 characters. Use g_strcompress() ++ to revert the escaping. + --> + + +@@ -38,6 +44,9 @@ + not refer to the actual data interface until the device has successfully + established a data connection, indicated by the device's State becoming + ACTIVATED. ++ Note that non UTF-8 characters are backslash escaped, so the ++ resulting name may be longer then 15 characters. Use g_strcompress() ++ to revert the escaping. + --> + + +@@ -45,6 +54,8 @@ + Driver: + + The driver handling the device. ++ Non-UTF-8 sequences are backslash escaped. Use g_strcompress() ++ to revert. + --> + + +@@ -52,6 +63,8 @@ + DriverVersion: + + The version of the driver handling the device. ++ Non-UTF-8 sequences are backslash escaped. Use g_strcompress() ++ to revert. + --> + + +@@ -59,6 +72,8 @@ + FirmwareVersion: + + The firmware version for the device. ++ Non-UTF-8 sequences are backslash escaped. Use g_strcompress() ++ to revert. + --> + + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index ed9bc49..e61bde3 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -13993,28 +13993,43 @@ get_property (GObject *object, guint prop_id, + + switch (prop_id) { + case PROP_UDI: +- g_value_set_string (value, priv->udi); ++ /* UDI is (depending on the device type) a path to sysfs and can contain ++ * non-UTF-8. ++ * ip link add name $'d\xccf\\c' type dummy */ ++ g_value_take_string (value, ++ nm_utils_str_utf8safe_escape_cp (priv->udi, ++ NM_UTILS_STR_UTF8_SAFE_FLAG_NONE)); + break; + case PROP_IFACE: +- g_value_set_string (value, priv->iface); ++ g_value_take_string (value, ++ nm_utils_str_utf8safe_escape_cp (priv->iface, ++ NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL)); + break; + case PROP_IP_IFACE: +- if (ip_config_valid (priv->state)) +- g_value_set_string (value, nm_device_get_ip_iface (self)); +- else ++ if (ip_config_valid (priv->state)) { ++ g_value_take_string (value, ++ nm_utils_str_utf8safe_escape_cp (nm_device_get_ip_iface (self), ++ NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL)); ++ } else + g_value_set_string (value, NULL); + break; + case PROP_IFINDEX: + g_value_set_int (value, priv->ifindex); + break; + case PROP_DRIVER: +- g_value_set_string (value, priv->driver); ++ g_value_take_string (value, ++ nm_utils_str_utf8safe_escape_cp (priv->driver, ++ NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL)); + break; + case PROP_DRIVER_VERSION: +- g_value_set_string (value, priv->driver_version); ++ g_value_take_string (value, ++ nm_utils_str_utf8safe_escape_cp (priv->driver_version, ++ NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL)); + break; + case PROP_FIRMWARE_VERSION: +- g_value_set_string (value, priv->firmware_version); ++ g_value_take_string (value, ++ nm_utils_str_utf8safe_escape_cp (priv->firmware_version, ++ NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL)); + break; + case PROP_CAPABILITIES: + g_value_set_uint (value, (priv->capabilities & ~NM_DEVICE_CAP_INTERNAL_MASK)); +-- +2.9.4 + + +From 0b8676b887f63a708e6444f6b3d19003a2f9b4c8 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Wed, 17 May 2017 11:48:53 +0200 +Subject: [PATCH 07/13] libnm: UTF-8 sanitize strings from UDev in NMDevice + +(cherry picked from commit b9e9f7616556f693e2642ed433f3289f9c6da452) +(cherry picked from commit d7b184d99257a6e6e59b22709007675430ec308b) +--- + libnm/nm-device.c | 273 ++++++++++++++++++++++++++++++------------------------ + 1 file changed, 152 insertions(+), 121 deletions(-) + +diff --git a/libnm/nm-device.c b/libnm/nm-device.c +index 9cbdbd0..7e8feb1 100644 +--- a/libnm/nm-device.c ++++ b/libnm/nm-device.c +@@ -81,7 +81,7 @@ typedef struct { + GPtrArray *available_connections; + + struct udev *udev; +- char *product, *short_product; ++ char *product; + char *vendor, *short_vendor; + char *description, *bus_name; + +@@ -320,7 +320,6 @@ finalize (GObject *object) + g_free (priv->driver_version); + g_free (priv->firmware_version); + g_free (priv->product); +- g_free (priv->short_product); + g_free (priv->vendor); + g_free (priv->short_vendor); + g_free (priv->description); +@@ -1357,6 +1356,17 @@ _get_udev_property (NMDevice *device, + return db_value; + } + ++static char * ++_get_udev_property_utf8safe (NMDevice *device, ++ const char *enc_prop, /* ID_XXX_ENC */ ++ const char *db_prop) /* ID_XXX_FROM_DATABASE */ ++{ ++ return nm_utils_str_utf8safe_escape_take (_get_udev_property (device, ++ enc_prop, ++ db_prop), ++ NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL); ++} ++ + /** + * nm_device_get_product: + * @device: a #NMDevice +@@ -1365,6 +1375,9 @@ _get_udev_property (NMDevice *device, + * + * Returns: the product name of the device. This is the internal string used by the + * device, and must not be modified. ++ * ++ * The string is backslash escaped (C escaping) for invalid characters. The escaping ++ * can be reverted with g_strcompress(), however the result may not be valid UTF-8. + **/ + const char * + nm_device_get_product (NMDevice *device) +@@ -1374,15 +1387,16 @@ nm_device_get_product (NMDevice *device) + g_return_val_if_fail (NM_IS_DEVICE (device), NULL); + + priv = NM_DEVICE_GET_PRIVATE (device); +- if (!priv->product) +- priv->product = _get_udev_property (device, "ID_MODEL_ENC", "ID_MODEL_FROM_DATABASE"); ++ if (!priv->product) { ++ priv->product = _get_udev_property_utf8safe (device, "ID_MODEL_ENC", "ID_MODEL_FROM_DATABASE"); + +- /* Sometimes ID_PRODUCT_FROM_DATABASE is used? */ +- if (!priv->product) +- priv->product = _get_udev_property (device, "ID_MODEL_ENC", "ID_PRODUCT_FROM_DATABASE"); ++ /* Sometimes ID_PRODUCT_FROM_DATABASE is used? */ ++ if (!priv->product) ++ priv->product = _get_udev_property_utf8safe (device, "ID_MODEL_ENC", "ID_PRODUCT_FROM_DATABASE"); + +- if (!priv->product) +- priv->product = g_strdup (""); ++ if (!priv->product) ++ priv->product = g_strdup (""); ++ } + + return priv->product; + } +@@ -1395,6 +1409,9 @@ nm_device_get_product (NMDevice *device) + * + * Returns: the vendor name of the device. This is the internal string used by the + * device, and must not be modified. ++ * ++ * The string is backslash escaped (C escaping) for invalid characters. The escaping ++ * can be reverted with g_strcompress(), however the result may not be valid UTF-8. + **/ + const char * + nm_device_get_vendor (NMDevice *device) +@@ -1406,7 +1423,7 @@ nm_device_get_vendor (NMDevice *device) + priv = NM_DEVICE_GET_PRIVATE (device); + + if (!priv->vendor) +- priv->vendor = _get_udev_property (device, "ID_VENDOR_ENC", "ID_VENDOR_FROM_DATABASE"); ++ priv->vendor = _get_udev_property_utf8safe (device, "ID_VENDOR_ENC", "ID_VENDOR_FROM_DATABASE"); + + if (!priv->vendor) + priv->vendor = g_strdup (""); +@@ -1414,128 +1431,146 @@ nm_device_get_vendor (NMDevice *device) + return priv->vendor; + } + +-static const char * const ignored_words[] = { +- "Semiconductor", +- "Components", +- "Corporation", +- "Communications", +- "Company", +- "Corp.", +- "Corp", +- "Co.", +- "Inc.", +- "Inc", +- "Incorporated", +- "Ltd.", +- "Limited.", +- "Intel?", +- "chipset", +- "adapter", +- "[hex]", +- "NDIS", +- "Module", +- NULL +-}; +- +-static const char * const ignored_phrases[] = { +- "Multiprotocol MAC/baseband processor", +- "Wireless LAN Controller", +- "Wireless LAN Adapter", +- "Wireless Adapter", +- "Network Connection", +- "Wireless Cardbus Adapter", +- "Wireless CardBus Adapter", +- "54 Mbps Wireless PC Card", +- "Wireless PC Card", +- "Wireless PC", +- "PC Card with XJACK(r) Antenna", +- "Wireless cardbus", +- "Wireless LAN PC Card", +- "Technology Group Ltd.", +- "Communication S.p.A.", +- "Business Mobile Networks BV", +- "Mobile Broadband Minicard Composite Device", +- "Mobile Communications AB", +- "(PC-Suite Mode)", +- NULL +-}; +- + static char * + fixup_desc_string (const char *desc) + { +- char *p, *temp; +- char **words, **item; +- GString *str; ++ static const char *const IGNORED_PHRASES[] = { ++ "Multiprotocol MAC/baseband processor", ++ "Wireless LAN Controller", ++ "Wireless LAN Adapter", ++ "Wireless Adapter", ++ "Network Connection", ++ "Wireless Cardbus Adapter", ++ "Wireless CardBus Adapter", ++ "54 Mbps Wireless PC Card", ++ "Wireless PC Card", ++ "Wireless PC", ++ "PC Card with XJACK(r) Antenna", ++ "Wireless cardbus", ++ "Wireless LAN PC Card", ++ "Technology Group Ltd.", ++ "Communication S.p.A.", ++ "Business Mobile Networks BV", ++ "Mobile Broadband Minicard Composite Device", ++ "Mobile Communications AB", ++ "(PC-Suite Mode)", ++ }; ++ static const char *const IGNORED_WORDS[] = { ++ "Semiconductor", ++ "Components", ++ "Corporation", ++ "Communications", ++ "Company", ++ "Corp.", ++ "Corp", ++ "Co.", ++ "Inc.", ++ "Inc", ++ "Incorporated", ++ "Ltd.", ++ "Limited.", ++ "Intel?", ++ "chipset", ++ "adapter", ++ "[hex]", ++ "NDIS", ++ "Module", ++ }; ++ char *desc_full; ++ char *p, *q; + int i; + +- if (!desc) ++ if (!desc || !desc[0]) + return NULL; + +- p = temp = g_strdup (desc); +- while (*p) { +- if (*p == '_' || *p == ',') ++ /* restore original non-UTF-8-safe text. */ ++ desc_full = nm_utils_str_utf8safe_unescape_cp (desc); ++ ++ /* replace all invalid UTF-8 bytes with space. */ ++ p = desc_full; ++ while (!g_utf8_validate (p, -1, (const char **) &q)) { ++ /* the byte is invalid UTF-8. Replace it with space and proceed. */ ++ *q = ' '; ++ p = q + 1; ++ } ++ ++ /* replace '_', ',', and ASCII controll characters with space. */ ++ for (p = desc_full; p[0]; p++) { ++ if ( NM_IN_SET (*p, '_', ',') ++ || *p < ' ') + *p = ' '; +- p++; + } + + /* Attempt to shorten ID by ignoring certain phrases */ +- for (i = 0; ignored_phrases[i]; i++) { +- p = strstr (temp, ignored_phrases[i]); ++ for (i = 0; i < G_N_ELEMENTS (IGNORED_PHRASES); i++) { ++ p = strstr (desc_full, IGNORED_PHRASES[i]); + if (p) { +- guint32 ignored_len = strlen (ignored_phrases[i]); ++ const char *eow = &p[strlen (IGNORED_PHRASES[i])]; + +- memmove (p, p + ignored_len, strlen (p + ignored_len) + 1); /* +1 for the \0 */ ++ memmove (p, eow, strlen (eow) + 1); /* +1 for the \0 */ + } + } + +- /* Attempt to shorten ID by ignoring certain individual words */ +- words = g_strsplit (temp, " ", 0); +- str = g_string_new_len (NULL, strlen (temp)); +- g_free (temp); +- +- for (item = words; *item; item++) { +- gboolean ignore = FALSE; +- +- if (**item == '\0') +- continue; +- +- for (i = 0; ignored_words[i]; i++) { +- if (!strcmp (*item, ignored_words[i])) { +- ignore = TRUE; +- break; +- } ++ /* Attempt to shorten ID by ignoring certain individual words. ++ * - word-split the description at spaces ++ * - coalesce multiple spaces ++ * - skip over IGNORED_WORDS */ ++ p = desc_full; ++ q = desc_full; ++ for (;;) { ++ char *eow; ++ gsize l; ++ ++ /* skip leading spaces. */ ++ while (p[0] == ' ') ++ p++; ++ ++ if (!p[0]) ++ break; ++ ++ /* split leading word on first space */ ++ eow = strchr (p, ' '); ++ if (eow) ++ *eow = '\0'; ++ ++ if (nm_utils_strv_find_first ((char **) IGNORED_WORDS, ++ G_N_ELEMENTS (IGNORED_WORDS), ++ p) < 0) ++ goto next; ++ ++ l = strlen (p); ++ if (q != p) { ++ if (q != desc_full) ++ *q++ = ' '; ++ memmove (q, p, l); + } ++ q += l; + +- if (!ignore) { +- if (str->len) +- g_string_append_c (str, ' '); +- g_string_append (str, *item); +- } ++next: ++ if (!eow) ++ break; ++ p = eow + 1; + } +- g_strfreev (words); + +- temp = str->str; +- g_string_free (str, FALSE); ++ *q++ = '\0'; + +- return temp; ++ if (!desc_full[0]) { ++ g_free (desc_full); ++ return NULL; ++ } ++ ++ nm_assert (g_utf8_validate (desc_full, -1, NULL)); ++ return desc_full; + } + + static void +-get_description (NMDevice *device) ++ensure_description (NMDevice *device) + { + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device); +- const char *dev_product; +- const char *dev_vendor; +- char *pdown; +- char *vdown; +- GString *str; + GParamSpec *name_prop; ++ gs_free char *short_product = NULL; + +- dev_product = nm_device_get_product (device); +- priv->short_product = fixup_desc_string (dev_product); +- +- dev_vendor = nm_device_get_vendor (device); +- priv->short_vendor = fixup_desc_string (dev_vendor); ++ priv->short_vendor = nm_str_realloc (fixup_desc_string (nm_device_get_vendor (device))); + + /* Grab device's preferred name, if any */ + name_prop = g_object_class_find_property (G_OBJECT_GET_CLASS (G_OBJECT (device)), "name"); +@@ -1546,28 +1581,24 @@ get_description (NMDevice *device) + g_clear_pointer (&priv->description, g_free); + } + +- if (!dev_product || !dev_vendor) { +- priv->description = g_strdup (nm_device_get_iface (device)); ++ if ( !priv->short_vendor ++ || !(short_product = fixup_desc_string (nm_device_get_product (device)))) { ++ priv->description = g_strdup (nm_device_get_iface (device) ?: ""); + return; + } + +- str = g_string_new_len (NULL, strlen (priv->short_vendor) + strlen (priv->short_product) + 1); +- + /* Another quick hack; if all of the fixed up vendor string + * is found in product, ignore the vendor. + */ +- pdown = g_ascii_strdown (priv->short_product, -1); +- vdown = g_ascii_strdown (priv->short_vendor, -1); +- if (!strstr (pdown, vdown)) { +- g_string_append (str, priv->short_vendor); +- g_string_append_c (str, ' '); ++ { ++ gs_free char *pdown = g_ascii_strdown (short_product, -1); ++ gs_free char *vdown = g_ascii_strdown (priv->short_vendor, -1); ++ ++ if (!strstr (pdown, vdown)) ++ priv->description = g_strconcat (priv->short_vendor, " ", short_product, NULL); ++ else ++ priv->description = g_steal_pointer (&short_product); + } +- g_free (pdown); +- g_free (vdown); +- +- g_string_append (str, priv->short_product); +- +- priv->description = g_string_free (str, FALSE); + } + + static const char * +@@ -1580,7 +1611,7 @@ get_short_vendor (NMDevice *device) + priv = NM_DEVICE_GET_PRIVATE (device); + + if (!priv->description) +- get_description (device); ++ ensure_description (device); + + return priv->short_vendor; + } +@@ -1604,7 +1635,7 @@ nm_device_get_description (NMDevice *device) + priv = NM_DEVICE_GET_PRIVATE (device); + + if (!priv->description) +- get_description (device); ++ ensure_description (device); + + return priv->description; + } +-- +2.9.4 + + +From aee0c50ffa840e67642749189bd323620fff8d93 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Fri, 19 May 2017 10:18:59 +0200 +Subject: [PATCH 08/13] libnm: fix device description in fixup_desc_string() + +Fixes: b9e9f7616556f693e2642ed433f3289f9c6da452 +(cherry picked from commit 12c881ad40c4829eb430bd0148fa5dbbdfd0ec01) +(cherry picked from commit c22075dc98fc79021e9a4847b57188f09b489ddd) +--- + libnm/nm-device.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libnm/nm-device.c b/libnm/nm-device.c +index 7e8feb1..6c27190 100644 +--- a/libnm/nm-device.c ++++ b/libnm/nm-device.c +@@ -1535,7 +1535,7 @@ fixup_desc_string (const char *desc) + + if (nm_utils_strv_find_first ((char **) IGNORED_WORDS, + G_N_ELEMENTS (IGNORED_WORDS), +- p) < 0) ++ p) >= 0) + goto next; + + l = strlen (p); +-- +2.9.4 + + +From 47527d343339cf0df13fa852ef73c5d0e4713890 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Fri, 19 May 2017 11:01:23 +0200 +Subject: [PATCH 09/13] libnm: ignore phrases in fixup device description only + when delimited by space + +(cherry picked from commit 72104ea10a26d4b4ff245ed60c5ccd5c043c5fe0) +(cherry picked from commit aa60b77146641db5f5d670356d8244f46dd90f81) +--- + libnm/nm-device.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/libnm/nm-device.c b/libnm/nm-device.c +index 6c27190..3a6052b 100644 +--- a/libnm/nm-device.c ++++ b/libnm/nm-device.c +@@ -1507,7 +1507,11 @@ fixup_desc_string (const char *desc) + if (p) { + const char *eow = &p[strlen (IGNORED_PHRASES[i])]; + +- memmove (p, eow, strlen (eow) + 1); /* +1 for the \0 */ ++ /* require that the phrase is delimited by space, or ++ * at the beginning or end of the description. */ ++ if ( (p == desc_full || p[-1] == ' ') ++ && NM_IN_SET (eow[0], '\0', ' ')) ++ memmove (p, eow, strlen (eow) + 1); /* +1 for the \0 */ + } + } + +-- +2.9.4 + + +From 6bc607bd944e83eb4e1c668bba5f750ac98ea451 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Fri, 19 May 2017 10:19:25 +0200 +Subject: [PATCH 10/13] libnm: add testable libnm/nm-libnm-utils.c file + +Previously, internal parts of libnm were not testable. +Instead, add "libnm/nm-libnm-utils.c" and "libnm/libnm-utils.la" +to contain code that can be statically linked with a new +test "libnm/tests/test-general". + +(cherry picked from commit 8df944c7e495d18bfecaf9d8316ef7783039c94b) +(cherry picked from commit 1ebac60d2219dd29634e5d375f487d5ffa624266) +--- + Makefile.am | 45 ++++++++++++++++++++++++++++++++++++++------- + libnm/nm-libnm-utils.c | 27 +++++++++++++++++++++++++++ + libnm/nm-libnm-utils.h | 26 ++++++++++++++++++++++++++ + libnm/tests/test-general.c | 34 ++++++++++++++++++++++++++++++++++ + 4 files changed, 125 insertions(+), 7 deletions(-) + create mode 100644 libnm/nm-libnm-utils.c + create mode 100644 libnm/nm-libnm-utils.h + create mode 100644 libnm/tests/test-general.c + +diff --git a/Makefile.am b/Makefile.am +index 709d79b..a6776e9 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -734,6 +734,7 @@ libnm_lib_h_pub_nointrospect = \ + libnm_lib_h_pub_mkenums = \ + libnm/nm-enum-types.h + libnm_lib_h_priv = \ ++ libnm/nm-libnm-utils.h \ + libnm/nm-dbus-helpers.h \ + libnm/nm-device-private.h \ + libnm/nm-dhcp4-config.h \ +@@ -790,6 +791,14 @@ libnm_lib_c_real = \ + libnm_lib_c_mkenums = \ + libnm/nm-enum-types.c + ++libnm_lib_cppflags = \ ++ $(dflt_cppflags_libnm_core) \ ++ -I$(srcdir)/libnm \ ++ -I$(builddir)/libnm \ ++ -DG_LOG_DOMAIN=\""libnm"\" \ ++ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB \ ++ -DNMRUNDIR=\"$(nmrundir)\" ++ + libnminclude_HEADERS += \ + $(libnm_lib_h_pub_real) \ + $(libnm_lib_h_pub_nointrospect) +@@ -799,6 +808,23 @@ nodist_libnminclude_HEADERS += \ + + ############################################################################### + ++lib_LTLIBRARIES += libnm/libnm-utils.la ++ ++libnm_libnm_utils_la_CPPFLAGS = \ ++ $(libnm_lib_cppflags) ++ ++libnm_libnm_utils_la_SOURCES = \ ++ libnm/nm-libnm-utils.c ++ ++libnm_libnm_utils_la_LIBADD = \ ++ libnm-core/libnm-core.la \ ++ introspection/libnmdbus.la \ ++ $(GLIB_LIBS) ++ ++$(libnm_libnm_utils_la_OBJECTS) : $(libnm_lib_h_pub_mkenums) ++ ++############################################################################### ++ + lib_LTLIBRARIES += libnm/libnm.la + + GLIB_GENERATED += \ +@@ -817,13 +843,8 @@ $(libnm_libnm_la_OBJECTS): $(libnm_lib_h_pub_mkenum + $(libnm_tests_libnm_vpn_plugin_utils_test_la_OBJECTS): $(libnm_core_lib_h_pub_mkenums) + + libnm_libnm_la_CPPFLAGS = \ +- $(dflt_cppflags_libnm_core) \ +- -I$(srcdir)/libnm \ +- -I$(builddir)/libnm \ +- $(LIBUDEV_CFLAGS) \ +- -DG_LOG_DOMAIN=\""libnm"\" \ +- -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB \ +- -DNMRUNDIR=\"$(nmrundir)\" ++ $(libnm_lib_cppflags) \ ++ $(LIBUDEV_CFLAGS) + + libnm_libnm_la_SOURCES = \ + $(libnm_lib_h_pub_real) \ +@@ -841,6 +862,7 @@ EXTRA_libnm_libnm_la_DEPENDENCIES = \ + libnm_libnm_la_LIBADD = \ + libnm-core/libnm-core.la \ + introspection/libnmdbus.la \ ++ libnm/libnm-utils.la \ + $(DL_LIBS) \ + $(GLIB_LIBS) \ + $(UUID_LIBS) \ +@@ -947,6 +969,7 @@ EXTRA_DIST += \ + ############################################################################### + + libnm_tests_programs = \ ++ libnm/tests/test-general \ + libnm/tests/test-nm-client \ + libnm/tests/test-remote-settings-client \ + libnm/tests/test-secret-agent +@@ -964,10 +987,14 @@ libnm_tests_ldadd = \ + libnm/libnm.la \ + $(GLIB_LIBS) + ++libnm_tests_test_general_CPPFLAGS = $(libnm_tests_cppflags) + libnm_tests_test_nm_client_CPPFLAGS = $(libnm_tests_cppflags) + libnm_tests_test_remote_settings_client_CPPFLAGS = $(libnm_tests_cppflags) + libnm_tests_test_secret_agent_CPPFLAGS = $(libnm_tests_cppflags) + ++libnm_tests_test_general_SOURCES = \ ++ libnm/tests/test-general.c ++ + libnm_tests_test_nm_client_SOURCES = \ + shared/nm-test-utils-impl.c \ + shared/nm-test-libnm-utils.h \ +@@ -983,10 +1010,14 @@ libnm_tests_test_secret_agent_SOURCES = \ + shared/nm-test-libnm-utils.h \ + libnm/tests/test-secret-agent.c + ++libnm_tests_test_general_LDADD = \ ++ libnm/libnm-utils.la \ ++ $(libnm_tests_ldadd) + libnm_tests_test_nm_client_LDADD = $(libnm_tests_ldadd) + libnm_tests_test_remote_settings_client_LDADD = $(libnm_tests_ldadd) + libnm_tests_test_secret_agent_LDADD = $(libnm_tests_ldadd) + ++$(libnm_tests_test_general_OBJECTS): $(libnm_core_lib_h_pub_mkenums) + $(libnm_tests_test_nm_client_OBJECTS): $(libnm_core_lib_h_pub_mkenums) + $(libnm_tests_test_remote_settings_client_OBJECTS): $(libnm_core_lib_h_pub_mkenums) + $(libnm_tests_test_secret_agent_OBJECTS): $(libnm_core_lib_h_pub_mkenums) +diff --git a/libnm/nm-libnm-utils.c b/libnm/nm-libnm-utils.c +new file mode 100644 +index 0000000..8cea276 +--- /dev/null ++++ b/libnm/nm-libnm-utils.c +@@ -0,0 +1,27 @@ ++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ ++/* ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ++ * Boston, MA 02110-1301 USA. ++ * ++ * Copyright 2007 - 2008 Novell, Inc. ++ * Copyright 2007 - 2017 Red Hat, Inc. ++ */ ++ ++#include "nm-default.h" ++ ++#include "nm-libnm-utils.h" ++ ++/*****************************************************************************/ ++ +diff --git a/libnm/nm-libnm-utils.h b/libnm/nm-libnm-utils.h +new file mode 100644 +index 0000000..356b2f9 +--- /dev/null ++++ b/libnm/nm-libnm-utils.h +@@ -0,0 +1,26 @@ ++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ ++/* ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ++ * Boston, MA 02110-1301 USA. ++ * ++ * Copyright 2017 Red Hat, Inc. ++ */ ++ ++#ifndef __NM_LIBNM_UTILS_H__ ++#define __NM_LIBNM_UTILS_H__ ++ ++ ++ ++#endif /* __NM_LIBNM_UTILS_H__ */ +diff --git a/libnm/tests/test-general.c b/libnm/tests/test-general.c +new file mode 100644 +index 0000000..2653cb9 +--- /dev/null ++++ b/libnm/tests/test-general.c +@@ -0,0 +1,34 @@ ++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ ++/* ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2, or (at your option) ++ * any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT SC WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Copyright 2017 Red Hat, Inc. ++ */ ++ ++#include "nm-default.h" ++ ++#include "nm-utils/nm-test-utils.h" ++ ++/*****************************************************************************/ ++ ++NMTST_DEFINE (); ++ ++int main (int argc, char **argv) ++{ ++ nmtst_init (&argc, &argv, TRUE); ++ ++ return g_test_run (); ++} +-- +2.9.4 + + +From 3ac56f2ad81a4104f0bc3b95ebcc648fe8445c1d Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Fri, 19 May 2017 10:32:13 +0200 +Subject: [PATCH 11/13] libnm: move fixup_desc_string() to nm-libnm-utils.c + +(cherry picked from commit e255ad2a03c84f806f9606b420fa12757bbd883f) +(cherry picked from commit ea0fd21428bd3b287a6537d9238a53f174c8854c) +--- + libnm/nm-device.c | 141 +-------------------------------------------- + libnm/nm-libnm-utils.c | 135 +++++++++++++++++++++++++++++++++++++++++++ + libnm/nm-libnm-utils.h | 2 +- + libnm/tests/test-general.c | 35 +++++++++++ + 4 files changed, 174 insertions(+), 139 deletions(-) + +diff --git a/libnm/nm-device.c b/libnm/nm-device.c +index 3a6052b..969d08a 100644 +--- a/libnm/nm-device.c ++++ b/libnm/nm-device.c +@@ -26,6 +26,7 @@ + #include + #include + ++#include "nm-libnm-utils.h" + #include "nm-dbus-interface.h" + #include "nm-active-connection.h" + #include "nm-device-bt.h" +@@ -1431,142 +1432,6 @@ nm_device_get_vendor (NMDevice *device) + return priv->vendor; + } + +-static char * +-fixup_desc_string (const char *desc) +-{ +- static const char *const IGNORED_PHRASES[] = { +- "Multiprotocol MAC/baseband processor", +- "Wireless LAN Controller", +- "Wireless LAN Adapter", +- "Wireless Adapter", +- "Network Connection", +- "Wireless Cardbus Adapter", +- "Wireless CardBus Adapter", +- "54 Mbps Wireless PC Card", +- "Wireless PC Card", +- "Wireless PC", +- "PC Card with XJACK(r) Antenna", +- "Wireless cardbus", +- "Wireless LAN PC Card", +- "Technology Group Ltd.", +- "Communication S.p.A.", +- "Business Mobile Networks BV", +- "Mobile Broadband Minicard Composite Device", +- "Mobile Communications AB", +- "(PC-Suite Mode)", +- }; +- static const char *const IGNORED_WORDS[] = { +- "Semiconductor", +- "Components", +- "Corporation", +- "Communications", +- "Company", +- "Corp.", +- "Corp", +- "Co.", +- "Inc.", +- "Inc", +- "Incorporated", +- "Ltd.", +- "Limited.", +- "Intel?", +- "chipset", +- "adapter", +- "[hex]", +- "NDIS", +- "Module", +- }; +- char *desc_full; +- char *p, *q; +- int i; +- +- if (!desc || !desc[0]) +- return NULL; +- +- /* restore original non-UTF-8-safe text. */ +- desc_full = nm_utils_str_utf8safe_unescape_cp (desc); +- +- /* replace all invalid UTF-8 bytes with space. */ +- p = desc_full; +- while (!g_utf8_validate (p, -1, (const char **) &q)) { +- /* the byte is invalid UTF-8. Replace it with space and proceed. */ +- *q = ' '; +- p = q + 1; +- } +- +- /* replace '_', ',', and ASCII controll characters with space. */ +- for (p = desc_full; p[0]; p++) { +- if ( NM_IN_SET (*p, '_', ',') +- || *p < ' ') +- *p = ' '; +- } +- +- /* Attempt to shorten ID by ignoring certain phrases */ +- for (i = 0; i < G_N_ELEMENTS (IGNORED_PHRASES); i++) { +- p = strstr (desc_full, IGNORED_PHRASES[i]); +- if (p) { +- const char *eow = &p[strlen (IGNORED_PHRASES[i])]; +- +- /* require that the phrase is delimited by space, or +- * at the beginning or end of the description. */ +- if ( (p == desc_full || p[-1] == ' ') +- && NM_IN_SET (eow[0], '\0', ' ')) +- memmove (p, eow, strlen (eow) + 1); /* +1 for the \0 */ +- } +- } +- +- /* Attempt to shorten ID by ignoring certain individual words. +- * - word-split the description at spaces +- * - coalesce multiple spaces +- * - skip over IGNORED_WORDS */ +- p = desc_full; +- q = desc_full; +- for (;;) { +- char *eow; +- gsize l; +- +- /* skip leading spaces. */ +- while (p[0] == ' ') +- p++; +- +- if (!p[0]) +- break; +- +- /* split leading word on first space */ +- eow = strchr (p, ' '); +- if (eow) +- *eow = '\0'; +- +- if (nm_utils_strv_find_first ((char **) IGNORED_WORDS, +- G_N_ELEMENTS (IGNORED_WORDS), +- p) >= 0) +- goto next; +- +- l = strlen (p); +- if (q != p) { +- if (q != desc_full) +- *q++ = ' '; +- memmove (q, p, l); +- } +- q += l; +- +-next: +- if (!eow) +- break; +- p = eow + 1; +- } +- +- *q++ = '\0'; +- +- if (!desc_full[0]) { +- g_free (desc_full); +- return NULL; +- } +- +- nm_assert (g_utf8_validate (desc_full, -1, NULL)); +- return desc_full; +-} +- + static void + ensure_description (NMDevice *device) + { +@@ -1574,7 +1439,7 @@ ensure_description (NMDevice *device) + GParamSpec *name_prop; + gs_free char *short_product = NULL; + +- priv->short_vendor = nm_str_realloc (fixup_desc_string (nm_device_get_vendor (device))); ++ priv->short_vendor = nm_str_realloc (nm_utils_fixup_desc_string (nm_device_get_vendor (device))); + + /* Grab device's preferred name, if any */ + name_prop = g_object_class_find_property (G_OBJECT_GET_CLASS (G_OBJECT (device)), "name"); +@@ -1586,7 +1451,7 @@ ensure_description (NMDevice *device) + } + + if ( !priv->short_vendor +- || !(short_product = fixup_desc_string (nm_device_get_product (device)))) { ++ || !(short_product = nm_utils_fixup_desc_string (nm_device_get_product (device)))) { + priv->description = g_strdup (nm_device_get_iface (device) ?: ""); + return; + } +diff --git a/libnm/nm-libnm-utils.c b/libnm/nm-libnm-utils.c +index 8cea276..fbbfe2c 100644 +--- a/libnm/nm-libnm-utils.c ++++ b/libnm/nm-libnm-utils.c +@@ -25,3 +25,138 @@ + + /*****************************************************************************/ + ++char * ++nm_utils_fixup_desc_string (const char *desc) ++{ ++ static const char *const IGNORED_PHRASES[] = { ++ "Multiprotocol MAC/baseband processor", ++ "Wireless LAN Controller", ++ "Wireless LAN Adapter", ++ "Wireless Adapter", ++ "Network Connection", ++ "Wireless Cardbus Adapter", ++ "Wireless CardBus Adapter", ++ "54 Mbps Wireless PC Card", ++ "Wireless PC Card", ++ "Wireless PC", ++ "PC Card with XJACK(r) Antenna", ++ "Wireless cardbus", ++ "Wireless LAN PC Card", ++ "Technology Group Ltd.", ++ "Communication S.p.A.", ++ "Business Mobile Networks BV", ++ "Mobile Broadband Minicard Composite Device", ++ "Mobile Communications AB", ++ "(PC-Suite Mode)", ++ }; ++ static const char *const IGNORED_WORDS[] = { ++ "Semiconductor", ++ "Components", ++ "Corporation", ++ "Communications", ++ "Company", ++ "Corp.", ++ "Corp", ++ "Co.", ++ "Inc.", ++ "Inc", ++ "Incorporated", ++ "Ltd.", ++ "Limited.", ++ "Intel?", ++ "chipset", ++ "adapter", ++ "[hex]", ++ "NDIS", ++ "Module", ++ }; ++ char *desc_full; ++ char *p, *q; ++ int i; ++ ++ if (!desc || !desc[0]) ++ return NULL; ++ ++ /* restore original non-UTF-8-safe text. */ ++ desc_full = nm_utils_str_utf8safe_unescape_cp (desc); ++ ++ /* replace all invalid UTF-8 bytes with space. */ ++ p = desc_full; ++ while (!g_utf8_validate (p, -1, (const char **) &q)) { ++ /* the byte is invalid UTF-8. Replace it with space and proceed. */ ++ *q = ' '; ++ p = q + 1; ++ } ++ ++ /* replace '_', ',', and ASCII controll characters with space. */ ++ for (p = desc_full; p[0]; p++) { ++ if ( NM_IN_SET (*p, '_', ',') ++ || *p < ' ') ++ *p = ' '; ++ } ++ ++ /* Attempt to shorten ID by ignoring certain phrases */ ++ for (i = 0; i < G_N_ELEMENTS (IGNORED_PHRASES); i++) { ++ p = strstr (desc_full, IGNORED_PHRASES[i]); ++ if (p) { ++ const char *eow = &p[strlen (IGNORED_PHRASES[i])]; ++ ++ /* require that the phrase is delimited by space, or ++ * at the beginning or end of the description. */ ++ if ( (p == desc_full || p[-1] == ' ') ++ && NM_IN_SET (eow[0], '\0', ' ')) ++ memmove (p, eow, strlen (eow) + 1); /* +1 for the \0 */ ++ } ++ } ++ ++ /* Attempt to shorten ID by ignoring certain individual words. ++ * - word-split the description at spaces ++ * - coalesce multiple spaces ++ * - skip over IGNORED_WORDS */ ++ p = desc_full; ++ q = desc_full; ++ for (;;) { ++ char *eow; ++ gsize l; ++ ++ /* skip leading spaces. */ ++ while (p[0] == ' ') ++ p++; ++ ++ if (!p[0]) ++ break; ++ ++ /* split leading word on first space */ ++ eow = strchr (p, ' '); ++ if (eow) ++ *eow = '\0'; ++ ++ if (nm_utils_strv_find_first ((char **) IGNORED_WORDS, ++ G_N_ELEMENTS (IGNORED_WORDS), ++ p) >= 0) ++ goto next; ++ ++ l = strlen (p); ++ if (q != p) { ++ if (q != desc_full) ++ *q++ = ' '; ++ memmove (q, p, l); ++ } ++ q += l; ++ ++next: ++ if (!eow) ++ break; ++ p = eow + 1; ++ } ++ ++ *q++ = '\0'; ++ ++ if (!desc_full[0]) { ++ g_free (desc_full); ++ return NULL; ++ } ++ ++ nm_assert (g_utf8_validate (desc_full, -1, NULL)); ++ return desc_full; ++} +diff --git a/libnm/nm-libnm-utils.h b/libnm/nm-libnm-utils.h +index 356b2f9..4a5a361 100644 +--- a/libnm/nm-libnm-utils.h ++++ b/libnm/nm-libnm-utils.h +@@ -21,6 +21,6 @@ + #ifndef __NM_LIBNM_UTILS_H__ + #define __NM_LIBNM_UTILS_H__ + +- ++char *nm_utils_fixup_desc_string (const char *desc); + + #endif /* __NM_LIBNM_UTILS_H__ */ +diff --git a/libnm/tests/test-general.c b/libnm/tests/test-general.c +index 2653cb9..7e0b7bb 100644 +--- a/libnm/tests/test-general.c ++++ b/libnm/tests/test-general.c +@@ -20,15 +20,50 @@ + + #include "nm-default.h" + ++#include "nm-libnm-utils.h" ++ + #include "nm-utils/nm-test-utils.h" + + /*****************************************************************************/ + ++static void ++do_test_fixup_desc_string (const char *desc, const char *expected) ++{ ++ gs_free char *result = NULL; ++ ++ result = nm_utils_fixup_desc_string (desc); ++ g_assert_cmpstr (result, ==, expected); ++} ++ ++#define do_test_fixup_desc_string_same(desc) (do_test_fixup_desc_string (""desc"", ""desc"")) ++ ++static void ++test_fixup_desc_string (void) ++{ ++ do_test_fixup_desc_string (NULL, NULL); ++ do_test_fixup_desc_string ("", NULL); ++ do_test_fixup_desc_string_same ("a"); ++ do_test_fixup_desc_string_same ("a b"); ++ do_test_fixup_desc_string ("a b ", "a b"); ++ do_test_fixup_desc_string (" a bbc ", "a bbc"); ++ do_test_fixup_desc_string (" a \xcc bbc ", "a bbc"); ++ do_test_fixup_desc_string (" a\xcc bbc ", "a bbc"); ++ do_test_fixup_desc_string (" a\xcc""bbc Wireless PC", "a bbc"); ++ do_test_fixup_desc_string (" a\xcc""bbc Wireless PC ", "a bbc"); ++ do_test_fixup_desc_string (" a\xcc""bbcWireless PC ", "a bbcWireless PC"); ++ do_test_fixup_desc_string (" a\xcc""bbc Wireless PCx", "a bbc Wireless PCx"); ++ do_test_fixup_desc_string (" a\xcc""bbc Inc Wireless PC ", "a bbc"); ++} ++ ++/*****************************************************************************/ ++ + NMTST_DEFINE (); + + int main (int argc, char **argv) + { + nmtst_init (&argc, &argv, TRUE); + ++ g_test_add_func ("/libnm/general/fixup_desc_string", test_fixup_desc_string); ++ + return g_test_run (); + } +-- +2.9.4 + + +From 1e5a95c89c35fadbefd6db21c20fcc4a7750063a Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Fri, 19 May 2017 14:13:37 +0200 +Subject: [PATCH 12/13] build: don't install intermediate library + libnm/libnm-utils.la + +Fixes: 8df944c7e495d18bfecaf9d8316ef7783039c94b +(cherry picked from commit 733160c862452721821c508465429ffbbda203ae) +(cherry picked from commit 23b5bdd8435bfaf729488e1d3d8821cce948e92e) +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index a6776e9..7ba3603 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -808,7 +808,7 @@ nodist_libnminclude_HEADERS += \ + + ############################################################################### + +-lib_LTLIBRARIES += libnm/libnm-utils.la ++noinst_LTLIBRARIES += libnm/libnm-utils.la + + libnm_libnm_utils_la_CPPFLAGS = \ + $(libnm_lib_cppflags) +-- +2.9.4 + + +From 32ec4059fd17a30003571c6d97c9859e84de92ed Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Fri, 19 May 2017 14:24:14 +0200 +Subject: [PATCH 13/13] build: don't link static libraries multiple times + +libnm-core.a should only be linked once in libnm.so. Previously, +it was linked twice, once as part of libnm-utils.a and once +directly in libnm.so. + +Fixes: 8df944c7e495d18bfecaf9d8316ef7783039c94b +(cherry picked from commit 5a67130e1548bd9314fbd007e131ef378d8b51c7) +(cherry picked from commit da2a02138dc7f0c5aff41019a0517854f379a44c) +--- + Makefile.am | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 7ba3603..909847e 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -860,8 +860,6 @@ EXTRA_libnm_libnm_la_DEPENDENCIES = \ + libnm/libnm.ver + + libnm_libnm_la_LIBADD = \ +- libnm-core/libnm-core.la \ +- introspection/libnmdbus.la \ + libnm/libnm-utils.la \ + $(DL_LIBS) \ + $(GLIB_LIBS) \ +-- +2.9.4 + diff --git a/SOURCES/0009-dbus-prop-changed-signal-source-v2-rh1371920.patch b/SOURCES/0009-dbus-prop-changed-signal-source-v2-rh1371920.patch deleted file mode 100644 index 375d224..0000000 --- a/SOURCES/0009-dbus-prop-changed-signal-source-v2-rh1371920.patch +++ /dev/null @@ -1,826 +0,0 @@ -From 2e103ea835af58659fc25149bc4b86a1dc8135f8 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Thu, 1 Sep 2016 13:00:21 +0200 -Subject: [PATCH 1/4] dbus: fix emitting D-Bus NetworkManager's old-style - PropertiesChange signal - -Before switching to gdbus (before 1.2.0), NetworkManager used dbus-glib. -Most objects in the D-Bus API with properties had a signal -NetworkManager-specific "PropertiesChanged" signal. Nowadays, this way of -handling of property changes is deprecated for the common "PropertiesChanged" -signal on the "org.freedesktop.DBus.Properties" interface. - -There were a few pecularities in 1.0.0 and earlier: - - (1) Due to the implementation with dbus-glib, a property-changed - signal was emitted on *all* interfaces. For example: - - a change on a NMDeviceVeth of "NMDeviceEthernet.HwAddress" would be - emitted both for the interfaces "fdo.NM.Device.Ethernet" and - "fdo.NM.Device.Veth". Note that NMDeviceVeth is derived from - NMDeviceEthernet and there is no "HwAddress" on veth device. - - a change of "NMVpnConnection.VpnState" was emitted on both - interfaces "fdo.NM.VPN.Connection" and "fdo.NM.Connecion.Active". - Note that NMActiveConnection is the parent type of NMVpnConnection and - only the latter has a property "VpnState". - (2) NMDevice's "fdo.NM.Device" interface doesn't have a "PropertiesChanged" - signal. From (1) follows that all property-changes for this type were instead - invoked with an interface like "fdo.NM.Device.Ethernet" (or multiple - interfaces in case of NMDeviceVeth). - -1.2.0 introduced gdbus, which gives us the standard "fdo.DBus.Properties" -signal. However, it made the mistake of not realizing (1), thus instead -of emitting the signal once for each interface, it would pick the first -one in the inheritance tree. - -With 1.4.0, a bug from merge commit 844345e caused signals for devices -to be only emitted for the interface "fdo.NM.Device.Statistics", instead -of "fdo.NM.Device.Ethernet" or "fdo.NM.Device.Veth" (or both). - -The latter is what bgo#770629 is about and what commit 82e9439 tried to fix. -However, the fix was wrong because it tried to do the theoretically correct -thing of emitting the property-changed signal exactly once for the -interface that actually ontains the property. In addition, it missed that -NMDevice doesn't have a PropertiesChanged signal, which caused signals for -"fdo.NM.Device" to get lost *sigh*. - -Now, restore the (broken) behavior of 1.0.0. These old-style property changed -signals are anyway considered deprecated and exist solely to satisfy old clients -and preserve the old API. - -Fixes: 63fbfad3705db5901e6a2a6a2fc332da0f0ae4be - -https://bugzilla.gnome.org/show_bug.cgi?id=770629 -https://bugzilla.redhat.com/show_bug.cgi?id=1371920 -(cherry picked from commit bef26a2e69f51259095fa080221db73de09fd38d) -(cherry picked from commit c29ca9b8760749ddd81b21e147c05403b9bd9561) ---- - src/nm-exported-object.c | 79 ++++++++++++++++++++++++++++++++++++++++-------- - src/nm-iface-helper.c | 14 +++++++++ - 2 files changed, 81 insertions(+), 12 deletions(-) - -diff --git a/src/nm-exported-object.c b/src/nm-exported-object.c -index d99a9ce..5dacb02 100644 ---- a/src/nm-exported-object.c -+++ b/src/nm-exported-object.c -@@ -27,6 +27,10 @@ - - #include "nm-bus-manager.h" - -+#include "nm-device.h" -+#include "nm-active-connection.h" -+#include "nmdbus-device-statistics.h" -+ - #if NM_MORE_ASSERTS >= 2 - #define _ASSERT_NO_EARLY_EXPORT - #endif -@@ -267,8 +271,8 @@ nm_exported_object_class_add_interface (NMExportedObjectClass *object_class, - nm_exported_object_class_info_quark (), classinfo); - } - -- classinfo->skeleton_types = g_slist_append (classinfo->skeleton_types, -- GSIZE_TO_POINTER (dbus_skeleton_type)); -+ classinfo->skeleton_types = g_slist_prepend (classinfo->skeleton_types, -+ GSIZE_TO_POINTER (dbus_skeleton_type)); - - /* Ensure @dbus_skeleton_type's class_init has run, so its signals/properties - * will be defined. -@@ -499,6 +503,9 @@ nm_exported_object_create_skeletons (NMExportedObject *self, - } - nm_assert (i == 0); - -+ /* The list of interfaces priv->interfaces is to be sorted from parent-class to derived-class. -+ * On the other hand, if one class defines multiple interfaces, the interfaces are sorted in -+ * the order of calls to nm_exported_object_class_add_interface(). */ - if (priv->num_interfaces > 0) { - memcpy (&interfaces[num_interfaces], priv->interfaces, sizeof (InterfaceData) * priv->num_interfaces); - g_slice_free1 (sizeof (InterfaceData) * priv->num_interfaces, priv->interfaces); -@@ -801,12 +808,11 @@ idle_emit_properties_changed (gpointer self) - if (n == 0) - continue; - -- if (!ifdata->property_changed_signal_id) -- goto next; -+ nm_assert (ifdata->property_changed_signal_id); - - /* We use here alloca in a loop, something that is usually avoided. - * But the number of interfaces "priv->num_interfaces" is small (determined by -- * the depth of the type inheritence) and the number of possible pending_notifies -+ * the depth of the type inheritance) and the number of possible pending_notifies - * "n" is small (determined by the number of GObject properties). */ - values = g_alloca (sizeof (values[0]) * n); - -@@ -834,7 +840,6 @@ idle_emit_properties_changed (gpointer self) - - g_signal_emit (ifdata->interface, ifdata->property_changed_signal_id, 0, variant); - --next: - g_hash_table_remove_all (ifdata->pending_notifies); - } - -@@ -844,15 +849,21 @@ next: - static void - nm_exported_object_notify (GObject *object, GParamSpec *pspec) - { -+ NMExportedObject *self = (NMExportedObject *) object; - NMExportedObjectPrivate *priv = NM_EXPORTED_OBJECT_GET_PRIVATE (object); - NMExportedObjectClassInfo *classinfo; - GType type; - const char *dbus_property_name = NULL; - GValue value = G_VALUE_INIT; -+ GVariant *value_variant; - InterfaceData *ifdata = NULL; - const GVariantType *vtype; - guint i, j; - -+ /* Hook to emit deprecated "PropertiesChanged" signal on NetworkManager interfaces. -+ * This is to preserve deprecated D-Bus API, nowadays we use instead -+ * the "PropertiesChanged" signal of "org.freedesktop.DBus.Properties". */ -+ - if (priv->num_interfaces == 0) - return; - -@@ -888,14 +899,58 @@ nm_exported_object_notify (GObject *object, GParamSpec *pspec) - vtype_found: - g_value_init (&value, pspec->value_type); - g_object_get_property (G_OBJECT (object), pspec->name, &value); -- -- /* @dbus_property_name is inside classinfo and never freed, thus we don't clone it. -- * Also, we do a pointer, not string comparison. */ -- g_hash_table_insert (ifdata->pending_notifies, -- (gpointer) dbus_property_name, -- g_dbus_gvalue_to_gvariant (&value, vtype)); -+ value_variant = g_dbus_gvalue_to_gvariant (&value, vtype); - g_value_unset (&value); - -+ if ( ( NM_IS_DEVICE (self) -+ && !NMDBUS_IS_DEVICE_STATISTICS_SKELETON (ifdata->interface)) -+ || NM_IS_ACTIVE_CONNECTION (self)) { -+ /* This PropertiesChanged signal is nodaways deprecated in favor -+ * of "org.freedesktop.DBus.Properties"'s PropertiesChanged signal. -+ * This function solely exists to raise the NM version of PropertiesChanged. -+ * -+ * With types exported on D-Bus that are implemented as derived -+ * types in glib (NMDevice and NMActiveConnection), multiple types -+ * in the inheritance tree define a "PropertiesChanged" signal. -+ * -+ * In 1.0.0 and earlier, the signal was emitted once for every interface -+ * that had a "PropertiesChanged" signal. For example: -+ * - NMDeviceEthernet.HwAddress was emitted on "fdo.NM.Device.Ethernet" -+ * and "fdo.NM.Device.Veth" (if the device was of type NMDeviceVeth). -+ * - NMVpnConnection.VpnState was emitted on "fdo.NM.Connecion.Active" -+ * and "fdo.NM.VPN.Connection". -+ * -+ * NMDevice is special in that it didn't have a "PropertiesChanged" signal. -+ * Thus, a change to "NMDevice.StateReason" would be emitted on "fdo.NM.Device.Ethernet" -+ * and also on "fdo.NM.Device.Veth" (in case of a device of type NMDeviceVeth). -+ * -+ * The releases of 1.2.0 and 1.4.0 failed to realize above and broke this behavior. -+ * This special handling here is to bring back the 1.0.0 behavior. -+ * -+ * The Device.Statistics signal is special, because it was only added with 1.4.0 -+ * and didn't have above behavior. So let's save the overhead of emitting multiple -+ * deprecated signals for wrong interfaces. */ -+ for (i = 0, j = 0; i < priv->num_interfaces; i++) { -+ ifdata = &priv->interfaces[i]; -+ if ( ifdata->property_changed_signal_id -+ && !NMDBUS_IS_DEVICE_STATISTICS_SKELETON (ifdata->interface)) { -+ j++; -+ g_hash_table_insert (ifdata->pending_notifies, -+ (gpointer) dbus_property_name, -+ g_variant_ref (value_variant)); -+ } -+ } -+ nm_assert (j > 0); -+ g_variant_unref (value_variant); -+ } else if (ifdata->property_changed_signal_id) { -+ /* @dbus_property_name is inside classinfo and never freed, thus we don't clone it. -+ * Also, we do a pointer, not string comparison. */ -+ g_hash_table_insert (ifdata->pending_notifies, -+ (gpointer) dbus_property_name, -+ value_variant); -+ } else -+ nm_assert_not_reached (); -+ - if (!priv->notify_idle_id) - priv->notify_idle_id = g_idle_add (idle_emit_properties_changed, object); - } -diff --git a/src/nm-iface-helper.c b/src/nm-iface-helper.c -index 49672cf..de035f1 100644 ---- a/src/nm-iface-helper.c -+++ b/src/nm-iface-helper.c -@@ -534,6 +534,8 @@ gboolean nm_config_get_configure_and_quit (gpointer unused); - gconstpointer nm_bus_manager_get (void); - void nm_bus_manager_register_object (gpointer unused, gpointer object); - void nm_bus_manager_unregister_object (gpointer unused, gpointer object); -+GType nm_device_get_type (void); -+GType nm_active_connection_get_type (void); - - gconstpointer - nm_config_get (void) -@@ -569,3 +571,15 @@ nm_bus_manager_unregister_object (gpointer unused, gpointer object) - { - } - -+GType -+nm_device_get_type (void) -+{ -+ g_return_val_if_reached (0); -+} -+ -+GType -+nm_active_connection_get_type (void) -+{ -+ g_return_val_if_reached (0); -+} -+ --- -2.7.4 - - -From fcb1e69eafec59571ead5d771f89f7fa86dbb953 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Thu, 1 Sep 2016 13:38:20 +0200 -Subject: [PATCH 2/4] dbus: deprecated NM specific PropertiesChanged signals - -Nowadays, users should use the standard "PropertiesChanged" signal -on "org.freedesktop.DBus.Properties" interface. - -(cherry picked from commit 6fb917178aa19c61e909957f5146aa4565e0cb2f) -(cherry picked from commit 98773bff54970db7e481a5f07fdcb11a4068a2b3) ---- - introspection/nm-access-point.xml | 2 ++ - introspection/nm-active-connection.xml | 2 ++ - introspection/nm-checkpoint.xml | 2 ++ - introspection/nm-device-adsl.xml | 2 ++ - introspection/nm-device-bond.xml | 2 ++ - introspection/nm-device-bridge.xml | 2 ++ - introspection/nm-device-bt.xml | 2 ++ - introspection/nm-device-ethernet.xml | 2 ++ - introspection/nm-device-generic.xml | 2 ++ - introspection/nm-device-infiniband.xml | 2 ++ - introspection/nm-device-ip-tunnel.xml | 2 ++ - introspection/nm-device-macvlan.xml | 2 ++ - introspection/nm-device-modem.xml | 2 ++ - introspection/nm-device-olpc-mesh.xml | 2 +- - introspection/nm-device-statistics.xml | 2 ++ - introspection/nm-device-team.xml | 2 ++ - introspection/nm-device-tun.xml | 2 ++ - introspection/nm-device-veth.xml | 2 ++ - introspection/nm-device-vlan.xml | 2 ++ - introspection/nm-device-vxlan.xml | 2 ++ - introspection/nm-device-wifi.xml | 4 ++-- - introspection/nm-device-wimax.xml | 2 +- - introspection/nm-dhcp4-config.xml | 2 ++ - introspection/nm-dhcp6-config.xml | 2 ++ - introspection/nm-ip4-config.xml | 2 ++ - introspection/nm-ip6-config.xml | 2 ++ - introspection/nm-manager.xml | 2 +- - introspection/nm-settings-connection.xml | 2 ++ - introspection/nm-settings.xml | 2 ++ - introspection/nm-vpn-connection.xml | 2 ++ - introspection/nm-wimax-nsp.xml | 2 ++ - 31 files changed, 59 insertions(+), 5 deletions(-) - -diff --git a/introspection/nm-access-point.xml b/introspection/nm-access-point.xml -index 0c1ebf2..617c867 100644 ---- a/introspection/nm-access-point.xml -+++ b/introspection/nm-access-point.xml -@@ -93,6 +93,8 @@ - - - -diff --git a/introspection/nm-active-connection.xml b/introspection/nm-active-connection.xml -index a4e9417..383ede3 100644 ---- a/introspection/nm-active-connection.xml -+++ b/introspection/nm-active-connection.xml -@@ -148,6 +148,8 @@ - - - -diff --git a/introspection/nm-checkpoint.xml b/introspection/nm-checkpoint.xml -index d0fbda8..1c5050f 100644 ---- a/introspection/nm-checkpoint.xml -+++ b/introspection/nm-checkpoint.xml -@@ -34,6 +34,8 @@ - - - -diff --git a/introspection/nm-device-adsl.xml b/introspection/nm-device-adsl.xml -index 5ad397e..0986f06 100644 ---- a/introspection/nm-device-adsl.xml -+++ b/introspection/nm-device-adsl.xml -@@ -5,6 +5,8 @@ - - - -diff --git a/introspection/nm-device-bond.xml b/introspection/nm-device-bond.xml -index fc0249d..e6288a1 100644 ---- a/introspection/nm-device-bond.xml -+++ b/introspection/nm-device-bond.xml -@@ -28,6 +28,8 @@ - - - -diff --git a/introspection/nm-device-bridge.xml b/introspection/nm-device-bridge.xml -index c2e8ffd..a6c5710 100644 ---- a/introspection/nm-device-bridge.xml -+++ b/introspection/nm-device-bridge.xml -@@ -28,6 +28,8 @@ - - - -diff --git a/introspection/nm-device-bt.xml b/introspection/nm-device-bt.xml -index 6249085..f891220 100644 ---- a/introspection/nm-device-bt.xml -+++ b/introspection/nm-device-bt.xml -@@ -28,6 +28,8 @@ - - - -diff --git a/introspection/nm-device-ethernet.xml b/introspection/nm-device-ethernet.xml -index ddfa74b..3aa4540 100644 ---- a/introspection/nm-device-ethernet.xml -+++ b/introspection/nm-device-ethernet.xml -@@ -42,6 +42,8 @@ - - - -diff --git a/introspection/nm-device-generic.xml b/introspection/nm-device-generic.xml -index e79ff70..39aafc2 100644 ---- a/introspection/nm-device-generic.xml -+++ b/introspection/nm-device-generic.xml -@@ -19,6 +19,8 @@ - - - -diff --git a/introspection/nm-device-infiniband.xml b/introspection/nm-device-infiniband.xml -index 9848a07..34b5fad 100644 ---- a/introspection/nm-device-infiniband.xml -+++ b/introspection/nm-device-infiniband.xml -@@ -20,6 +20,8 @@ - - - -diff --git a/introspection/nm-device-ip-tunnel.xml b/introspection/nm-device-ip-tunnel.xml -index 45f3a3f..dda71e3 100644 ---- a/introspection/nm-device-ip-tunnel.xml -+++ b/introspection/nm-device-ip-tunnel.xml -@@ -86,6 +86,8 @@ - - - -diff --git a/introspection/nm-device-macvlan.xml b/introspection/nm-device-macvlan.xml -index 876b685..e0b58ba 100644 ---- a/introspection/nm-device-macvlan.xml -+++ b/introspection/nm-device-macvlan.xml -@@ -33,6 +33,8 @@ - - - -diff --git a/introspection/nm-device-modem.xml b/introspection/nm-device-modem.xml -index 1d4bd65..29eff68 100644 ---- a/introspection/nm-device-modem.xml -+++ b/introspection/nm-device-modem.xml -@@ -5,6 +5,8 @@ - - - -diff --git a/introspection/nm-device-olpc-mesh.xml b/introspection/nm-device-olpc-mesh.xml -index b2ab126..3d6162f 100644 ---- a/introspection/nm-device-olpc-mesh.xml -+++ b/introspection/nm-device-olpc-mesh.xml -@@ -27,7 +27,7 @@ - PropertiesChanged: - @properties: A dictionary containing the FIXME: check changed parameters. - -- Emitted when the wireless device's properties changed. -+ DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0. - --> - - -diff --git a/introspection/nm-device-statistics.xml b/introspection/nm-device-statistics.xml -index bdb19c8..84c3b6f 100644 ---- a/introspection/nm-device-statistics.xml -+++ b/introspection/nm-device-statistics.xml -@@ -29,6 +29,8 @@ - - - -diff --git a/introspection/nm-device-team.xml b/introspection/nm-device-team.xml -index 64faaec..c7b50a3 100644 ---- a/introspection/nm-device-team.xml -+++ b/introspection/nm-device-team.xml -@@ -35,6 +35,8 @@ - - - -diff --git a/introspection/nm-device-tun.xml b/introspection/nm-device-tun.xml -index a11461c..68167cc 100644 ---- a/introspection/nm-device-tun.xml -+++ b/introspection/nm-device-tun.xml -@@ -57,6 +57,8 @@ - - - -diff --git a/introspection/nm-device-veth.xml b/introspection/nm-device-veth.xml -index b064874..93c7c87 100644 ---- a/introspection/nm-device-veth.xml -+++ b/introspection/nm-device-veth.xml -@@ -12,6 +12,8 @@ - - - -diff --git a/introspection/nm-device-vlan.xml b/introspection/nm-device-vlan.xml -index 7d8fbdc..e5bf7c4 100644 ---- a/introspection/nm-device-vlan.xml -+++ b/introspection/nm-device-vlan.xml -@@ -34,6 +34,8 @@ - - - -diff --git a/introspection/nm-device-vxlan.xml b/introspection/nm-device-vxlan.xml -index ec17717..8eae63c 100644 ---- a/introspection/nm-device-vxlan.xml -+++ b/introspection/nm-device-vxlan.xml -@@ -131,6 +131,8 @@ - - - -diff --git a/introspection/nm-device-wifi.xml b/introspection/nm-device-wifi.xml -index c1f378d..1973b41 100644 ---- a/introspection/nm-device-wifi.xml -+++ b/introspection/nm-device-wifi.xml -@@ -93,9 +93,9 @@ - - - - -diff --git a/introspection/nm-device-wimax.xml b/introspection/nm-device-wimax.xml -index 02539db..844856c 100644 ---- a/introspection/nm-device-wimax.xml -+++ b/introspection/nm-device-wimax.xml -@@ -83,7 +83,7 @@ - PropertiesChanged: - @properties: A dictionary mapping property names to variant boxed values. - -- Emitted when the WiMax device's properties changed. -+ DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0. - --> - - -diff --git a/introspection/nm-dhcp4-config.xml b/introspection/nm-dhcp4-config.xml -index e9363f9..5244bca 100644 ---- a/introspection/nm-dhcp4-config.xml -+++ b/introspection/nm-dhcp4-config.xml -@@ -19,6 +19,8 @@ - - - -diff --git a/introspection/nm-dhcp6-config.xml b/introspection/nm-dhcp6-config.xml -index 7ecdf35..09e2ca8 100644 ---- a/introspection/nm-dhcp6-config.xml -+++ b/introspection/nm-dhcp6-config.xml -@@ -19,6 +19,8 @@ - - - -diff --git a/introspection/nm-ip4-config.xml b/introspection/nm-ip4-config.xml -index bbe7beb..17f57bc 100644 ---- a/introspection/nm-ip4-config.xml -+++ b/introspection/nm-ip4-config.xml -@@ -94,6 +94,8 @@ - - - -diff --git a/introspection/nm-ip6-config.xml b/introspection/nm-ip6-config.xml -index a58bfff..e5cab71 100644 ---- a/introspection/nm-ip6-config.xml -+++ b/introspection/nm-ip6-config.xml -@@ -86,6 +86,8 @@ - - - -diff --git a/introspection/nm-manager.xml b/introspection/nm-manager.xml -index 95cc16c..55d9dd2 100644 ---- a/introspection/nm-manager.xml -+++ b/introspection/nm-manager.xml -@@ -425,7 +425,7 @@ - PropertiesChanged: - @properties: The changed properties. - -- NetworkManager's properties changed. -+ DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0. - --> - - -diff --git a/introspection/nm-settings-connection.xml b/introspection/nm-settings-connection.xml -index 15b3803..cf33120 100644 ---- a/introspection/nm-settings-connection.xml -+++ b/introspection/nm-settings-connection.xml -@@ -123,6 +123,8 @@ - - - -diff --git a/introspection/nm-settings.xml b/introspection/nm-settings.xml -index 7f5b546..32675e0 100644 ---- a/introspection/nm-settings.xml -+++ b/introspection/nm-settings.xml -@@ -131,6 +131,8 @@ - - - -diff --git a/introspection/nm-vpn-connection.xml b/introspection/nm-vpn-connection.xml -index 430998f..897cea0 100644 ---- a/introspection/nm-vpn-connection.xml -+++ b/introspection/nm-vpn-connection.xml -@@ -12,6 +12,8 @@ - - - -diff --git a/introspection/nm-wimax-nsp.xml b/introspection/nm-wimax-nsp.xml -index 8b9a2fc..a766927 100644 ---- a/introspection/nm-wimax-nsp.xml -+++ b/introspection/nm-wimax-nsp.xml -@@ -28,6 +28,8 @@ - - - --- -2.7.4 - - -From b35b20aa1fe45cc62e3deb29b7d3b066cc79608a Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Thu, 1 Sep 2016 15:05:03 +0200 -Subject: [PATCH 3/4] exported-object: use @self variable instead of @object - -(cherry picked from commit b9c1868b451eb7ef92e6924ee8d3dcca0397865d) -(cherry picked from commit 7220d469bee845db63658acde49eed3b00954c58) ---- - src/nm-exported-object.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/src/nm-exported-object.c b/src/nm-exported-object.c -index 5dacb02..c05161e 100644 ---- a/src/nm-exported-object.c -+++ b/src/nm-exported-object.c -@@ -850,7 +850,7 @@ static void - nm_exported_object_notify (GObject *object, GParamSpec *pspec) - { - NMExportedObject *self = (NMExportedObject *) object; -- NMExportedObjectPrivate *priv = NM_EXPORTED_OBJECT_GET_PRIVATE (object); -+ NMExportedObjectPrivate *priv = NM_EXPORTED_OBJECT_GET_PRIVATE (self); - NMExportedObjectClassInfo *classinfo; - GType type; - const char *dbus_property_name = NULL; -@@ -867,7 +867,7 @@ nm_exported_object_notify (GObject *object, GParamSpec *pspec) - if (priv->num_interfaces == 0) - return; - -- for (type = G_OBJECT_TYPE (object); type; type = g_type_parent (type)) { -+ for (type = G_OBJECT_TYPE (self); type; type = g_type_parent (type)) { - classinfo = g_type_get_qdata (type, nm_exported_object_class_info_quark ()); - if (!classinfo) - continue; -@@ -878,7 +878,7 @@ nm_exported_object_notify (GObject *object, GParamSpec *pspec) - } - if (!dbus_property_name) { - nm_log_trace (LOGD_DBUS_PROPS, "properties-changed[%p]: ignoring notification for prop %s on type %s", -- object, pspec->name, G_OBJECT_TYPE_NAME (object)); -+ self, pspec->name, G_OBJECT_TYPE_NAME (self)); - return; - } - -@@ -898,7 +898,7 @@ nm_exported_object_notify (GObject *object, GParamSpec *pspec) - - vtype_found: - g_value_init (&value, pspec->value_type); -- g_object_get_property (G_OBJECT (object), pspec->name, &value); -+ g_object_get_property ((GObject *) self, pspec->name, &value); - value_variant = g_dbus_gvalue_to_gvariant (&value, vtype); - g_value_unset (&value); - -@@ -952,7 +952,7 @@ vtype_found: - nm_assert_not_reached (); - - if (!priv->notify_idle_id) -- priv->notify_idle_id = g_idle_add (idle_emit_properties_changed, object); -+ priv->notify_idle_id = g_idle_add (idle_emit_properties_changed, self); - } - - /*****************************************************************************/ --- -2.7.4 - - -From bcb05b5eab46b31dea5c3067df1a2cc078a2eb32 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Thu, 1 Sep 2016 15:09:01 +0200 -Subject: [PATCH 4/4] exported-object: use _NMLOG2() macro for logging - property-changed signal - -(cherry picked from commit ba713e8381ee8276bee998b6ecaf263558fd6a4f) -(cherry picked from commit db4375277cc1611483ff53b16f016637467571b4) ---- - src/nm-exported-object.c | 23 ++++++++++++++++------- - 1 file changed, 16 insertions(+), 7 deletions(-) - -diff --git a/src/nm-exported-object.c b/src/nm-exported-object.c -index c05161e..32b5ec0 100644 ---- a/src/nm-exported-object.c -+++ b/src/nm-exported-object.c -@@ -76,11 +76,20 @@ G_DEFINE_QUARK (NMExportedObjectClassInfo, nm_exported_object_class_info) - #define _NMLOG_DOMAIN LOGD_CORE - - #define _NMLOG(level, ...) \ -- nm_log (level, _NMLOG_DOMAIN, \ -+ nm_log ((level), _NMLOG_DOMAIN, \ - "%s[%p]: " _NM_UTILS_MACRO_FIRST (__VA_ARGS__), \ - _NMLOG_PREFIX_NAME, (self) \ - _NM_UTILS_MACRO_REST (__VA_ARGS__)) - -+#define _NMLOG2_PREFIX_NAME "properties-changed" -+#define _NMLOG2_DOMAIN LOGD_DBUS_PROPS -+ -+#define _NMLOG2(level, ...) \ -+ nm_log ((level), _NMLOG2_DOMAIN, \ -+ "%s[%p]: " _NM_UTILS_MACRO_FIRST (__VA_ARGS__), \ -+ _NMLOG2_PREFIX_NAME, (self) \ -+ _NM_UTILS_MACRO_REST (__VA_ARGS__)) -+ - /*****************************************************************************/ - - /* "AddConnectionUnsaved" -> "handle-add-connection-unsaved" */ -@@ -830,12 +839,12 @@ idle_emit_properties_changed (gpointer self) - variant = g_variant_ref_sink (g_variant_builder_end (¬ifies)); - - -- if (nm_logging_enabled (LOGL_DEBUG, LOGD_DBUS_PROPS)) { -+ if (_LOG2D_ENABLED ()) { - gs_free char *notification = g_variant_print (variant, TRUE); - -- nm_log_dbg (LOGD_DBUS_PROPS, "properties-changed[%p]: type %s, iface %s: %s", -- self, G_OBJECT_TYPE_NAME (self), G_OBJECT_TYPE_NAME (ifdata->interface), -- notification); -+ _LOG2D ("type %s, iface %s: %s", -+ G_OBJECT_TYPE_NAME (self), G_OBJECT_TYPE_NAME (ifdata->interface), -+ notification); - } - - g_signal_emit (ifdata->interface, ifdata->property_changed_signal_id, 0, variant); -@@ -877,8 +886,8 @@ nm_exported_object_notify (GObject *object, GParamSpec *pspec) - break; - } - if (!dbus_property_name) { -- nm_log_trace (LOGD_DBUS_PROPS, "properties-changed[%p]: ignoring notification for prop %s on type %s", -- self, pspec->name, G_OBJECT_TYPE_NAME (self)); -+ _LOG2T ("ignoring notification for prop %s on type %s", -+ pspec->name, G_OBJECT_TYPE_NAME (self)); - return; - } - --- -2.7.4 - diff --git a/SOURCES/0009-ifcfg-rh-fix-null-next-hop.patch b/SOURCES/0009-ifcfg-rh-fix-null-next-hop.patch new file mode 100644 index 0000000..8210672 --- /dev/null +++ b/SOURCES/0009-ifcfg-rh-fix-null-next-hop.patch @@ -0,0 +1,140 @@ +From a3d2153b90f3f56f1548d01be674a0ab5e82e6b7 Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Fri, 19 May 2017 16:18:55 +0200 +Subject: [PATCH] ifcfg-rh: omit empty next hop for routes in legacy format + +Don't add "via (null)" if the next hop is missing. + +https://bugzilla.redhat.com/show_bug.cgi?id=1452648 +(cherry picked from commit af8aac9b544cb64df3b77a413dfded23e976d1b0) +(cherry picked from commit cb5ba08f00691b18d272bfb08e4929d00fa246bb) +--- + .../plugins/ifcfg-rh/nms-ifcfg-rh-writer.c | 77 ++++++++++------------ + 1 file changed, 36 insertions(+), 41 deletions(-) + +diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c +index d6f33c4..400e9bd 100644 +--- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c ++++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c +@@ -1926,12 +1926,8 @@ get_route_attributes_string (NMIPRoute *route, int family) + static gboolean + write_route_file_legacy (const char *filename, NMSettingIPConfig *s_ip4, GError **error) + { +- const char *dest, *next_hop; +- char **route_items; +- gs_free char *route_contents = NULL; ++ nm_auto_free_gstring GString *contents = NULL; + NMIPRoute *route; +- guint32 prefix; +- gint64 metric; + guint32 i, num; + + g_return_val_if_fail (filename != NULL, FALSE); +@@ -1945,36 +1941,34 @@ write_route_file_legacy (const char *filename, NMSettingIPConfig *s_ip4, GError + return TRUE; + } + +- route_items = g_malloc0 (sizeof (char *) * (num + 1)); ++ contents = g_string_new (""); ++ + for (i = 0; i < num; i++) { ++ const char *next_hop; + gs_free char *options = NULL; ++ gint64 metric; + + route = nm_setting_ip_config_get_route (s_ip4, i); +- +- dest = nm_ip_route_get_dest (route); +- prefix = nm_ip_route_get_prefix (route); + next_hop = nm_ip_route_get_next_hop (route); + metric = nm_ip_route_get_metric (route); +- + options = get_route_attributes_string (route, AF_INET); + +- if (metric == -1) { +- route_items[i] = g_strdup_printf ("%s/%u via %s%s%s\n", +- dest, prefix, next_hop, +- options ? " " : "", +- options ?: ""); +- } else { +- route_items[i] = g_strdup_printf ("%s/%u via %s metric %u%s%s\n", +- dest, prefix, next_hop, (guint32) metric, +- options ? " " : "", +- options ?: ""); ++ g_string_append_printf (contents, "%s/%u", ++ nm_ip_route_get_dest (route), ++ nm_ip_route_get_prefix (route)); ++ if (next_hop) ++ g_string_append_printf (contents, " via %s", next_hop); ++ if (metric >= 0) ++ g_string_append_printf (contents, " metric %u", (guint) metric); ++ if (options) { ++ g_string_append_c (contents, ' '); ++ g_string_append (contents, options); + } ++ ++ g_string_append_c (contents, '\n'); + } +- route_items[num] = NULL; +- route_contents = g_strjoinv (NULL, route_items); +- g_strfreev (route_items); + +- if (!g_file_set_contents (filename, route_contents, -1, NULL)) { ++ if (!g_file_set_contents (filename, contents->str, contents->len, NULL)) { + g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_FAILED, + "Writing route file '%s' failed", filename); + return FALSE; +@@ -2492,32 +2486,33 @@ write_route6_file (const char *filename, NMSettingIPConfig *s_ip6, GError **erro + } + + contents = g_string_new (""); ++ + for (i = 0; i < num; i++) { + gs_free char *options = NULL; ++ const char *next_hop; ++ gint64 metric; + + route = nm_setting_ip_config_get_route (s_ip6, i); ++ next_hop = nm_ip_route_get_next_hop (route); ++ metric = nm_ip_route_get_metric (route); + options = get_route_attributes_string (route, AF_INET6); + +- if (nm_ip_route_get_metric (route) == -1) { +- g_string_append_printf (contents, "%s/%u via %s%s%s", +- nm_ip_route_get_dest (route), +- nm_ip_route_get_prefix (route), +- nm_ip_route_get_next_hop (route), +- options ? " " : "", +- options ?: ""); +- } else { +- g_string_append_printf (contents, "%s/%u via %s metric %u%s%s", +- nm_ip_route_get_dest (route), +- nm_ip_route_get_prefix (route), +- nm_ip_route_get_next_hop (route), +- (unsigned) nm_ip_route_get_metric (route), +- options ? " " : "", +- options ?: ""); ++ g_string_append_printf (contents, "%s/%u", ++ nm_ip_route_get_dest (route), ++ nm_ip_route_get_prefix (route)); ++ if (next_hop) ++ g_string_append_printf (contents, " via %s", next_hop); ++ if (metric >= 0) ++ g_string_append_printf (contents, " metric %u", (guint) metric); ++ if (options) { ++ g_string_append_c (contents, ' '); ++ g_string_append (contents, options); + } +- g_string_append (contents, "\n"); ++ ++ g_string_append_c (contents, '\n'); + } + +- if (!g_file_set_contents (filename, contents->str, -1, NULL)) { ++ if (!g_file_set_contents (filename, contents->str, contents->len, NULL)) { + g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_FAILED, + "Writing route6 file '%s' failed", filename); + return FALSE; +-- +2.9.3 + diff --git a/SOURCES/0010-bluetooth-nap-crash-rh1454385.patch b/SOURCES/0010-bluetooth-nap-crash-rh1454385.patch new file mode 100644 index 0000000..5234d1d --- /dev/null +++ b/SOURCES/0010-bluetooth-nap-crash-rh1454385.patch @@ -0,0 +1,61 @@ +From 7851f1c5958599bfe38beac806cec1f42f1ba114 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Tue, 23 May 2017 11:28:08 +0200 +Subject: [PATCH] bluetooth: unhook adapter properties callback when the + adapter vanishes + +https://bugzilla.redhat.com/show_bug.cgi?id=1454654 +(cherry picked from commit 0aa2e0bad31d7102034952cf95b6d43829c91d30) +--- + src/devices/bluetooth/nm-bluez-device.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/devices/bluetooth/nm-bluez-device.c b/src/devices/bluetooth/nm-bluez-device.c +index ebfa0d647..41ef74cae 100644 +--- a/src/devices/bluetooth/nm-bluez-device.c ++++ b/src/devices/bluetooth/nm-bluez-device.c +@@ -1187,7 +1187,11 @@ dispose (GObject *object) + g_slist_free_full (priv->connections, g_object_unref); + priv->connections = NULL; + +- g_clear_object (&priv->adapter5); ++ if (priv->adapter5) { ++ g_signal_handlers_disconnect_by_func (priv->adapter5, adapter5_on_properties_changed, self); ++ g_clear_object (&priv->adapter5); ++ } ++ + g_clear_object (&priv->dbus_connection); + + G_OBJECT_CLASS (nm_bluez_device_parent_class)->dispose (object); +-- +2.13.0 + +From 30d06b2253b7277ed1153bcbbc81f9e1ca3e3474 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Mon, 22 May 2017 17:04:48 +0200 +Subject: [PATCH] device: capture the IP6 configuration on the IP interface + +Fixes a crash with Bluetooth devices where the device is the BlueZ +device and iface stays 0 while the IP interface is the actual BNEP link. + +https://bugzilla.gnome.org/show_bug.cgi?id=782545 +--- + src/devices/nm-device.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index ed6aa0e16..8473364a3 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -7702,7 +7702,7 @@ act_stage3_ip6_config_start (NMDevice *self, + nm_platform_process_events (nm_device_get_platform (self)); + g_clear_object (&priv->ext_ip6_config_captured); + priv->ext_ip6_config_captured = nm_ip6_config_capture (nm_device_get_platform (self), +- nm_device_get_ifindex (self), ++ nm_device_get_ip_ifindex (self), + FALSE, + NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN); + +-- +2.13.0 + diff --git a/SOURCES/0010-empty-cloned-mac-addr-rh1372799.patch b/SOURCES/0010-empty-cloned-mac-addr-rh1372799.patch deleted file mode 100644 index 1e59c40..0000000 --- a/SOURCES/0010-empty-cloned-mac-addr-rh1372799.patch +++ /dev/null @@ -1,212 +0,0 @@ -From dfb7062565889a716b727909e0ab0c8b0e580b42 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Fri, 2 Sep 2016 14:58:56 +0200 -Subject: [PATCH 1/3] shared: add helper macros nm_str_not_empty() and - nm_strdup_not_empty() - -(cherry picked from commit 3227b9017bbfa9e8339d32924aa4e73bcd8a75ce) -(cherry picked from commit 4aad70a61d0ed00ed0e3181a86376a93592ce753) ---- - shared/nm-utils/nm-macros-internal.h | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -diff --git a/shared/nm-utils/nm-macros-internal.h b/shared/nm-utils/nm-macros-internal.h -index 73075c6..c66cb53 100644 ---- a/shared/nm-utils/nm-macros-internal.h -+++ b/shared/nm-utils/nm-macros-internal.h -@@ -302,6 +302,22 @@ _NM_IN_STRSET_streq (const char *x, const char *s) - - /*****************************************************************************/ - -+#define nm_str_not_empty(str) \ -+ ({ \ -+ /* implemented as macro to preserve constness */ \ -+ typeof (str) __str = (str); \ -+ _nm_unused const char *__str_type_check = __str; \ -+ ((__str && __str[0]) ? __str : ((char *) NULL)); \ -+ }) -+ -+static inline char * -+nm_strdup_not_empty (const char *str) -+{ -+ return str && str[0] ? g_strdup (str) : NULL; -+} -+ -+/*****************************************************************************/ -+ - #define NM_PRINT_FMT_QUOTED(cond, prefix, str, suffix, str_else) \ - (cond) ? (prefix) : "", \ - (cond) ? (str) : (str_else), \ --- -2.7.4 - - -From 5a4ac7613ed28cd692372879d0058e6063e28ffe Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Fri, 2 Sep 2016 15:06:24 +0200 -Subject: [PATCH 2/3] libnm-core: replace local helper with - nm_stdup_not_empty() - -(cherry picked from commit f4d7db964e735480e97b9d3ae53bc4fb95442a47) -(cherry picked from commit 1fdf026e2d564cd51b0f0de8c01ef86bc4fbfe50) ---- - libnm-core/nm-setting-8021x.c | 17 ++++------------- - 1 file changed, 4 insertions(+), 13 deletions(-) - -diff --git a/libnm-core/nm-setting-8021x.c b/libnm-core/nm-setting-8021x.c -index aa9d461..12dc5a6 100644 ---- a/libnm-core/nm-setting-8021x.c -+++ b/libnm-core/nm-setting-8021x.c -@@ -2915,15 +2915,6 @@ set_cert_prop_helper (const GValue *value, const char *prop_name, GError **error - return bytes; - } - --static char * --_g_value_dup_string_not_empty (const GValue *value) --{ -- const gchar *str; -- -- str = g_value_get_string (value); -- return str && str[0] ? g_strdup (str) : NULL; --} -- - static void - set_property (GObject *object, guint prop_id, - const GValue *value, GParamSpec *pspec) -@@ -2964,7 +2955,7 @@ set_property (GObject *object, guint prop_id, - break; - case PROP_SUBJECT_MATCH: - g_free (priv->subject_match); -- priv->subject_match = _g_value_dup_string_not_empty (value); -+ priv->subject_match = nm_strdup_not_empty (g_value_get_string (value)); - break; - case PROP_ALTSUBJECT_MATCHES: - g_slist_free_full (priv->altsubject_matches, g_free); -@@ -2972,7 +2963,7 @@ set_property (GObject *object, guint prop_id, - break; - case PROP_DOMAIN_SUFFIX_MATCH: - g_free (priv->domain_suffix_match); -- priv->domain_suffix_match = _g_value_dup_string_not_empty (value); -+ priv->domain_suffix_match = nm_strdup_not_empty (g_value_get_string (value)); - break; - case PROP_CLIENT_CERT: - if (priv->client_cert) -@@ -3018,7 +3009,7 @@ set_property (GObject *object, guint prop_id, - break; - case PROP_PHASE2_SUBJECT_MATCH: - g_free (priv->phase2_subject_match); -- priv->phase2_subject_match = _g_value_dup_string_not_empty (value); -+ priv->phase2_subject_match = nm_strdup_not_empty (g_value_get_string (value)); - break; - case PROP_PHASE2_ALTSUBJECT_MATCHES: - g_slist_free_full (priv->phase2_altsubject_matches, g_free); -@@ -3026,7 +3017,7 @@ set_property (GObject *object, guint prop_id, - break; - case PROP_PHASE2_DOMAIN_SUFFIX_MATCH: - g_free (priv->phase2_domain_suffix_match); -- priv->phase2_domain_suffix_match = _g_value_dup_string_not_empty (value); -+ priv->phase2_domain_suffix_match = nm_strdup_not_empty (g_value_get_string (value)); - break; - case PROP_PHASE2_CLIENT_CERT: - if (priv->phase2_client_cert) --- -2.7.4 - - -From 9d5f6a51ed94c035a2da5c47bf3a11d9b61ac7d4 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Fri, 2 Sep 2016 15:00:08 +0200 -Subject: [PATCH 3/3] libnm: fix regression serializing empty - "cloned-mac-address" - -For "cloned-mac-address", the empty string "" is an invalid -value that is rejected by verify(). - -Commit 8eed671 changed how the property is serialized to D-Bus. -Before, it was serialized using _nm_utils_hwaddr_to_dbus(). -For invalid or empty addresses, this would not serialize the -value on D-Bus (or before commit 76aa6f8e0, it would create -a bogus value with no array elements). - -With commit 8eed671, the cloned-mac-address gets also serialized -as "assigned-mac-address" via _nm_utils_hwaddr_cloned_data_synth(), -which would pass on invalid strings that the server would then reject. - -That breaks for example nmtui. Try editing a connection with -"cloned-mac-address" set to NULL. Note, as long as you don't edit -the cloned MAC address in nmtui, you can save the modification. -Once you start modifying the entry, you can no longer set an empty -MAC address as the server now receives the invalid empty string. -Thus, the "OK" button fails with - Unable to save connection: - 802-3-ethernet.cloned-mac-address: - is not a valid MAC address -It also means, nmtui cannot modify the "cloned-mac-address" field to -become empty. - -Fix that problem at various places by coercing "" to NULL. - -Fixes: 8eed67122c58540360b617eb42d5df8328e21b5d - -https://bugzilla.redhat.com/show_bug.cgi?id=1372799 -(cherry picked from commit 814784aa46004023739ccb29bc806d1abfb63bb2) -(cherry picked from commit 742bf5671f24efa138d7127e501963d233bf508f) ---- - clients/tui/nmt-mac-entry.c | 3 ++- - libnm-core/nm-utils.c | 19 +++++++++++++++++-- - 2 files changed, 19 insertions(+), 3 deletions(-) - -diff --git a/clients/tui/nmt-mac-entry.c b/clients/tui/nmt-mac-entry.c -index da7f55f..b954d2e 100644 ---- a/clients/tui/nmt-mac-entry.c -+++ b/clients/tui/nmt-mac-entry.c -@@ -201,7 +201,8 @@ nmt_mac_entry_get_property (GObject *object, - g_value_set_int (value, priv->mac_length); - break; - case PROP_MAC_ADDRESS: -- g_value_set_string (value, nmt_newt_entry_get_text (NMT_NEWT_ENTRY (object))); -+ g_value_set_string (value, -+ nm_str_not_empty (nmt_newt_entry_get_text (NMT_NEWT_ENTRY (object)))); - break; - case PROP_ENTRY_TYPE: - g_value_set_int (value, priv->entry_type); -diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c -index a31a919..df75d56 100644 ---- a/libnm-core/nm-utils.c -+++ b/libnm-core/nm-utils.c -@@ -3425,7 +3425,22 @@ _nm_utils_hwaddr_cloned_data_synth (NMSetting *setting, - "cloned-mac-address", - &addr, - NULL); -- return addr ? g_variant_new_string (addr) : NULL; -+ -+ /* Before introducing the extended "cloned-mac-address" (and its D-Bus -+ * field "assigned-mac-address"), libnm's _nm_utils_hwaddr_to_dbus() -+ * would drop invalid values as it was unable to serialize them. -+ * -+ * Now, we would like to send invalid values as "assigned-mac-address" -+ * over D-Bus and let the server reject them. -+ * -+ * However, clients used to set the cloned-mac-address property -+ * to "" and it just worked as the value was not serialized in -+ * an ill form. -+ * -+ * To preserve that behavior, seralize "" as NULL. -+ */ -+ -+ return addr && addr[0] ? g_variant_new_string (addr) : NULL; - } - - gboolean -@@ -3443,7 +3458,7 @@ _nm_utils_hwaddr_cloned_data_set (NMSetting *setting, - - g_object_set (setting, - "cloned-mac-address", -- g_variant_get_string (value, NULL), -+ nm_str_not_empty (g_variant_get_string (value, NULL)), - NULL); - return TRUE; - } --- -2.7.4 - diff --git a/SOURCES/0011-device-release-removed-slaves-rh1448907.patch b/SOURCES/0011-device-release-removed-slaves-rh1448907.patch new file mode 100644 index 0000000..04a3577 --- /dev/null +++ b/SOURCES/0011-device-release-removed-slaves-rh1448907.patch @@ -0,0 +1,73 @@ +From 74b53f2f40e8656be5599a1fcd23f737dcf18bc3 Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Mon, 8 May 2017 21:22:00 +0200 +Subject: [PATCH] device: release removed devices from master on cleanup + +On cleanup, unconditionally release a device from its master if the +link is missing or it doesn't have a master, otherwise the master +would later try to release the slave, hitting the following assertion: + + "nm_platform_link_release: assertion 'slave > 0' failed" + #0 g_logv + #1 g_log + #2 g_return_if_fail_warning + #3 nm_platform_link_release + #4 release_slave + #5 nm_device_master_release_one_slave + #6 slave_state_changed + #7 ffi_call_unix64 + #8 ffi_call + #9 g_cclosure_marshal_generic + #10 g_closure_invoke + #11 signal_emit_unlocked_R + #12 g_signal_emit_valist + #14 _set_state_full + #15 nm_device_state_changed + #16 nm_device_unrealize + #17 _platform_link_cb_idle + #18 g_main_context_dispatch + #19 g_main_context_dispatch + #20 g_main_context_iterate + #21 g_main_loop_run + #22 main + +Fixes: 9e8218f99a2d5a7020703e0fbac1c7c0983930db + +https://bugzilla.redhat.com/show_bug.cgi?id=1448907 +(cherry picked from commit 3355a2823be11b15d8f3cf1d2f080ab83739f17d) +(cherry picked from commit 6110b11235c932b94b0114ff90e8438ffedd2bfb) +--- + src/devices/nm-device.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index 37b2588..f5eb71d 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -12096,11 +12096,6 @@ nm_device_cleanup (NMDevice *self, NMDeviceStateReason reason, CleanupType clean + /* master: release slaves */ + nm_device_master_release_slaves (self); + +- /* slave: mark no longer enslaved */ +- if ( priv->master +- && nm_platform_link_get_master (nm_device_get_platform (self), priv->ifindex) <= 0) +- nm_device_master_release_one_slave (priv->master, self, FALSE, NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED); +- + /* Take out any entries in the routing table and any IP address the device had. */ + ifindex = nm_device_get_ip_ifindex (self); + if (ifindex > 0) { +@@ -12109,6 +12104,11 @@ nm_device_cleanup (NMDevice *self, NMDeviceStateReason reason, CleanupType clean + } + } + ++ /* slave: mark no longer enslaved */ ++ if ( priv->master ++ && nm_platform_link_get_master (nm_device_get_platform (self), priv->ifindex) <= 0) ++ nm_device_master_release_one_slave (priv->master, self, FALSE, NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED); ++ + if (priv->lldp_listener) + nm_lldp_listener_stop (priv->lldp_listener); + +-- +2.9.3 + diff --git a/SOURCES/0011-ibft-cap-sys-admin-rh1371201.patch b/SOURCES/0011-ibft-cap-sys-admin-rh1371201.patch deleted file mode 100644 index 2fe0514..0000000 --- a/SOURCES/0011-ibft-cap-sys-admin-rh1371201.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 45a2ae7561bdfb59c75788f32290f384d8d159d8 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Fri, 2 Sep 2016 13:35:00 +0200 -Subject: [PATCH 1/2] doc: add comment to systemd's NetworkManager.service - about ibft requiring CAP_SYS_ADMIN - -We don't want to enable this upstream, but make the requirement -more discoverable by documenting it and put a comment to -NetworkManager.service. - -https://bugzilla.redhat.com/show_bug.cgi?id=1371201 -(cherry picked from commit 9aee7b493e3d6352c4864bf2fb4d7fe62626dc38) -(cherry picked from commit c66cbe93756f73f6465b5cb2170044c1393e4e66) ---- - data/NetworkManager.service.in | 4 ++++ - man/NetworkManager.conf.xml | 3 +++ - 2 files changed, 7 insertions(+) - -diff --git a/data/NetworkManager.service.in b/data/NetworkManager.service.in -index 95128a6..a9e8731 100644 ---- a/data/NetworkManager.service.in -+++ b/data/NetworkManager.service.in -@@ -15,6 +15,10 @@ Restart=on-failure - # NM doesn't want systemd to kill its children for it - KillMode=process - CapabilityBoundingSet=CAP_NET_ADMIN CAP_DAC_OVERRIDE CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID CAP_SYS_MODULE CAP_AUDIT_WRITE CAP_KILL CAP_SYS_CHROOT -+ -+# ibft settings plugin calls iscsiadm which needs CAP_SYS_ADMIN -+#CapabilityBoundingSet=CAP_SYS_ADMIN -+ - ProtectSystem=true - ProtectHome=read-only - -diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml -index db381f0..b1e3817 100644 ---- a/man/NetworkManager.conf.xml -+++ b/man/NetworkManager.conf.xml -@@ -1058,6 +1058,9 @@ enable=nm-version-min:1.3,nm-version-min:1.2.6,nm-version-min:1.0.16 - You can also explicitly specify ibft to load the - plugin without ifcfg-rh or to change the plugin order. - -+ -+ Note that ibft plugin uses /sbin/iscsiadm and thus requires CAP_SYS_ADMIN capability. -+ - - - --- -2.7.4 - - -From 93ebdb5048048c3a1b96d88d7c78c450477b40e5 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Fri, 2 Sep 2016 15:58:42 +0200 -Subject: [PATCH 2/2] service: give CAP_SYS_ADMIN for ibft/iscsiadm - (rh#1371201) - -systemd on rhel-7.3 has a bug with merging CapabilityBoundingSet. -https://github.com/systemd/systemd/issues/1221 -Thus it is all in one line. ---- - data/NetworkManager.service.in | 6 +++--- - man/NetworkManager.conf.5 | 2 ++ - 2 files changed, 5 insertions(+), 3 deletions(-) - -diff --git a/data/NetworkManager.service.in b/data/NetworkManager.service.in -index a9e8731..5f168ab 100644 ---- a/data/NetworkManager.service.in -+++ b/data/NetworkManager.service.in -@@ -14,10 +14,10 @@ ExecStart=@sbindir@/NetworkManager --no-daemon - Restart=on-failure - # NM doesn't want systemd to kill its children for it - KillMode=process --CapabilityBoundingSet=CAP_NET_ADMIN CAP_DAC_OVERRIDE CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID CAP_SYS_MODULE CAP_AUDIT_WRITE CAP_KILL CAP_SYS_CHROOT -+#CapabilityBoundingSet=CAP_NET_ADMIN CAP_DAC_OVERRIDE CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID CAP_SYS_MODULE CAP_AUDIT_WRITE CAP_KILL CAP_SYS_CHROOT - --# ibft settings plugin calls iscsiadm which needs CAP_SYS_ADMIN --#CapabilityBoundingSet=CAP_SYS_ADMIN -+# ibft settings plugin calls iscsiadm which needs CAP_SYS_ADMIN (rh#1371201) -+CapabilityBoundingSet=CAP_NET_ADMIN CAP_DAC_OVERRIDE CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID CAP_SYS_MODULE CAP_AUDIT_WRITE CAP_KILL CAP_SYS_CHROOT CAP_SYS_ADMIN - - ProtectSystem=true - ProtectHome=read-only -diff --git a/man/NetworkManager.conf.5 b/man/NetworkManager.conf.5 -index 9b57053..692e5c9 100644 ---- a/man/NetworkManager.conf.5 -+++ b/man/NetworkManager.conf.5 -@@ -920,6 +920,8 @@ ibft - to load the plugin without - ifcfg\-rh - or to change the plugin order\&. -+.sp -+Note that ibft plugin uses /sbin/iscsiadm and thus requires CAP_SYS_ADMIN capability\&. - .RE - .SH "APPENDIX" - .SS "Device List Format" --- -2.7.4 - diff --git a/SOURCES/0012-config-slaves-order-rh1452585.patch b/SOURCES/0012-config-slaves-order-rh1452585.patch new file mode 100644 index 0000000..cd7a179 --- /dev/null +++ b/SOURCES/0012-config-slaves-order-rh1452585.patch @@ -0,0 +1,225 @@ +From 5231db02204ce3c45e2415eedbd915fa56445401 Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Mon, 15 May 2017 17:17:26 +0200 +Subject: [PATCH] core: add configuration flag to choose slaves activation + order + +Commits 39d0559d9a7a ("platform: sort links by name instead of +ifindex") and 529a0a1a7f19 ("manager: sort slaves to be autoconnected +by device name") changed the order of activation of slaves. Introduce +a system-wide configuration property to preserve the old behavior. + +https://bugzilla.redhat.com/show_bug.cgi?id=1452585 +(cherry picked from commit 31656a066bfb3edc106f5efd5d2be46396824930) +(cherry picked from commit 3fefef8594ef2690c56fd44a6ce4836decaaee56) +--- + man/NetworkManager.conf.xml | 13 +++++++++++++ + src/nm-config.h | 1 + + src/nm-manager.c | 26 ++++++++++++++++++++------ + src/platform/nm-platform.c | 26 +++++++++++++++----------- + src/platform/nm-platform.h | 2 +- + src/platform/tests/test-common.c | 2 +- + src/platform/tests/test-general.c | 2 +- + 7 files changed, 52 insertions(+), 20 deletions(-) + +diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml +index 2a8ba76..5e76c0a 100644 +--- a/man/NetworkManager.conf.xml ++++ b/man/NetworkManager.conf.xml +@@ -409,6 +409,19 @@ no-auto-default=* + + + ++ ++ slaves-order ++ ++ ++ This key specifies in which order slave connections are ++ auto-activated on boot or when the master activates ++ them. Allowed values are name (order ++ connection by interface name, the default), or ++ index (order slaves by their kernel ++ index). ++ ++ ++ + + + +diff --git a/src/nm-config.h b/src/nm-config.h +index 283d6a1..ae695fc 100644 +--- a/src/nm-config.h ++++ b/src/nm-config.h +@@ -63,6 +63,7 @@ + #define NM_CONFIG_KEYFILE_KEY_MAIN_DHCP "dhcp" + #define NM_CONFIG_KEYFILE_KEY_MAIN_DEBUG "debug" + #define NM_CONFIG_KEYFILE_KEY_MAIN_HOSTNAME_MODE "hostname-mode" ++#define NM_CONFIG_KEYFILE_KEY_MAIN_SLAVES_ORDER "slaves-order" + #define NM_CONFIG_KEYFILE_KEY_LOGGING_BACKEND "backend" + #define NM_CONFIG_KEYFILE_KEY_CONFIG_ENABLE "enable" + #define NM_CONFIG_KEYFILE_KEY_ATOMIC_SECTION_WAS ".was" +diff --git a/src/nm-manager.c b/src/nm-manager.c +index a740219..3d94ce9 100644 +--- a/src/nm-manager.c ++++ b/src/nm-manager.c +@@ -2459,10 +2459,14 @@ platform_query_devices (NMManager *self) + NMPlatformLink *links; + int i; + gboolean guess_assume; ++ const char *order; + + guess_assume = nm_config_get_first_start (nm_config_get ()); +- +- links_array = nm_platform_link_get_all (NM_PLATFORM_GET); ++ order = nm_config_data_get_value_cached (NM_CONFIG_GET_DATA, ++ NM_CONFIG_KEYFILE_GROUP_MAIN, ++ NM_CONFIG_KEYFILE_KEY_MAIN_SLAVES_ORDER, ++ NM_CONFIG_GET_VALUE_STRIP); ++ links_array = nm_platform_link_get_all (NM_PLATFORM_GET, !nm_streq0 (order, "index")); + links = (NMPlatformLink *) links_array->data; + for (i = 0; i < links_array->len; i++) { + gs_free NMConfigDeviceStateData *dev_state = NULL; +@@ -3016,7 +3020,7 @@ out: + } + + static gint +-compare_slaves (gconstpointer a, gconstpointer b, gpointer _unused) ++compare_slaves (gconstpointer a, gconstpointer b, gpointer sort_by_name) + { + const SlaveConnectionInfo *a_info = a; + const SlaveConnectionInfo *b_info = b; +@@ -3027,8 +3031,12 @@ compare_slaves (gconstpointer a, gconstpointer b, gpointer _unused) + if (!b_info->device) + return -1; + +- return g_strcmp0 (nm_device_get_iface (a_info->device), +- nm_device_get_iface (b_info->device)); ++ if (GPOINTER_TO_INT (sort_by_name)) { ++ return g_strcmp0 (nm_device_get_iface (a_info->device), ++ nm_device_get_iface (b_info->device)); ++ } ++ ++ return nm_device_get_ifindex (a_info->device) - nm_device_get_ifindex (b_info->device); + } + + static void +@@ -3042,11 +3050,17 @@ autoconnect_slaves (NMManager *self, + if (should_connect_slaves (NM_CONNECTION (master_connection), master_device)) { + gs_free SlaveConnectionInfo *slaves = NULL; + guint i, n_slaves = 0; ++ const char *value; + + slaves = find_slaves (self, master_connection, master_device, &n_slaves); + if (n_slaves > 1) { ++ value = nm_config_data_get_value_cached (NM_CONFIG_GET_DATA, ++ NM_CONFIG_KEYFILE_GROUP_MAIN, ++ NM_CONFIG_KEYFILE_KEY_MAIN_SLAVES_ORDER, ++ NM_CONFIG_GET_VALUE_STRIP); + g_qsort_with_data (slaves, n_slaves, sizeof (slaves[0]), +- compare_slaves, NULL); ++ compare_slaves, ++ GINT_TO_POINTER (!nm_streq0 (value, "index"))); + } + + for (i = 0; i < n_slaves; i++) { +diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c +index 767187d..a244ff3 100644 +--- a/src/platform/nm-platform.c ++++ b/src/platform/nm-platform.c +@@ -437,7 +437,8 @@ nm_platform_sysctl_get_int_checked (NMPlatform *self, const char *pathid, int di + + static int + _link_get_all_presort (gconstpointer p_a, +- gconstpointer p_b) ++ gconstpointer p_b, ++ gpointer sort_by_name) + { + const NMPlatformLink *a = p_a; + const NMPlatformLink *b = p_b; +@@ -448,13 +449,16 @@ _link_get_all_presort (gconstpointer p_a, + if (b->ifindex == 1) + return 1; + +- /* Initialized links first */ +- if (a->initialized > b->initialized) +- return -1; +- if (a->initialized < b->initialized) +- return 1; ++ if (GPOINTER_TO_INT (sort_by_name)) { ++ /* Initialized links first */ ++ if (a->initialized > b->initialized) ++ return -1; ++ if (a->initialized < b->initialized) ++ return 1; + +- return strcmp (a->name, b->name); ++ return strcmp (a->name, b->name); ++ } else ++ return a->ifindex - b->ifindex; + } + + /** +@@ -465,7 +469,7 @@ _link_get_all_presort (gconstpointer p_a, + * owned by the caller and should be freed with g_array_unref(). + */ + GArray * +-nm_platform_link_get_all (NMPlatform *self) ++nm_platform_link_get_all (NMPlatform *self, gboolean sort_by_name) + { + GArray *links, *result; + guint i, j, nresult; +@@ -479,9 +483,9 @@ nm_platform_link_get_all (NMPlatform *self) + if (!links || links->len == 0) + return links; + +- /* first sort the links by their ifindex. Below we will sort further by moving +- * children/slaves to the end. */ +- g_array_sort (links, _link_get_all_presort); ++ /* first sort the links by their ifindex or name. Below we will sort ++ * further by moving children/slaves to the end. */ ++ g_array_sort_with_data (links, _link_get_all_presort, GINT_TO_POINTER (sort_by_name)); + + unseen = g_hash_table_new (g_direct_hash, g_direct_equal); + for (i = 0; i < links->len; i++) { +diff --git a/src/platform/nm-platform.h b/src/platform/nm-platform.h +index 43be17f..1b8fa13 100644 +--- a/src/platform/nm-platform.h ++++ b/src/platform/nm-platform.h +@@ -763,7 +763,7 @@ const NMPlatformLink *nm_platform_link_get (NMPlatform *self, int ifindex); + const NMPlatformLink *nm_platform_link_get_by_ifname (NMPlatform *self, const char *ifname); + const NMPlatformLink *nm_platform_link_get_by_address (NMPlatform *self, gconstpointer address, size_t length); + +-GArray *nm_platform_link_get_all (NMPlatform *self); ++GArray *nm_platform_link_get_all (NMPlatform *self, gboolean sort_by_name); + NMPlatformError nm_platform_link_dummy_add (NMPlatform *self, const char *name, const NMPlatformLink **out_link); + NMPlatformError nm_platform_link_bridge_add (NMPlatform *self, const char *name, const void *address, size_t address_len, const NMPlatformLink **out_link); + NMPlatformError nm_platform_link_bond_add (NMPlatform *self, const char *name, const NMPlatformLink **out_link); +diff --git a/src/platform/tests/test-common.c b/src/platform/tests/test-common.c +index 04db862..a9d0694 100644 +--- a/src/platform/tests/test-common.c ++++ b/src/platform/tests/test-common.c +@@ -185,7 +185,7 @@ link_callback (NMPlatform *platform, int obj_type_i, int ifindex, NMPlatformLink + + /* Check the data */ + g_assert (received->ifindex > 0); +- links = nm_platform_link_get_all (NM_PLATFORM_GET); ++ links = nm_platform_link_get_all (NM_PLATFORM_GET, TRUE); + for (i = 0; i < links->len; i++) { + cached = &g_array_index (links, NMPlatformLink, i); + if (cached->ifindex == received->ifindex) { +diff --git a/src/platform/tests/test-general.c b/src/platform/tests/test-general.c +index 2ccfac7..e772662 100644 +--- a/src/platform/tests/test-general.c ++++ b/src/platform/tests/test-general.c +@@ -48,7 +48,7 @@ test_link_get_all (void) + + platform = nm_linux_platform_new (TRUE, NM_PLATFORM_NETNS_SUPPORT_DEFAULT); + +- links = nm_platform_link_get_all (platform); ++ links = nm_platform_link_get_all (platform, TRUE); + } + + /*****************************************************************************/ +-- +2.9.3 + diff --git a/SOURCES/0012-po-add-translations-rh1276476.patch b/SOURCES/0012-po-add-translations-rh1276476.patch deleted file mode 100644 index 4849e02..0000000 --- a/SOURCES/0012-po-add-translations-rh1276476.patch +++ /dev/null @@ -1,95342 +0,0 @@ -From bcc9a7eacf2234cef0b35562f39ea50b27b107e1 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Tue, 6 Sep 2016 15:38:38 +0200 -Subject: [PATCH] po: add translations from Red Hat - -https://bugzilla.redhat.com/show_bug.cgi?id=1276476 -(cherry picked from commit 2724ec53b707cda982264b6604f959f998572ea6) ---- - po/de.po | 3173 ++++++++++++++--------------- - po/es.po | 5927 +++++++++++++++++++++++++++++------------------------- - po/fr.po | 5588 +++++++++++++++++++++++++++----------------------- - po/it.po | 4528 ++++++++++++++++++++++------------------- - po/ja.po | 5815 ++++++++++++++++++++++++++++------------------------- - po/ko.po | 5932 +++++++++++++++++++++++++++++------------------------- - po/pt_BR.po | 3615 ++++++++++++++++++--------------- - po/ru.po | 5724 ++++++++++++++++++++++++++++------------------------ - po/zh_CN.po | 6483 +++++++++++++++++++++++++++++++---------------------------- - po/zh_TW.po | 3602 ++++++++++++++++++--------------- - 10 files changed, 26861 insertions(+), 23526 deletions(-) - -diff --git a/po/de.po b/po/de.po -index be17a6d..5f58630 100644 ---- a/po/de.po -+++ b/po/de.po -@@ -1,7 +1,7 @@ - # German translation of NetworkManager. - # Copyright (C) 2005 Dan Williams - # This file is distributed under the same license as the NetworkManager package. --# -+# - # Hendrik Brandt , 2004, 2005. - # Frank Arnold , 2005. - # Hendrik Richter , 2006. -@@ -18,18 +18,17 @@ - msgid "" - msgstr "" - "Project-Id-Version: NetworkManager HEAD\n" --"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" --"product=NetworkManager&keywords=I18N+L10N&component=Translations\n" --"POT-Creation-Date: 2016-05-26 14:24+0000\n" --"PO-Revision-Date: 2016-05-21 13:21+0200\n" --"Last-Translator: Christian Kirbach \n" --"Language-Team: Deutsch \n" --"Language: de\n" -+"Report-Msgid-Bugs-To: \n" -+"POT-Creation-Date: 2016-04-29 14:24+0530\n" - "MIME-Version: 1.0\n" - "Content-Type: text/plain; charset=UTF-8\n" - "Content-Transfer-Encoding: 8bit\n" -+"PO-Revision-Date: 2016-07-05 08:44+0000\n" -+"Last-Translator: Copied by Zanata \n" -+"Language-Team: Deutsch \n" -+"Language: de\n" - "Plural-Forms: nplurals=2; plural=(n != 1);\n" --"X-Generator: Poedit 1.8.7.1\n" -+"X-Generator: Zanata 3.9.3\n" - - #: ../clients/cli/agent.c:39 - #, c-format -@@ -39,7 +38,7 @@ msgid "" - "COMMAND := { secret | polkit | all }\n" - "\n" - msgstr "" --"Aufruf: nmcli agent { BEFEHL | help }\n" -+"Aufruf: nmcli agent { COMMAND | help }\n" - "\n" - "BEFEHL := { secret | polkit | all }\n" - "\n" -@@ -60,8 +59,7 @@ msgstr "" - "Ruft nmcli als Passwort-Agent für NetworkManager auf. Sobald NetworkManager\n" - "ein Passwort verlangt fragt es bekannte Agenten danach. Der Befehl hält " - "nmcli\n" --"am Laufen und wenn ein Passwort notwendig ist, so wird der Benutzer " --"gefragt.\n" -+"am Laufen und wenn ein Passwort notwendig ist, so wird der Benutzer gefragt.\n" - "\n" - - #: ../clients/cli/agent.c:57 -@@ -116,21 +114,21 @@ msgstr "Fehler: Initialisierung des Passwort-Agenten fehlgeschlagen: %s" - msgid "nmcli successfully registered as a polkit agent.\n" - msgstr "nmcli wurde erfolgreich als polkit-Agent angemeldet.\n" - --#: ../clients/cli/agent.c:206 ../clients/cli/connections.c:11046 --#: ../clients/cli/devices.c:3724 ../clients/cli/general.c:343 --#: ../clients/cli/general.c:481 -+#: ../clients/cli/agent.c:206 ../clients/cli/connections.c:11050 -+#: ../clients/cli/devices.c:3669 ../clients/cli/general.c:343 -+#: ../clients/cli/general.c:484 - #, c-format - msgid "Error: NetworkManager is not running." - msgstr "Fehler: NetworkManager wird nicht ausgeführt" - --#: ../clients/cli/agent.c:239 -+#: ../clients/cli/agent.c:242 - #, c-format - msgid "Error: 'agent' command '%s' is not valid." - msgstr "Fehler: Der »agent«-Befehl »%s« ist ungültig." - - #: ../clients/cli/common.c:38 ../clients/cli/common.c:51 - #: ../clients/cli/common.c:59 ../clients/cli/common.c:71 --#: ../clients/cli/connections.c:177 ../clients/cli/connections.c:199 -+#: ../clients/cli/connections.c:192 ../clients/cli/connections.c:214 - msgid "GROUP" - msgstr "GRUPPE" - -@@ -142,7 +140,7 @@ msgstr "ADRESSE" - #. 1 - #. 2 - #: ../clients/cli/common.c:40 ../clients/cli/common.c:61 --#: ../clients/cli/connections.c:202 -+#: ../clients/cli/connections.c:217 - msgid "GATEWAY" - msgstr "GATEWAY" - -@@ -246,7 +244,7 @@ msgstr "wird verbunden (Zweitverbindungen werden gestartet)" - msgid "connected" - msgstr "verbunden" - --#: ../clients/cli/common.c:514 ../clients/cli/connections.c:630 -+#: ../clients/cli/common.c:514 ../clients/cli/connections.c:648 - msgid "deactivating" - msgstr "wird deaktiviert" - -@@ -255,52 +253,52 @@ msgid "connection failed" - msgstr "Verbindung fehlgeschlagen" - - #: ../clients/cli/common.c:518 ../clients/cli/common.c:535 --#: ../clients/cli/connections.c:635 ../clients/cli/connections.c:658 --#: ../clients/cli/connections.c:1931 ../clients/cli/devices.c:1104 --#: ../clients/cli/devices.c:1145 ../clients/cli/devices.c:1147 -+#: ../clients/cli/connections.c:653 ../clients/cli/connections.c:676 -+#: ../clients/cli/connections.c:1949 ../clients/cli/devices.c:1024 -+#: ../clients/cli/devices.c:1065 ../clients/cli/devices.c:1067 - #: ../clients/cli/general.c:248 ../clients/cli/general.c:286 --#: ../clients/cli/general.c:429 ../clients/cli/general.c:445 --#: ../clients/cli/settings.c:843 ../clients/cli/settings.c:929 --#: ../clients/cli/settings.c:1313 ../clients/cli/settings.c:1951 --#: ../clients/cli/settings.c:3248 -+#: ../clients/cli/general.c:432 ../clients/cli/general.c:448 -+#: ../clients/cli/settings.c:839 ../clients/cli/settings.c:925 -+#: ../clients/cli/settings.c:1265 ../clients/cli/settings.c:1901 -+#: ../clients/cli/settings.c:3205 ../clients/cli/utils.c:1400 - #, c-format - msgid "unknown" - msgstr "unbekannt" - - #. "CAPABILITIES" --#: ../clients/cli/common.c:527 ../clients/cli/connections.c:915 --#: ../clients/cli/connections.c:917 ../clients/cli/connections.c:919 --#: ../clients/cli/connections.c:953 ../clients/cli/connections.c:1022 --#: ../clients/cli/connections.c:1023 ../clients/cli/connections.c:1025 --#: ../clients/cli/connections.c:3438 ../clients/cli/connections.c:8559 --#: ../clients/cli/connections.c:8560 ../clients/cli/devices.c:782 --#: ../clients/cli/devices.c:1069 ../clients/cli/devices.c:1070 --#: ../clients/cli/devices.c:1071 ../clients/cli/devices.c:1072 --#: ../clients/cli/devices.c:1073 ../clients/cli/devices.c:1108 --#: ../clients/cli/devices.c:1110 ../clients/cli/devices.c:1138 --#: ../clients/cli/devices.c:1139 ../clients/cli/devices.c:1140 --#: ../clients/cli/devices.c:1141 ../clients/cli/devices.c:1142 --#: ../clients/cli/devices.c:1143 ../clients/cli/devices.c:1144 --#: ../clients/cli/devices.c:1146 ../clients/cli/devices.c:1148 --#: ../clients/cli/general.c:439 ../clients/cli/settings.c:3243 -+#: ../clients/cli/common.c:527 ../clients/cli/connections.c:933 -+#: ../clients/cli/connections.c:935 ../clients/cli/connections.c:937 -+#: ../clients/cli/connections.c:971 ../clients/cli/connections.c:1040 -+#: ../clients/cli/connections.c:1041 ../clients/cli/connections.c:1043 -+#: ../clients/cli/connections.c:3450 ../clients/cli/connections.c:8563 -+#: ../clients/cli/connections.c:8564 ../clients/cli/devices.c:772 -+#: ../clients/cli/devices.c:989 ../clients/cli/devices.c:990 -+#: ../clients/cli/devices.c:991 ../clients/cli/devices.c:992 -+#: ../clients/cli/devices.c:993 ../clients/cli/devices.c:1028 -+#: ../clients/cli/devices.c:1030 ../clients/cli/devices.c:1058 -+#: ../clients/cli/devices.c:1059 ../clients/cli/devices.c:1060 -+#: ../clients/cli/devices.c:1061 ../clients/cli/devices.c:1062 -+#: ../clients/cli/devices.c:1063 ../clients/cli/devices.c:1064 -+#: ../clients/cli/devices.c:1066 ../clients/cli/devices.c:1068 -+#: ../clients/cli/general.c:442 ../clients/cli/settings.c:3200 - msgid "yes" - msgstr "ja" - --#: ../clients/cli/common.c:529 ../clients/cli/connections.c:915 --#: ../clients/cli/connections.c:917 ../clients/cli/connections.c:919 --#: ../clients/cli/connections.c:1022 ../clients/cli/connections.c:1023 --#: ../clients/cli/connections.c:1025 ../clients/cli/connections.c:3439 --#: ../clients/cli/connections.c:8559 ../clients/cli/connections.c:8560 --#: ../clients/cli/devices.c:782 ../clients/cli/devices.c:1069 --#: ../clients/cli/devices.c:1070 ../clients/cli/devices.c:1071 --#: ../clients/cli/devices.c:1072 ../clients/cli/devices.c:1073 --#: ../clients/cli/devices.c:1108 ../clients/cli/devices.c:1110 --#: ../clients/cli/devices.c:1138 ../clients/cli/devices.c:1139 --#: ../clients/cli/devices.c:1140 ../clients/cli/devices.c:1141 --#: ../clients/cli/devices.c:1142 ../clients/cli/devices.c:1143 --#: ../clients/cli/devices.c:1144 ../clients/cli/devices.c:1146 --#: ../clients/cli/devices.c:1148 ../clients/cli/general.c:441 --#: ../clients/cli/settings.c:3245 -+#: ../clients/cli/common.c:529 ../clients/cli/connections.c:933 -+#: ../clients/cli/connections.c:935 ../clients/cli/connections.c:937 -+#: ../clients/cli/connections.c:1040 ../clients/cli/connections.c:1041 -+#: ../clients/cli/connections.c:1043 ../clients/cli/connections.c:3451 -+#: ../clients/cli/connections.c:8563 ../clients/cli/connections.c:8564 -+#: ../clients/cli/devices.c:772 ../clients/cli/devices.c:989 -+#: ../clients/cli/devices.c:990 ../clients/cli/devices.c:991 -+#: ../clients/cli/devices.c:992 ../clients/cli/devices.c:993 -+#: ../clients/cli/devices.c:1028 ../clients/cli/devices.c:1030 -+#: ../clients/cli/devices.c:1058 ../clients/cli/devices.c:1059 -+#: ../clients/cli/devices.c:1060 ../clients/cli/devices.c:1061 -+#: ../clients/cli/devices.c:1062 ../clients/cli/devices.c:1063 -+#: ../clients/cli/devices.c:1064 ../clients/cli/devices.c:1066 -+#: ../clients/cli/devices.c:1068 ../clients/cli/general.c:444 -+#: ../clients/cli/settings.c:3202 - msgid "no" - msgstr "nein" - -@@ -317,7 +315,7 @@ msgid "No reason given" - msgstr "Kein Grund angegeben" - - #. We should not really come here --#: ../clients/cli/common.c:547 ../clients/cli/connections.c:2964 -+#: ../clients/cli/common.c:547 ../clients/cli/connections.c:2976 - #, c-format - msgid "Unknown error" - msgstr "Unbekannter Fehler" -@@ -566,14 +564,12 @@ msgid "New connection activation was enqueued" - msgstr "Aktivierung der Verbindung wurde eingereiht" - - #: ../clients/cli/common.c:727 --#, fuzzy - msgid "The device's parent changed" --msgstr "Das Gerät wurde entfernt" -+msgstr "Parent des Geräts wurde geändert " - - #: ../clients/cli/common.c:730 --#, fuzzy - msgid "The device parent's management changed" --msgstr "Das Gerät wurde entfernt" -+msgstr "Verwaltung des übergeordneten Geräts wurde geändert " - - #. TRANSLATORS: Unknown reason for a device state change (NMDeviceStateReason) - #: ../clients/cli/common.c:734 ../libnm-glib/nm-device.c:1888 -@@ -599,7 +595,7 @@ msgstr "»%s« ist keine gültige Bündelungskonfiguration oder Dateiname." - #: ../clients/cli/common.c:958 - #, c-format - msgid "Error: openconnect failed: %s\n" --msgstr "Fehler: openconnect ist fehlgeschlagen: %s\n" -+msgstr "Fehler: openconnect fehlgeschlagen: %s\n" - - #: ../clients/cli/common.c:965 - #, c-format -@@ -671,20 +667,19 @@ msgid "MACVLAN mode: " - msgstr "MACVLAN-Modus: " - - #. 0 --#: ../clients/cli/connections.c:58 ../clients/cli/connections.c:178 -+#: ../clients/cli/connections.c:73 ../clients/cli/connections.c:193 - #: ../clients/cli/devices.c:55 ../clients/cli/devices.c:89 - #: ../clients/cli/devices.c:99 ../clients/cli/devices.c:110 - #: ../clients/cli/devices.c:120 ../clients/cli/devices.c:137 - #: ../clients/cli/devices.c:150 ../clients/cli/devices.c:176 - #: ../clients/cli/devices.c:191 ../clients/cli/devices.c:200 --#: ../clients/cli/devices.c:210 ../clients/cli/devices.c:220 --#: ../clients/cli/devices.c:261 -+#: ../clients/cli/devices.c:210 ../clients/cli/devices.c:251 - msgid "NAME" - msgstr "NAME" - - #. 0 - #. 1 --#: ../clients/cli/connections.c:59 ../clients/cli/connections.c:179 -+#: ../clients/cli/connections.c:74 ../clients/cli/connections.c:194 - msgid "UUID" - msgstr "UUID" - -@@ -692,35 +687,35 @@ msgstr "UUID" - #. 0 - #. 1 - #. 2 --#: ../clients/cli/connections.c:60 ../clients/cli/connections.c:200 -+#: ../clients/cli/connections.c:75 ../clients/cli/connections.c:215 - #: ../clients/cli/devices.c:41 ../clients/cli/devices.c:57 - #: ../clients/cli/devices.c:179 - msgid "TYPE" - msgstr "TYP" - - #. 2 --#: ../clients/cli/connections.c:61 -+#: ../clients/cli/connections.c:76 - msgid "TIMESTAMP" - msgstr "ZEITSTEMPEL" - - #. 3 --#: ../clients/cli/connections.c:62 -+#: ../clients/cli/connections.c:77 - msgid "TIMESTAMP-REAL" - msgstr "ZEITSTEMPEL-ECHT" - - #. 4 - #. 16 --#: ../clients/cli/connections.c:63 ../clients/cli/devices.c:72 -+#: ../clients/cli/connections.c:78 ../clients/cli/devices.c:72 - msgid "AUTOCONNECT" - msgstr "AUTO-VERBINDEN" - - #. 5 --#: ../clients/cli/connections.c:64 -+#: ../clients/cli/connections.c:79 - msgid "AUTOCONNECT-PRIORITY" - msgstr "AUTOVERBINDEN-PRIORITÄT" - - #. 6 --#: ../clients/cli/connections.c:65 -+#: ../clients/cli/connections.c:80 - msgid "READONLY" - msgstr "NUR-LESEN" - -@@ -729,7 +724,7 @@ msgstr "NUR-LESEN" - #. 2 - #. 15 - #. 5 --#: ../clients/cli/connections.c:66 ../clients/cli/connections.c:186 -+#: ../clients/cli/connections.c:81 ../clients/cli/connections.c:201 - #: ../clients/cli/devices.c:43 ../clients/cli/devices.c:166 - #: ../clients/cli/devices.c:182 - msgid "DBUS-PATH" -@@ -738,7 +733,7 @@ msgstr "DBUS-PFAD" - #. 8 - #. 13 - #. 4 --#: ../clients/cli/connections.c:67 ../clients/cli/devices.c:164 -+#: ../clients/cli/connections.c:82 ../clients/cli/devices.c:164 - #: ../clients/cli/devices.c:181 - msgid "ACTIVE" - msgstr "AKTIV" -@@ -748,9 +743,9 @@ msgstr "AKTIV" - #. 12 - #. 3 - #. 0 --#: ../clients/cli/connections.c:68 ../clients/cli/devices.c:40 -+#: ../clients/cli/connections.c:83 ../clients/cli/devices.c:40 - #: ../clients/cli/devices.c:56 ../clients/cli/devices.c:163 --#: ../clients/cli/devices.c:180 ../clients/cli/devices.c:262 -+#: ../clients/cli/devices.c:180 ../clients/cli/devices.c:252 - msgid "DEVICE" - msgstr "GERÄT" - -@@ -759,42 +754,42 @@ msgstr "GERÄT" - #. 1 - #. 10 - #. 1 --#: ../clients/cli/connections.c:69 ../clients/cli/connections.c:181 -+#: ../clients/cli/connections.c:84 ../clients/cli/connections.c:196 - #: ../clients/cli/devices.c:42 ../clients/cli/devices.c:66 - #: ../clients/cli/general.c:36 - msgid "STATE" - msgstr "STATUS" - - #. 11 --#: ../clients/cli/connections.c:70 -+#: ../clients/cli/connections.c:85 - msgid "ACTIVE-PATH" - msgstr "AKTIV-PFAD" - - #. 2 --#: ../clients/cli/connections.c:180 -+#: ../clients/cli/connections.c:195 - msgid "DEVICES" - msgstr "GERÄTE" - - #. 4 --#: ../clients/cli/connections.c:182 -+#: ../clients/cli/connections.c:197 - msgid "DEFAULT" - msgstr "VORGABE" - - #. 5 --#: ../clients/cli/connections.c:183 -+#: ../clients/cli/connections.c:198 - msgid "DEFAULT6" - msgstr "STANDARD6" - - #. 6 --#: ../clients/cli/connections.c:184 -+#: ../clients/cli/connections.c:199 - msgid "SPEC-OBJECT" - msgstr "SPEC-OBJECT" - - #. 7 - #. 4 - #. Ask for optional 'vpn' arguments. --#: ../clients/cli/connections.c:185 ../clients/cli/connections.c:223 --#: ../clients/cli/connections.c:4157 ../clients/tui/nm-editor-utils.c:233 -+#: ../clients/cli/connections.c:200 ../clients/cli/connections.c:238 -+#: ../clients/cli/connections.c:4169 ../clients/tui/nm-editor-utils.c:233 - #: ../clients/tui/nmt-connect-connection-list.c:405 - msgid "VPN" - msgstr "VPN" -@@ -802,70 +797,70 @@ msgstr "VPN" - #. 9 - #. 5 - #. 22 --#: ../clients/cli/connections.c:187 ../clients/cli/devices.c:46 -+#: ../clients/cli/connections.c:202 ../clients/cli/devices.c:46 - #: ../clients/cli/devices.c:78 - msgid "CON-PATH" - msgstr "CON-PFAD" - - #. 10 --#: ../clients/cli/connections.c:188 -+#: ../clients/cli/connections.c:203 - msgid "ZONE" - msgstr "ZONE" - - #. 11 --#: ../clients/cli/connections.c:189 -+#: ../clients/cli/connections.c:204 - msgid "MASTER-PATH" - msgstr "MASTER-PFAD" - - #. 1 --#: ../clients/cli/connections.c:201 -+#: ../clients/cli/connections.c:216 - msgid "USERNAME" - msgstr "BENUTZERNAME" - - #. 3 --#: ../clients/cli/connections.c:203 -+#: ../clients/cli/connections.c:218 - msgid "BANNER" - msgstr "BANNER" - - #. 4 --#: ../clients/cli/connections.c:204 -+#: ../clients/cli/connections.c:219 - msgid "VPN-STATE" - msgstr "VPN-STATUS" - - #. 5 --#: ../clients/cli/connections.c:205 -+#: ../clients/cli/connections.c:220 - msgid "CFG" - msgstr "CFG" - --#: ../clients/cli/connections.c:218 ../clients/cli/devices.c:235 -+#: ../clients/cli/connections.c:233 ../clients/cli/devices.c:225 - msgid "GENERAL" - msgstr "ALLGEMEIN" - - #. 0 - #. 6 --#: ../clients/cli/connections.c:219 ../clients/cli/devices.c:242 -+#: ../clients/cli/connections.c:234 ../clients/cli/devices.c:232 - msgid "IP4" - msgstr "IP4" - - #. 1 - #. 7 --#: ../clients/cli/connections.c:220 ../clients/cli/devices.c:243 -+#: ../clients/cli/connections.c:235 ../clients/cli/devices.c:233 - msgid "DHCP4" - msgstr "DHCP4" - - #. 2 - #. 8 --#: ../clients/cli/connections.c:221 ../clients/cli/devices.c:244 -+#: ../clients/cli/connections.c:236 ../clients/cli/devices.c:234 - msgid "IP6" - msgstr "IP6" - - #. 3 - #. 9 --#: ../clients/cli/connections.c:222 ../clients/cli/devices.c:245 -+#: ../clients/cli/connections.c:237 ../clients/cli/devices.c:235 - msgid "DHCP6" - msgstr "DHCP6" - --#: ../clients/cli/connections.c:254 -+#: ../clients/cli/connections.c:272 - #, c-format - msgid "" - "Usage: nmcli connection { COMMAND | help }\n" -@@ -881,8 +876,8 @@ msgid "" - "\n" - " down [id | uuid | path | apath] ...\n" - "\n" --" add COMMON_OPTIONS TYPE_SPECIFIC_OPTIONS SLAVE_OPTIONS IP_OPTIONS [-- " --"([+|-]. )+]\n" -+" add COMMON_OPTIONS TYPE_SPECIFIC_OPTIONS SLAVE_OPTIONS IP_OPTIONS [-- ([+|-" -+"]. )+]\n" - "\n" - " modify [--temporary] [id | uuid | path] ([+|-]. " - ")+\n" -@@ -941,7 +936,7 @@ msgstr "" - " export [id | uuid | path] []\n" - "\n" - --#: ../clients/cli/connections.c:276 -+#: ../clients/cli/connections.c:294 - #, c-format - msgid "" - "Usage: nmcli connection show { ARGUMENTS | help }\n" -@@ -967,32 +962,31 @@ msgid "" - "account. Use global --show-secrets option to reveal associated secrets as " - "well.\n" - msgstr "" --"Aufruf: nmcli connection show { PARAMETER | help }\n" -+"Aufruf: nmcli connection show { ARGUMENTS | help }\n" - "\n" - "PARAMETER := [--active] [--order ]\n" - "\n" --"Zeigt Verbindungsprofile im Speicher und auf Datenträgern. Einige sind " --"eventuell\n" --"aktiv, wenn ein Gerät dieses Verbindungsprofil verwendet. Ohne Parameter " --"werden\n" --"alle Profile angezeigt. Wenn die Option »--active« angegeben ist, so\n" --"werden nur aktive Profile angezeigt. »--order« ermöglicht eine angepasste\n" --"Verbindungssortierung (schauen Sie ins Handbuch für weitere Informationen).\n" -+"Zeigt Verbindungsprofile im Speicher und auf Datenträgern. Einige können " -+"auch dann\n" -+"aktiv sein, wenn ein Gerät dieses Verbindungsprofil verwendet. Ohne " -+"Parameter werden\n" -+"alle Profile angezeigt. Wenn die Option --active angegeben ist, so\n" -+"werden nur aktive Profile angezeigt. --order ermöglicht eine angepasste\n" -+"Verbindungssortierung (siehe man-Seite).\n" - "\n" --"PARAMETER := [--active] [id | uuid | path | apath] ...\n" -+"PARAMETER := [--active] [--show-secrets] [id | uuid | path | apath] ...\n" - "\n" --"Zeigt Details zu bestimmten Verbindungen. Standardmäßig werden sowohl " -+"Zeigt Details zu bestimmten Verbindungen an. Standardmäßig werden sowohl " - "statische\n" --"Konfiguration als auch aktive Verbindungsdaten angezeigt. Die Ausgabe kann " -+"Konfiguration, als auch aktive Verbindungsdaten angezeigt. Die Ausgabe kann " - "mit der\n" --"allgemeinen Option »--fields« gefiltert werden. Lesen Sie im Handbuch für " --"weitere Informationen.\n" --"Wenn die Option »--active« angegeben ist, so werden nur aktive Profile " -+"allgemeinen Option '--fields' gefiltert werden. Weitere Informationen finden " -+"Sie in den man-Seiten.\n" -+"Wenn die Option --active angegeben ist, so werden nur aktive Profile " - "angezeigt.\n" --"Die globale Option »--show-secrets« zeigt zusätzlich zugehörige Passwörter " --"an.\n" -+"Die Option --show-secrets zeigt weitere zugehörige geheime Schlüssel an.\n" - --#: ../clients/cli/connections.c:297 -+#: ../clients/cli/connections.c:315 - #, c-format - msgid "" - "Usage: nmcli connection up { ARGUMENTS | help }\n" -@@ -1034,12 +1028,11 @@ msgstr "" - "soll\n" - "ap - spezifiziert den zu verbindenden Zugangspunkt (nur gültig für " - "Drahtlosnetzwerke)\n" --"nsp - spezifiziert den Netzwerkdienstanbieter (nur gültig für " --"WiMAX)\n" -+"nsp - spezifiziert den Netzwerkdienstanbieter (nur gültig für WiMAX)\n" - "passwd-file - Datei mit Passwörtern zum Aktivieren der Verbindung\n" - "\n" - --#: ../clients/cli/connections.c:318 -+#: ../clients/cli/connections.c:336 - #, c-format - msgid "" - "Usage: nmcli connection down { ARGUMENTS | help }\n" -@@ -1062,13 +1055,13 @@ msgstr "" - "anhand dessen Name, UUID oder D-Bus-Pfad identifiziert.\n" - "\n" - --#: ../clients/cli/connections.c:330 -+#: ../clients/cli/connections.c:348 - #, c-format - msgid "" - "Usage: nmcli connection add { ARGUMENTS | help }\n" - "\n" --"ARGUMENTS := COMMON_OPTIONS TYPE_SPECIFIC_OPTIONS SLAVE_OPTIONS IP_OPTIONS " --"[-- ([+|-]. )+]\n" -+"ARGUMENTS := COMMON_OPTIONS TYPE_SPECIFIC_OPTIONS SLAVE_OPTIONS IP_OPTIONS [-" -+"- ([+|-]. )+]\n" - "\n" - " COMMON_OPTIONS:\n" - " type \n" -@@ -1155,8 +1148,8 @@ msgid "" - " [path-cost <1-65535>]\n" - " [hairpin yes|no]\n" - "\n" --" vpn: vpn-type vpnc|openvpn|pptp|openconnect|openswan|libreswan|" --"ssh|l2tp|iodine|...\n" -+" vpn: vpn-type " -+"vpnc|openvpn|pptp|openconnect|openswan|libreswan|ssh|l2tp|iodine|...\n" - " [user ]\n" - "\n" - " olpc-mesh: ssid \n" -@@ -1204,155 +1197,146 @@ msgid "" - " [ip6 ] [gw6 ]\n" - "\n" - msgstr "" --"Aufruf: nmcli connection add { ARGUMENTE | help }\n" -+"Aufruf: nmcli connection add { ARGUMENTS | help }\n" - "\n" --" ARGUMENTE := NORMALE_OPTIONEN TYP_SPEZIFISCHE_OPTIONEN SLAVE_OPTIONEN " --"IP_OPTIONEN [-- ([+|-]. )+]\n" -+"ARGUMENTS := COMMON_OPTIONS TYPE_SPECIFIC_OPTIONS SLAVE_OPTIONS IP_OPTIONS [-" -+"- ([+|-]. )+]\n" - "\n" --" NORMALE_OPTIONEN:\n" --" type \n" --" ifname | \"*\"\n" --" [con-name ]\n" -+" COMMON_OPTIONS:\n" -+" type \n" -+" ifname | \"*\"\n" -+" [con-name ]\n" - " [autoconnect yes|no]\n" - " [save yes|no]\n" --" [master ]\n" --" [slave-type ]\n" -+" [master ]\n" -+" [slave-type ]\n" - "\n" --" TYP_SPEZIFISCHE_OPTIONEN:\n" --" Ethernet: [mac ]\n" --" [cloned-mac ]\n" -+" TYPE_SPECIFIC_OPTIONS:\n" -+" ethernet: [mac ]\n" -+" [cloned-mac ]\n" - " [mtu ]\n" - "\n" --" WLAN: ssid \n" --" [mac ]\n" --" [cloned-mac ]\n" -+" wifi: ssid \n" -+" [mac ]\n" -+" [cloned-mac ]\n" - " [mtu ]\n" - " [mode infrastructure|ap|adhoc]\n" - "\n" --" wimax: [mac ]\n" -+" wimax: [mac ]\n" - " [nsp ]\n" - "\n" --" pppoe: username \n" --" [password ]\n" --" [service ]\n" -+" pppoe: username \n" -+" [password ]\n" -+" [service ]\n" - " [mtu ]\n" --" [mac ]\n" -+" [mac ]\n" - "\n" --" gsm: apn ]\n" --" [user ]\n" --" [password ]\n" -+" gsm: apn \n" -+" [user ]\n" -+" [password ]\n" - "\n" --" cdma: [user ]\n" --" [password ]\n" -+" cdma: [user ]\n" -+" [password ]\n" - "\n" --" infiniband: [mac ]\n" -+" infiniband: [mac ]\n" - " [mtu ]\n" - " [transport-mode datagram | connected]\n" --" [parent ]\n" -+" [parent ]\n" - " [p-key ]\n" - "\n" --" Bluetooth: [addr ]\n" -+" bluetooth: [addr ]\n" - " [bt-type panu|dun-gsm|dun-cdma]\n" - "\n" --" vlan: dev <Übergeordnetes Gerät (Verbindungs-UUID, " --"Schnittstellenname oder MAC)\n" --" id \n" --" [flags ]\n" --" [ingress ]\n" --" [egress ]\n" -+" vlan: dev \n" -+" id \n" -+" [flags ]\n" -+" [ingress ]\n" -+" [egress ]\n" - " [mtu ]\n" - "\n" - " bond: [mode balance-rr (0) | active-backup (1) | balance-xor (2) " - "| broadcast (3) |\n" - " 802.3ad (4) | balance-tlb (5) | balance-alb " - "(6)]\n" --" [primary ]\n" --" [miimon ]\n" --" [downdelay ]\n" --" [updelay ]\n" --" [arp-interval ]\n" --" [arp-ip-target ]\n" -+" [primary ]\n" -+" [miimon ]\n" -+" [downdelay ]\n" -+" [updelay ]\n" -+" [arp-interval ]\n" -+" [arp-ip-target ]\n" - " [lacp-rate slow (0) | fast (1)]\n" - "\n" --" bond-slave: master \n" - "\n" --" team: [config |]\n" -+" team: [config |]\n" - "\n" --" team-slave: master |]\n" -+" team-slave: master \n" -+" [config |]\n" - "\n" --" bridge: [stp yes|no>]\n" --" [priority ]\n" -+" bridge: [stp yes|no]\n" -+" [priority ]\n" - " [forward-delay <2-30>]\n" - " [hello-time <1-10>]\n" - " [max-age <6-40>]\n" - " [ageing-time <0-1000000>]\n" - " [multicast-snooping yes|no]\n" --" [mac ]\n" -+" [mac ]\n" - "\n" --" bridge-slave: master \n" - " [priority <0-63>]\n" - " [path-cost <1-65535>]\n" - " [hairpin yes|no]\n" - "\n" --" vpn: vpn-type vpnc|openvpn|pptp|openconnect|openswan|libreswan|" --"ssh|l2tp|iodine|…\n" --" [user ]\n" -+" vpn: vpn-type " -+"vpnc|openvpn|pptp|openconnect|openswan|libreswan|ssh|l2tp|iodine|...\n" -+" [user ]\n" - "\n" - " olpc-mesh: ssid \n" - " [channel <1-13>]\n" --" [dhcp-anycast ]\n" -+" [dhcp-anycast ]\n" - "\n" --" adsl: username \n" -+" adsl: username \n" - " protocol pppoa|pppoe|ipoatm\n" --" [password ]\n" -+" [password ]\n" - " [encapsulation vcmux|llc]\n" - "\n" - " tun: mode tun|tap\n" --" [owner ]\n" --" [group ]\n" -+" [owner ]\n" -+" [group ]\n" - " [pi yes|no]\n" - " [vnet-hdr yes|no]\n" - " [multi-queue yes|no]\n" - "\n" - " ip-tunnel: mode ipip|gre|sit|isatap|vti|ip6ip6|ipip6|ip6gre|vti6\n" --" remote \n" --" [local ]\n" --" [dev ]\n" -+" remote \n" -+" [local ]\n" -+" [dev ]\n" - "\n" --" macvlan: dev \n" -+" macvlan: dev \n" - " mode vepa|bridge|private|passthru|source\n" - " [tap yes|no]\n" - "\n" - " vxlan: id \n" - " remote \n" - " [local ]\n" --" [dev ]\n" -+" [dev ]\n" - " [source-port-min <0-65535>]\n" - " [source-port-max <0-65535>]\n" - " [destination-port <0-65535>]\n" - "\n" --"\n" --" SLAVE_OPTIONEN:\n" -+" SLAVE_OPTIONS:\n" - " bridge: [priority <0-63>]\n" - " [path-cost <1-65535>]\n" - " [hairpin yes|no]\n" - "\n" --" team: [config |]\n" -+" team: [config |]\n" - "\n" --" IP_OPTIONEN:\n" --" [ip4 ] [gw4 ]\n" --" [ip6 ] [gw6 ]\n" -+" IP_OPTIONS:\n" -+" [ip4 ] [gw4 ]\n" -+" [ip6 ] [gw6 ]\n" - "\n" - --#: ../clients/cli/connections.c:442 -+#: ../clients/cli/connections.c:460 - #, c-format - msgid "" - "Usage: nmcli connection modify { ARGUMENTS | help }\n" -@@ -1367,8 +1351,8 @@ msgid "" - "\n" - "Examples:\n" - "nmcli con mod home-wifi wifi.ssid rakosnicek\n" --"nmcli con mod em1-1 ipv4.method manual ipv4.addr \"192.168.1.2/24, " --"10.10.1.5/8\"\n" -+"nmcli con mod em1-1 ipv4.method manual ipv4.addr \"192.168.1.2/24, 10.10.1.5/" -+"8\"\n" - "nmcli con mod em1-1 +ipv4.dns 8.8.4.4\n" - "nmcli con mod em1-1 -ipv4.dns 1\n" - "nmcli con mod em1-1 -ipv6.addr \"abbe::cafe/56\"\n" -@@ -1387,13 +1371,12 @@ msgstr "" - "»+« oder »-« vorangestellt.\n" - "»+« ermöglicht Objekte anzuhängen, anstatt den gesamten Wert zu " - "überschreiben.\n" --"»-« ermöglicht das Entfernen einzelner Objekte an Stelle des gesamten " --"Werts.\n" -+"»-« ermöglicht das Entfernen einzelner Objekte an Stelle des gesamten Werts.\n" - "\n" - "Beispiele:\n" - "nmcli con mod home-wifi wifi.ssid rakosnicek\n" --"nmcli con mod em1-1 ipv4.method manual ipv4.addr \"192.168.1.2/24, " --"10.10.1.5/8\"\n" -+"nmcli con mod em1-1 ipv4.method manual ipv4.addr \"192.168.1.2/24, 10.10.1.5/" -+"8\"\n" - "nmcli con mod em1-1 +ipv4.dns 8.8.4.4\n" - "nmcli con mod em1-1 -ipv4.dns 1\n" - "nmcli con mod em1-1 -ipv6.addr \"abbe::cafe/56\"\n" -@@ -1401,7 +1384,7 @@ msgstr "" - "nmcli con mod bond0 -bond.options downdelay\n" - "\n" - --#: ../clients/cli/connections.c:465 -+#: ../clients/cli/connections.c:483 - #, c-format - msgid "" - "Usage: nmcli connection clone { ARGUMENTS | help }\n" -@@ -1409,8 +1392,7 @@ msgid "" - "ARGUMENTS := [--temporary] [id | uuid | path] \n" - "\n" - "Clone an existing connection profile. The newly created connection will be\n" --"the exact copy of the , except the uuid property (will be generated) " --"and\n" -+"the exact copy of the , except the uuid property (will be generated) and\n" - "id (provided as argument).\n" - "\n" - msgstr "" -@@ -1424,7 +1406,7 @@ msgstr "" - "und der id (wird als Parameter angegeben).\n" - "\n" - --#: ../clients/cli/connections.c:477 -+#: ../clients/cli/connections.c:495 - #, c-format - msgid "" - "Usage: nmcli connection edit { ARGUMENTS | help }\n" -@@ -1452,7 +1434,7 @@ msgstr "" - "Fügt ein neues Verbindungsprofil in einem interaktiven Editor hinzu.\n" - "\n" - --#: ../clients/cli/connections.c:492 -+#: ../clients/cli/connections.c:510 - #, c-format - msgid "" - "Usage: nmcli connection delete { ARGUMENTS | help }\n" -@@ -1471,7 +1453,7 @@ msgstr "" - "Das Profil wird anhand dessen Name, UUID oder D-Bus-Pfad identifiziert.\n" - "\n" - --#: ../clients/cli/connections.c:503 -+#: ../clients/cli/connections.c:521 - #, c-format - msgid "" - "Usage: nmcli connection monitor { ARGUMENTS | help }\n" -@@ -1483,17 +1465,17 @@ msgid "" - "Monitors all connection profiles in case none is specified.\n" - "\n" - msgstr "" --"Aufruf: nmcli connection monitor { PARAMETER | help }\n" -+"Aufruf: nmcli connection monitor { ARGUMENTS | help }\n" - "\n" --"PARAMETER := [id | uuid | path] …\n" -+"ARGUMENTS := [id | uuid | path] ...\n" - "\n" --"Überwacht die Aktivität eines Verbindungsprofils.\n" --"Dieser Befehl gibt eine Zeile aus, sobald sich die angegebene Verbindung " --"ändert.\n" --"Es werden alle Verbindungsprofile überwacht, sofern keines angegeben wird.\n" -+"Aktivität der Verbindungsprofile überwachen.\n" -+"Immer wenn sich die angegebene Verbindung ändert, gibt dieser Befehl eine " -+"Zeile aus.\n" -+"Überwacht alle Verbindungsprofile, falls keine angegeben sind.\n" - "\n" - --#: ../clients/cli/connections.c:515 -+#: ../clients/cli/connections.c:533 - #, c-format - msgid "" - "Usage: nmcli connection reload { help }\n" -@@ -1506,7 +1488,7 @@ msgstr "" - "Lädt alle Verbindungsdateien neu von der Festplatte.\n" - "\n" - --#: ../clients/cli/connections.c:523 -+#: ../clients/cli/connections.c:541 - #, c-format - msgid "" - "Usage: nmcli connection load { ARGUMENTS | help }\n" -@@ -1523,13 +1505,13 @@ msgstr "" - "\n" - "PARAMETER := [...]\n" - "\n" --"Lädt eine oder mehrere Verbindungsdateien von der Festplatte (bzw. lädt " --"neu).\n" -+"Lädt eine oder mehrere Verbindungsdateien von der Festplatte (bzw. lädt neu)." -+"\n" - "Verwenden Sie dies nach einer manuellen Änderung an einer Verbindungsdatei,\n" - "um sicherzustellen, dass der NetworkManager die Änderungen übernimmt.\n" - "\n" - --#: ../clients/cli/connections.c:535 -+#: ../clients/cli/connections.c:553 - #, c-format - msgid "" - "Usage: nmcli connection import { ARGUMENTS | help }\n" -@@ -1555,7 +1537,7 @@ msgstr "" - "\n" - "\n" - --#: ../clients/cli/connections.c:548 -+#: ../clients/cli/connections.c:566 - #, c-format - msgid "" - "Usage: nmcli connection export { ARGUMENTS | help }\n" -@@ -1566,207 +1548,206 @@ msgid "" - "The data are directed to standard output or to a file if a name is given.\n" - "\n" - msgstr "" --"Aufruf: nmcli connection export { PARAMETER | help }\n" -+"Aufruf: nmcli connection export { ARGUMENTS | help }\n" - "\n" --"PARAMETER := [id | uuid | path] []\n" -+"PARAMETER := [id | uuid | path] []\n" - "\n" --"Exportiert eine Verbindung. Derzeit werden nur VPN-Verbindungen " --"unterstützt.\n" --"Die Daten werden auf die Standardausgabe umgeleitet oder in eine Datei,\n" --"sofern eine angegeben wird.\n" -+"Exportiert eine Verbindung. Derzeit werden nur VPN-Verbindungen unterstützt.\n" -+"Die Daten werden in die Standardausgabe geschrieben oder in eine Datei, wenn " -+"sie benannt sind.\n" - "\n" - --#: ../clients/cli/connections.c:626 -+#: ../clients/cli/connections.c:644 - msgid "activating" - msgstr "wird aktiviert" - --#: ../clients/cli/connections.c:628 -+#: ../clients/cli/connections.c:646 - msgid "activated" - msgstr "aktiviert" - --#: ../clients/cli/connections.c:632 -+#: ../clients/cli/connections.c:650 - msgid "deactivated" - msgstr "deaktiviert" - --#: ../clients/cli/connections.c:644 -+#: ../clients/cli/connections.c:662 - msgid "VPN connecting (prepare)" - msgstr "VPN wird verbunden (wird vorbereitet)" - --#: ../clients/cli/connections.c:646 -+#: ../clients/cli/connections.c:664 - msgid "VPN connecting (need authentication)" - msgstr "VPN wird verbunden (Legitimierung wird benötigt)" - --#: ../clients/cli/connections.c:648 -+#: ../clients/cli/connections.c:666 - msgid "VPN connecting" - msgstr "VPN wird verbunden" - --#: ../clients/cli/connections.c:650 -+#: ../clients/cli/connections.c:668 - msgid "VPN connecting (getting IP configuration)" - msgstr "VPN wird verbunden (IP-Einstellungen werden ermittelt)" - --#: ../clients/cli/connections.c:652 -+#: ../clients/cli/connections.c:670 - msgid "VPN connected" - msgstr "VPN verbunden" - --#: ../clients/cli/connections.c:654 -+#: ../clients/cli/connections.c:672 - msgid "VPN connection failed" - msgstr "VPN-Verbindung gescheitert" - --#: ../clients/cli/connections.c:656 -+#: ../clients/cli/connections.c:674 - msgid "VPN disconnected" - msgstr "VPN getrennt" - --#: ../clients/cli/connections.c:726 --#, fuzzy, c-format -+#: ../clients/cli/connections.c:744 -+#, c-format - msgid "Error updating secrets for %s: %s\n" --msgstr "Fehler beim Speichern der Verbindung: %s" -+msgstr "Fehler beim Aktualisieren der geheimen Schlüssel für %s : %s\n" - --#: ../clients/cli/connections.c:746 -+#: ../clients/cli/connections.c:764 - msgid "Connection profile details" - msgstr "Details des Verbindungsprofils" - --#: ../clients/cli/connections.c:758 ../clients/cli/connections.c:1151 -+#: ../clients/cli/connections.c:776 ../clients/cli/connections.c:1169 - #, c-format - msgid "Error: 'connection show': %s" - msgstr "Fehler: »connection show«: %s" - --#: ../clients/cli/connections.c:914 ../clients/cli/settings.c:1947 -+#: ../clients/cli/connections.c:932 ../clients/cli/settings.c:1897 - msgid "never" - msgstr "nie" - --#: ../clients/cli/connections.c:1139 -+#: ../clients/cli/connections.c:1157 - msgid "Activate connection details" - msgstr "Verbindungsdetails aktivieren" - --#: ../clients/cli/connections.c:1375 -+#: ../clients/cli/connections.c:1393 - #, c-format - msgid "invalid field '%s'; allowed fields: %s and %s, or %s,%s" - msgstr "Ungültiges Feld »%s«; erlaubte Felder: %s und %s oder %s,%s" - --#: ../clients/cli/connections.c:1390 ../clients/cli/connections.c:1398 -+#: ../clients/cli/connections.c:1408 ../clients/cli/connections.c:1416 - #, c-format - msgid "'%s' has to be alone" - msgstr "»%s« muss allein stehen" - - #. Add headers --#: ../clients/cli/connections.c:1616 -+#: ../clients/cli/connections.c:1634 - msgid "NetworkManager active profiles" - msgstr "NetworkManager aktive Profile" - --#: ../clients/cli/connections.c:1617 -+#: ../clients/cli/connections.c:1635 - msgid "NetworkManager connection profiles" - msgstr "NetworkManager Verbindungsprofile" - --#: ../clients/cli/connections.c:1663 ../clients/cli/connections.c:2378 --#: ../clients/cli/connections.c:2400 ../clients/cli/connections.c:2409 --#: ../clients/cli/connections.c:2418 ../clients/cli/connections.c:2577 --#: ../clients/cli/connections.c:10152 ../clients/cli/connections.c:10269 --#: ../clients/cli/connections.c:10401 ../clients/cli/connections.c:10534 --#: ../clients/cli/connections.c:10644 ../clients/cli/connections.c:10655 --#: ../clients/cli/connections.c:10754 ../clients/cli/devices.c:2402 --#: ../clients/cli/devices.c:2410 ../clients/cli/devices.c:2733 --#: ../clients/cli/devices.c:2740 ../clients/cli/devices.c:2754 --#: ../clients/cli/devices.c:2761 ../clients/cli/devices.c:2778 --#: ../clients/cli/devices.c:2786 ../clients/cli/devices.c:2799 --#: ../clients/cli/devices.c:3163 ../clients/cli/devices.c:3170 --#: ../clients/cli/devices.c:3177 ../clients/cli/devices.c:3189 --#: ../clients/cli/devices.c:3202 ../clients/cli/devices.c:3209 --#: ../clients/cli/devices.c:3381 ../clients/cli/devices.c:3388 --#: ../clients/cli/devices.c:3561 -+#: ../clients/cli/connections.c:1681 ../clients/cli/connections.c:2389 -+#: ../clients/cli/connections.c:2411 ../clients/cli/connections.c:2420 -+#: ../clients/cli/connections.c:2429 ../clients/cli/connections.c:2588 -+#: ../clients/cli/connections.c:10156 ../clients/cli/connections.c:10273 -+#: ../clients/cli/connections.c:10405 ../clients/cli/connections.c:10538 -+#: ../clients/cli/connections.c:10648 ../clients/cli/connections.c:10659 -+#: ../clients/cli/connections.c:10758 ../clients/cli/devices.c:2344 -+#: ../clients/cli/devices.c:2352 ../clients/cli/devices.c:2675 -+#: ../clients/cli/devices.c:2682 ../clients/cli/devices.c:2696 -+#: ../clients/cli/devices.c:2703 ../clients/cli/devices.c:2720 -+#: ../clients/cli/devices.c:2728 ../clients/cli/devices.c:2741 -+#: ../clients/cli/devices.c:3105 ../clients/cli/devices.c:3112 -+#: ../clients/cli/devices.c:3119 ../clients/cli/devices.c:3131 -+#: ../clients/cli/devices.c:3144 ../clients/cli/devices.c:3151 -+#: ../clients/cli/devices.c:3323 ../clients/cli/devices.c:3330 -+#: ../clients/cli/devices.c:3503 - #, c-format - msgid "Error: %s argument is missing." - msgstr "Fehler: Argument %s fehlt." - --#: ../clients/cli/connections.c:1678 -+#: ../clients/cli/connections.c:1696 - #, c-format - msgid "Error: %s - no such connection profile." - msgstr "Fehler: Verbindungsprofil %s existiert nicht." - --#: ../clients/cli/connections.c:1737 ../clients/cli/connections.c:2441 --#: ../clients/cli/connections.c:11155 ../clients/cli/devices.c:3350 --#: ../clients/cli/devices.c:3831 ../clients/cli/general.c:536 --#: ../clients/cli/general.c:585 ../clients/cli/general.c:602 --#: ../clients/cli/general.c:641 ../clients/cli/general.c:655 --#: ../clients/cli/general.c:773 ../clients/cli/general.c:820 --#: ../clients/cli/general.c:840 -+#: ../clients/cli/connections.c:1755 ../clients/cli/connections.c:2452 -+#: ../clients/cli/connections.c:11162 ../clients/cli/devices.c:3292 -+#: ../clients/cli/devices.c:3779 ../clients/cli/general.c:539 -+#: ../clients/cli/general.c:588 ../clients/cli/general.c:605 -+#: ../clients/cli/general.c:644 ../clients/cli/general.c:658 -+#: ../clients/cli/general.c:776 ../clients/cli/general.c:823 -+#: ../clients/cli/general.c:843 - #, c-format - msgid "Error: %s." - msgstr "Fehler: %s." - --#: ../clients/cli/connections.c:1833 -+#: ../clients/cli/connections.c:1851 - #, c-format - msgid "no active connection on device '%s'" - msgstr "Keine aktive Verbindung auf Gerät »%s«" - --#: ../clients/cli/connections.c:1841 -+#: ../clients/cli/connections.c:1859 - msgid "no active connection or device" - msgstr "Keine aktive Verbindung oder Gerät" - --#: ../clients/cli/connections.c:1892 -+#: ../clients/cli/connections.c:1910 - #, c-format - msgid "device '%s' not compatible with connection '%s'" - msgstr "Gerät »%s« ist nicht mit der Verbindung »%s« kompatibel" - --#: ../clients/cli/connections.c:1895 -+#: ../clients/cli/connections.c:1913 - #, c-format - msgid "no device found for connection '%s'" - msgstr "Für die Verbindung »%s« wurde kein Gerät gefunden" - --#: ../clients/cli/connections.c:1907 -+#: ../clients/cli/connections.c:1925 - msgid "unknown reason" - msgstr "unbekannter Grund" - --#: ../clients/cli/connections.c:1909 ../clients/cli/general.c:277 -+#: ../clients/cli/connections.c:1927 ../clients/cli/general.c:277 - msgid "none" - msgstr "kein" - --#: ../clients/cli/connections.c:1911 -+#: ../clients/cli/connections.c:1929 - msgid "the user was disconnected" - msgstr "Der Benutzer wurde getrennt" - --#: ../clients/cli/connections.c:1913 -+#: ../clients/cli/connections.c:1931 - msgid "the base network connection was interrupted" - msgstr "Die Basisverbindung wurde unterbrochen" - --#: ../clients/cli/connections.c:1915 -+#: ../clients/cli/connections.c:1933 - msgid "the VPN service stopped unexpectedly" - msgstr "Der VPN-Dienst wurde unerwartet gestoppt" - --#: ../clients/cli/connections.c:1917 -+#: ../clients/cli/connections.c:1935 - msgid "the VPN service returned invalid configuration" - msgstr "Der VPN-Dienst gab ungültige Einstellungen zurück" - --#: ../clients/cli/connections.c:1919 -+#: ../clients/cli/connections.c:1937 - msgid "the connection attempt timed out" - msgstr "Der Verbindungsversuch benötigte zu viel Zeit" - --#: ../clients/cli/connections.c:1921 -+#: ../clients/cli/connections.c:1939 - msgid "the VPN service did not start in time" - msgstr "Der VPN-Dienst wurde nicht rechtzeitig gestartet" - --#: ../clients/cli/connections.c:1923 -+#: ../clients/cli/connections.c:1941 - msgid "the VPN service failed to start" - msgstr "Der VPN-Dienst konnte nicht gestartet werden" - --#: ../clients/cli/connections.c:1925 -+#: ../clients/cli/connections.c:1943 - msgid "no valid VPN secrets" - msgstr "Keine gültigen VPN-Schlüssel" - --#: ../clients/cli/connections.c:1927 -+#: ../clients/cli/connections.c:1945 - msgid "invalid VPN secrets" - msgstr "Ungültige VPN-Schlüssel" - --#: ../clients/cli/connections.c:1929 -+#: ../clients/cli/connections.c:1947 - msgid "the connection was removed" - msgstr "Die Verbindung wurde entfernt" - --#: ../clients/cli/connections.c:1951 ../clients/cli/connections.c:1986 --#: ../clients/cli/connections.c:2147 ../clients/cli/connections.c:8450 -+#: ../clients/cli/connections.c:1969 ../clients/cli/connections.c:1997 -+#: ../clients/cli/connections.c:2158 ../clients/cli/connections.c:8454 - #, c-format - msgid "Connection successfully activated (D-Bus active path: %s)\n" - msgstr "Verbindung wurde erfolgreich aktiviert (aktiver D-Bus-Pfad: %s)\n" - --#: ../clients/cli/connections.c:1959 -+#: ../clients/cli/connections.c:1976 - #, c-format - msgid "" - "Connection successfully activated (master waiting for slaves) (D-Bus active " -@@ -1775,209 +1756,204 @@ msgstr "" - "Verbindung wurde erfolgreich aktiviert (master wartet auf slaves) (aktiver D-" - "Bus-Pfad: %s)\n" - --#: ../clients/cli/connections.c:1966 ../clients/cli/connections.c:8456 --#, c-format --msgid "Error: Connection activation failed.\n" --msgstr "Fehler: Aktivierung der Verbindung ist gescheitert.\n" -- --#: ../clients/cli/connections.c:1969 ../clients/cli/connections.c:1991 -+#: ../clients/cli/connections.c:1980 ../clients/cli/connections.c:2002 - #, c-format - msgid "Error: Connection activation failed." - msgstr "Fehler: Aktivierung der Verbindung ist gescheitert." - --#: ../clients/cli/connections.c:2042 -+#: ../clients/cli/connections.c:2053 - #, c-format - msgid "VPN connection successfully activated (D-Bus active path: %s)\n" - msgstr "VPN-Verbindung wurde erfolgreich aktiviert (aktiver D-Bus-Pfad: %s)\n" - --#: ../clients/cli/connections.c:2050 -+#: ../clients/cli/connections.c:2061 - #, c-format - msgid "Error: Connection activation failed: %s." - msgstr "Fehler: Aktivierung der Verbindung ist gescheitert: %s." - --#: ../clients/cli/connections.c:2069 ../clients/cli/devices.c:1506 -+#: ../clients/cli/connections.c:2080 ../clients/cli/devices.c:1426 - #, c-format - msgid "Error: Timeout %d sec expired." - msgstr "Fehler: Zeitbeschränkung von %d Sekunden ist abgelaufen." - --#: ../clients/cli/connections.c:2129 -+#: ../clients/cli/connections.c:2140 - #, c-format - msgid "Error: Connection activation failed: %s" - msgstr "Fehler: Aktivierung der Verbindung ist gescheitert: %s" - --#: ../clients/cli/connections.c:2214 -+#: ../clients/cli/connections.c:2225 - #, c-format - msgid "failed to read passwd-file '%s': %s" - msgstr "Fehler: Lesen der passwd-Datei »%s« ist fehlgeschlagen: %s" - --#: ../clients/cli/connections.c:2226 -+#: ../clients/cli/connections.c:2237 - #, c-format - msgid "missing colon in 'password' entry '%s'" - msgstr "Fehlender Doppelpunkt im Passwort-Eintrag »%s«" - --#: ../clients/cli/connections.c:2234 -+#: ../clients/cli/connections.c:2245 - #, c-format - msgid "missing dot in 'password' entry '%s'" - msgstr "Fehlender Punkt im Passwort-Eintrag »%s«" - --#: ../clients/cli/connections.c:2247 -+#: ../clients/cli/connections.c:2258 - #, c-format - msgid "invalid setting name in 'password' entry '%s'" - msgstr "Ungültiger Einstellungsname im Passwort-Eintrag »%s«" - --#: ../clients/cli/connections.c:2303 -+#: ../clients/cli/connections.c:2314 - #, c-format - msgid "unknown device '%s'." - msgstr "Unbekanntes Gerät »%s«," - --#: ../clients/cli/connections.c:2308 -+#: ../clients/cli/connections.c:2319 - msgid "neither a valid connection nor device given" - msgstr "weder eine gültige Verbindung noch ein Gerät angegeben" - --#: ../clients/cli/connections.c:2391 -+#: ../clients/cli/connections.c:2402 - #, c-format - msgid "Error: Connection '%s' does not exist." - msgstr "Fehler: Verbindung »%s« ist nicht vorhanden." - --#: ../clients/cli/connections.c:2426 ../clients/cli/devices.c:1405 --#: ../clients/cli/devices.c:2416 ../clients/cli/devices.c:2810 --#: ../clients/cli/devices.c:3394 -+#: ../clients/cli/connections.c:2437 ../clients/cli/devices.c:1325 -+#: ../clients/cli/devices.c:2358 ../clients/cli/devices.c:2752 -+#: ../clients/cli/devices.c:3336 - #, c-format - msgid "Unknown parameter: %s\n" - msgstr "Unbekannter Parameter: %s\n" - --#: ../clients/cli/connections.c:2451 -+#: ../clients/cli/connections.c:2462 - msgid "preparing" - msgstr "Vorbereitung läuft" - --#: ../clients/cli/connections.c:2472 -+#: ../clients/cli/connections.c:2483 - #, c-format - msgid "Connection '%s' (%s) successfully deleted.\n" - msgstr "Verbindung »%s« (%s) erfolgreich gelöscht.\n" - --#: ../clients/cli/connections.c:2488 -+#: ../clients/cli/connections.c:2499 - #, c-format - msgid "Connection '%s' successfully deactivated (D-Bus active path: %s)\n" - msgstr "" - "Verbindung »%s« wurde erfolgreich deaktiviert (aktiver D-Bus-Pfad: %s)\n" - --#: ../clients/cli/connections.c:2559 ../clients/cli/connections.c:10387 --#: ../clients/cli/connections.c:10586 -+#: ../clients/cli/connections.c:2570 ../clients/cli/connections.c:10391 -+#: ../clients/cli/connections.c:10590 - #, c-format - msgid "Error: No connection specified." - msgstr "Fehler: Keine Verbindung angegeben." - --#: ../clients/cli/connections.c:2591 -+#: ../clients/cli/connections.c:2602 - #, c-format - msgid "Error: '%s' is not an active connection.\n" - msgstr "Fehler: »%s« ist keine aktive Verbindung.\n" - --#: ../clients/cli/connections.c:2592 ../clients/cli/connections.c:10416 -+#: ../clients/cli/connections.c:2603 ../clients/cli/connections.c:10420 - #, c-format - msgid "Error: not all active connections found." - msgstr "Fehler: Es wurden nicht alle aktiven Verbindungen gefunden." - --#: ../clients/cli/connections.c:2601 -+#: ../clients/cli/connections.c:2612 - #, c-format - msgid "Error: no active connection provided." - msgstr "Fehler: Keine aktive Verbindung angegeben." - --#: ../clients/cli/connections.c:2943 ../clients/cli/utils.c:648 -+#: ../clients/cli/connections.c:2955 ../clients/cli/utils.c:702 - #, c-format - msgid "'%s' not among [%s]" - msgstr "»%s« ist nicht unter [%s]" - --#: ../clients/cli/connections.c:3020 -+#: ../clients/cli/connections.c:3032 - #, c-format - msgid "Error: '%s': '%s' is not a valid %s MAC address." - msgstr "Fehler: »%s«: »%s« ist keine gültige %s MAC-Adresse." - - #. Ask for optional arguments --#: ../clients/cli/connections.c:3021 ../clients/cli/connections.c:3553 --#: ../clients/tui/nm-editor-utils.c:163 ../libnm-core/nm-connection.c:1729 -+#: ../clients/cli/connections.c:3033 ../clients/cli/connections.c:3565 -+#: ../clients/tui/nm-editor-utils.c:163 ../libnm-core/nm-connection.c:1716 - #: ../libnm-glib/nm-device.c:1861 ../libnm/nm-device.c:1812 - msgid "InfiniBand" - msgstr "InfiniBand" - --#: ../clients/cli/connections.c:3021 ../clients/tui/nm-editor-utils.c:146 -+#: ../clients/cli/connections.c:3033 ../clients/tui/nm-editor-utils.c:146 - #: ../libnm-glib/nm-device.c:1849 ../libnm/nm-device.c:1800 - msgid "Ethernet" - msgstr "Ethernet" - --#: ../clients/cli/connections.c:3041 -+#: ../clients/cli/connections.c:3053 - #, c-format - msgid "Error: 'mtu': '%s' is not a valid MTU." - msgstr "Fehler: »mtu«: »%s« ist keine gültige MTU." - --#: ../clients/cli/connections.c:3057 -+#: ../clients/cli/connections.c:3069 - #, c-format - msgid "Error: 'parent': '%s' is not a valid interface name." - msgstr "Fehler: »parent«: »%s« ist kein gültiger Name einer Schnittstelle." - --#: ../clients/cli/connections.c:3078 -+#: ../clients/cli/connections.c:3090 - #, c-format - msgid "Error: 'p-key': '%s' is not a valid InfiniBand P_KEY." - msgstr "Fehler: »p-key«: »%s« ist kein gültiger InfiniBand »P_KEY«." - --#: ../clients/cli/connections.c:3093 -+#: ../clients/cli/connections.c:3105 - #, c-format - msgid "Error: '%s' is not a valid UID/GID." - msgstr "Fehler: »%s« ist keine gültige UID/GID." - --#: ../clients/cli/connections.c:3137 -+#: ../clients/cli/connections.c:3149 - #, c-format - msgid "Error: '%s': '%s' is not a valid %s %s." - msgstr "Fehler: »%s«: »%s« ist kein gültiges %s %s." - --#: ../clients/cli/connections.c:3150 -+#: ../clients/cli/connections.c:3162 - msgid "Wi-Fi mode" - msgstr "WLAN-Modus" - --#: ../clients/cli/connections.c:3159 -+#: ../clients/cli/connections.c:3171 - msgid "InfiniBand transport mode" - msgstr "InfiniBand Transportmodus" - --#: ../clients/cli/connections.c:3171 -+#: ../clients/cli/connections.c:3183 - msgid "ADSL protocol" - msgstr "ADSL-Protokoll" - --#: ../clients/cli/connections.c:3182 -+#: ../clients/cli/connections.c:3194 - msgid "ADSL encapsulation" - msgstr "ADSL-Einkapselung" - --#: ../clients/cli/connections.c:3191 -+#: ../clients/cli/connections.c:3203 - msgid "TUN device mode" - msgstr "TUN-Gerätemodus" - --#: ../clients/cli/connections.c:3204 -+#: ../clients/cli/connections.c:3216 - #, c-format - msgid "Error: 'flags': '%s' is not valid; use <0-7>." - msgstr "Fehler: »flags«: »%s« ist ungültig. Verwenden Sie <0-7>." - --#: ../clients/cli/connections.c:3226 -+#: ../clients/cli/connections.c:3238 - #, c-format - msgid "Error: '%s': '%s' is not valid; %s " - msgstr "Fehler: »%s«: »%s« ist ungültig; %s " - --#: ../clients/cli/connections.c:3404 -+#: ../clients/cli/connections.c:3416 - #, c-format - msgid "Warning: master='%s' doesn't refer to any existing profile.\n" - msgstr "Warnung: master=»%s« bezieht sich auf kein vorhandenes Profil.\n" - --#: ../clients/cli/connections.c:3429 -+#: ../clients/cli/connections.c:3441 - #, c-format - msgid "Error: '%s': '%s' is not valid; use <%u-%u>." - msgstr "Fehler: »%s«: »%s« ist ungültig; verwenden Sie <%u-%u>." - - #. Ask for optional arguments. --#: ../clients/cli/connections.c:3485 -+#: ../clients/cli/connections.c:3497 - #, c-format - msgid "There is %d optional argument for '%s' connection type.\n" - msgid_plural "There are %d optional arguments for '%s' connection type.\n" - msgstr[0] "Es gibt %d optionales Argument für den Verbindungstyp »%s«.\n" - msgstr[1] "Es gibt %d optionale Argumente für den Verbindungstyp »%s«.\n" - --#: ../clients/cli/connections.c:3488 -+#: ../clients/cli/connections.c:3500 - #, c-format - msgid "Do you want to provide it? %s" - msgid_plural "Do you want to provide them? %s" -@@ -1985,556 +1961,554 @@ msgstr[0] "Möchten Sie es zur Verfügung stellen? »%s«" - msgstr[1] "Möchten Sie diese zur Verfügung stellen? »%s«" - - #. Ask for optional arguments --#: ../clients/cli/connections.c:3505 -+#: ../clients/cli/connections.c:3517 - msgid "ethernet" - msgstr "Ethernet" - --#: ../clients/cli/connections.c:3510 ../clients/cli/connections.c:3558 --#: ../clients/cli/connections.c:3692 ../clients/cli/connections.c:3771 -+#: ../clients/cli/connections.c:3522 ../clients/cli/connections.c:3570 -+#: ../clients/cli/connections.c:3704 ../clients/cli/connections.c:3783 - msgid "MTU [auto]: " - msgstr "MTU [automatisch]: " - --#: ../clients/cli/connections.c:3521 ../clients/cli/connections.c:3569 --#: ../clients/cli/connections.c:3664 ../clients/cli/connections.c:3703 --#: ../clients/cli/connections.c:4089 -+#: ../clients/cli/connections.c:3533 ../clients/cli/connections.c:3581 -+#: ../clients/cli/connections.c:3676 ../clients/cli/connections.c:3715 -+#: ../clients/cli/connections.c:4101 - msgid "MAC [none]: " - msgstr "MAC [keine]: " - --#: ../clients/cli/connections.c:3532 -+#: ../clients/cli/connections.c:3544 - msgid "Cloned MAC [none]: " - msgstr "Geklonte MAC [keine]: " - --#: ../clients/cli/connections.c:3580 -+#: ../clients/cli/connections.c:3592 - #, c-format - msgid "Transport mode %s" - msgstr "Übertragungsmodus %s" - --#: ../clients/cli/connections.c:3593 -+#: ../clients/cli/connections.c:3605 - msgid "Parent interface [none]: " - msgstr "Übergeordnete Schnittstelle [keine]: " - --#: ../clients/cli/connections.c:3604 -+#: ../clients/cli/connections.c:3616 - msgid "P_KEY [none]: " - msgstr "P_KEY [keiner]: " - --#: ../clients/cli/connections.c:3614 -+#: ../clients/cli/connections.c:3626 - #, c-format - msgid "Error: 'p-key' is mandatory when 'parent' is specified.\n" - msgstr "Fehler: »p-key« wird benötigt wenn »parent« angegeben ist.\n" - - #. Ask for optional arguments --#: ../clients/cli/connections.c:3631 ../clients/tui/nm-editor-utils.c:154 -+#: ../clients/cli/connections.c:3643 ../clients/tui/nm-editor-utils.c:154 - #: ../libnm-glib/nm-device.c:1851 ../libnm/nm-device.c:1802 - msgid "Wi-Fi" - msgstr "Wi-Fi" - --#: ../clients/cli/connections.c:3639 ../clients/cli/connections.c:6192 -+#: ../clients/cli/connections.c:3651 ../clients/cli/connections.c:6199 - #, c-format - msgid "Mode %s" - msgstr "Modus %s" - - #. Ask for optional 'wimax' arguments. --#: ../clients/cli/connections.c:3659 ../libnm-glib/nm-device.c:1857 -+#: ../clients/cli/connections.c:3671 ../libnm-glib/nm-device.c:1857 - #: ../libnm/nm-device.c:1808 - msgid "WiMAX" - msgstr "WiMAX" - - #. Ask for optional 'pppoe' arguments. --#: ../clients/cli/connections.c:3682 -+#: ../clients/cli/connections.c:3694 - msgid "PPPoE" - msgstr "PPPoE" - --#: ../clients/cli/connections.c:3686 ../clients/cli/connections.c:3724 --#: ../clients/cli/connections.c:4211 -+#: ../clients/cli/connections.c:3698 ../clients/cli/connections.c:3736 -+#: ../clients/cli/connections.c:4223 - msgid "Password [none]: " - msgstr "Passwort [keines]: " - --#: ../clients/cli/connections.c:3688 -+#: ../clients/cli/connections.c:3700 - msgid "Service [none]: " - msgstr "Dienst [keiner]: " - - #. Ask for optional 'gsm' or 'cdma' arguments. --#: ../clients/cli/connections.c:3718 -+#: ../clients/cli/connections.c:3730 - msgid "mobile broadband" - msgstr "Mobiles Breitband" - --#: ../clients/cli/connections.c:3722 ../clients/cli/connections.c:4161 -+#: ../clients/cli/connections.c:3734 ../clients/cli/connections.c:4173 - msgid "Username [none]: " - msgstr "Benutzername [keiner]: " - - #. Ask for optional 'bluetooth' arguments. --#: ../clients/cli/connections.c:3737 -+#: ../clients/cli/connections.c:3749 - msgid "bluetooth" - msgstr "bluetooth" - --#: ../clients/cli/connections.c:3744 -+#: ../clients/cli/connections.c:3756 - #, c-format - msgid "Bluetooth type %s" - msgstr "Bluetooth-Typ %s" - --#: ../clients/cli/connections.c:3750 -+#: ../clients/cli/connections.c:3762 - #, c-format - msgid "Error: 'bt-type': '%s' is not a valid bluetooth type.\n" - msgstr "Fehler: »bt-type«: »%s« ist kein gültiger Bluetooth-Typ.\n" - - #. Ask for optional 'vlan' arguments. - #. 13 --#: ../clients/cli/connections.c:3766 ../clients/cli/devices.c:249 -+#: ../clients/cli/connections.c:3778 ../clients/cli/devices.c:239 - #: ../clients/tui/nm-editor-utils.c:217 ../clients/tui/nmt-page-vlan.c:94 --#: ../libnm-core/nm-connection.c:1727 ../libnm-glib/nm-device.c:1869 -+#: ../libnm-core/nm-connection.c:1714 ../libnm-glib/nm-device.c:1869 - #: ../libnm-util/nm-connection.c:1632 ../libnm/nm-device.c:1820 - msgid "VLAN" - msgstr "VLAN" - --#: ../clients/cli/connections.c:3782 -+#: ../clients/cli/connections.c:3794 - msgid "VLAN flags (<0-7>) [none]: " - msgstr "VLAN-Flags (<0-7>) [keine]: " - --#: ../clients/cli/connections.c:3793 -+#: ../clients/cli/connections.c:3805 - msgid "Ingress priority maps [none]: " - msgstr "Eingehende Prioritätsumschlüsselungen [keine]:" - --#: ../clients/cli/connections.c:3804 -+#: ../clients/cli/connections.c:3816 - msgid "Egress priority maps [none]: " - msgstr "Ausgehende Prioritätsumschlüsselungen [keine]:" - --#: ../clients/cli/connections.c:3815 -+#: ../clients/cli/connections.c:3827 - msgid "Bonding mode [balance-rr]: " - msgstr "Bündelungsmodus [balance-rr]: " - - #. Ask for optional 'bond' arguments. --#: ../clients/cli/connections.c:3831 -+#: ../clients/cli/connections.c:3843 - msgid "bond" - msgstr "Bündelung" - --#: ../clients/cli/connections.c:3853 -+#: ../clients/cli/connections.c:3865 - msgid "Bonding primary interface [none]: " - msgstr "Primäre Schnittstelle der Bündelung [keine]: " - --#: ../clients/cli/connections.c:3856 -+#: ../clients/cli/connections.c:3868 - #, c-format - msgid "Error: 'primary': '%s' is not a valid interface name.\n" - msgstr "Fehler: »primary«: »%s« ist kein gültiger Name einer Schnittstelle.\n" - --#: ../clients/cli/connections.c:3864 -+#: ../clients/cli/connections.c:3876 - #, c-format - msgid "Bonding monitoring mode %s" - msgstr "Überwachungsmodus %s der Bündelung" - --#: ../clients/cli/connections.c:3870 -+#: ../clients/cli/connections.c:3882 - #, c-format - msgid "Error: '%s' is not a valid monitoring mode; use '%s' or '%s'.\n" - msgstr "" - "Fehler: »%s« ist kein gültiger Überwachungsmodus; verwenden Sie »%s« oder " - "»%s«.\n" - --#: ../clients/cli/connections.c:3879 -+#: ../clients/cli/connections.c:3891 - msgid "Bonding miimon [100]: " - msgstr "Bündelung »miimon« [100]: " - --#: ../clients/cli/connections.c:3882 -+#: ../clients/cli/connections.c:3894 - #, c-format - msgid "Error: 'miimon': '%s' is not a valid number <0-%u>.\n" - msgstr "Fehler: »miimon«: »%s« ist keine gültige Zahl <0-%u>.\n" - --#: ../clients/cli/connections.c:3890 -+#: ../clients/cli/connections.c:3902 - msgid "Bonding downdelay [0]: " - msgstr "Bündelung »downdelay« [0]: " - --#: ../clients/cli/connections.c:3893 -+#: ../clients/cli/connections.c:3905 - #, c-format - msgid "Error: 'downdelay': '%s' is not a valid number <0-%u>.\n" - msgstr "Fehler: »downdelay«: »%s« ist keine gültige Zahl <0-%u>.\n" - --#: ../clients/cli/connections.c:3901 -+#: ../clients/cli/connections.c:3913 - msgid "Bonding updelay [0]: " - msgstr "Bündelung »updelay« [0]: " - --#: ../clients/cli/connections.c:3904 -+#: ../clients/cli/connections.c:3916 - #, c-format - msgid "Error: 'updelay': '%s' is not a valid number <0-%u>.\n" - msgstr "Fehler: »updelay«: »%s« ist keine gültige Zahl <0-%u>.\n" - --#: ../clients/cli/connections.c:3913 -+#: ../clients/cli/connections.c:3925 - msgid "Bonding arp-interval [0]: " - msgstr "Bündelung »arp-interval« [0]: " - --#: ../clients/cli/connections.c:3916 -+#: ../clients/cli/connections.c:3928 - #, c-format - msgid "Error: 'arp-interval': '%s' is not a valid number <0-%u>.\n" - msgstr "Fehler: »arp-interval«: »%s« ist keine gültige Zahl <0-%u>.\n" - - #. FIXME: verify the string --#: ../clients/cli/connections.c:3924 -+#: ../clients/cli/connections.c:3936 - msgid "Bonding arp-ip-target [none]: " - msgstr "Bündelung »arp-ip-target« [keines]: " - --#: ../clients/cli/connections.c:3931 -+#: ../clients/cli/connections.c:3943 - msgid "LACP rate ('slow' or 'fast') [slow]: " - msgstr "LACP-Rate (»slow« oder »fast«) [slow]: " - --#: ../clients/cli/connections.c:3937 -+#: ../clients/cli/connections.c:3949 - #, c-format - msgid "Error: 'lacp_rate': '%s' is invalid ('slow' or 'fast').\n" - msgstr "Fehler: »lacp_rate«: »%s« ist ungültig (»slow« oder »fast«).\n" - --#: ../clients/cli/connections.c:3960 -+#: ../clients/cli/connections.c:3972 - msgid "Team JSON configuration [none]: " - msgstr "JSON-Konfiguration der Bündelung [keine]: " - --#: ../clients/cli/connections.c:3977 -+#: ../clients/cli/connections.c:3989 - msgid "team" - msgstr "Bündelung" - --#: ../clients/cli/connections.c:3983 -+#: ../clients/cli/connections.c:3995 - msgid "team-slave" - msgstr "Bündelungs-Slave" - - #. Ask for optional 'bridge' arguments. --#: ../clients/cli/connections.c:3995 -+#: ../clients/cli/connections.c:4007 - msgid "bridge" - msgstr "Brücke" - --#: ../clients/cli/connections.c:4001 -+#: ../clients/cli/connections.c:4013 - #, c-format - msgid "Enable STP %s" - msgstr "STP %s aktivieren" - --#: ../clients/cli/connections.c:4006 -+#: ../clients/cli/connections.c:4018 - #, c-format - msgid "Error: 'stp': %s.\n" - msgstr "Fehler: »STP«: %s \n" - --#: ../clients/cli/connections.c:4014 -+#: ../clients/cli/connections.c:4026 - msgid "STP priority [32768]: " - msgstr "STP-Priorität [32768]: " - --#: ../clients/cli/connections.c:4018 -+#: ../clients/cli/connections.c:4030 - #, c-format - msgid "Error: 'priority': '%s' is not a valid number <0-%d>.\n" - msgstr "Fehler: »priority«: »%s« ist keine gültige Zahl <0-%d>.\n" - --#: ../clients/cli/connections.c:4026 -+#: ../clients/cli/connections.c:4038 - msgid "Forward delay [15]: " - msgstr "Weiterleitungsverzögerung [15]: " - --#: ../clients/cli/connections.c:4030 -+#: ../clients/cli/connections.c:4042 - #, c-format - msgid "Error: 'forward-delay': '%s' is not a valid number <2-30>.\n" - msgstr "Fehler: »forward-delay«: »%s« ist keine gültige Zahl <2-30>.\n" - --#: ../clients/cli/connections.c:4039 -+#: ../clients/cli/connections.c:4051 - msgid "Hello time [2]: " - msgstr "Hello-Zeit [2]: " - --#: ../clients/cli/connections.c:4043 -+#: ../clients/cli/connections.c:4055 - #, c-format - msgid "Error: 'hello-time': '%s' is not a valid number <1-10>.\n" - msgstr "Fehler: »hello-time«: »%s« ist keine gültige Zahl <1-10>.\n" - --#: ../clients/cli/connections.c:4051 -+#: ../clients/cli/connections.c:4063 - msgid "Max age [20]: " - msgstr "Maximales Alter [20]: " - --#: ../clients/cli/connections.c:4055 -+#: ../clients/cli/connections.c:4067 - #, c-format - msgid "Error: 'max-age': '%s' is not a valid number <6-40>.\n" - msgstr "Fehler: »max.age«: »%s« ist keine gültige Zahl <6-40>.\n" - --#: ../clients/cli/connections.c:4063 -+#: ../clients/cli/connections.c:4075 - msgid "MAC address ageing time [300]: " - msgstr "Verfallszeit für MAC-Adressen [300]: " - --#: ../clients/cli/connections.c:4067 -+#: ../clients/cli/connections.c:4079 - #, c-format - msgid "Error: 'ageing-time': '%s' is not a valid number <0-1000000>.\n" - msgstr "Fehler: 'ageing-time': »%s« ist keine gültige Zahl <0-1000000>.\n" - --#: ../clients/cli/connections.c:4076 -+#: ../clients/cli/connections.c:4088 - #, c-format - msgid "Enable IGMP snooping %s" - msgstr "IGMP-Snooping %s aktivieren" - --#: ../clients/cli/connections.c:4081 -+#: ../clients/cli/connections.c:4093 - #, c-format - msgid "Error: 'multicast-snooping': %s.\n" - msgstr "Fehler: »multicast-snooping«: %s \n" - - #. Ask for optional 'bridge-slave' arguments. --#: ../clients/cli/connections.c:4108 -+#: ../clients/cli/connections.c:4120 - msgid "bridge-slave" - msgstr "Sklave der Netzwerkbrücke" - --#: ../clients/cli/connections.c:4113 -+#: ../clients/cli/connections.c:4125 - msgid "Bridge port priority [32]: " - msgstr "Bridge-Port-Priorität [32]: " - --#: ../clients/cli/connections.c:4126 -+#: ../clients/cli/connections.c:4138 - msgid "Bridge port STP path cost [100]: " - msgstr "Bridge-Port-STP-Pfadkosten [100]: " - --#: ../clients/cli/connections.c:4140 -+#: ../clients/cli/connections.c:4152 - #, c-format - msgid "Hairpin %s" - msgstr "Hairpin %s" - --#: ../clients/cli/connections.c:4145 -+#: ../clients/cli/connections.c:4157 - #, c-format - msgid "Error: 'hairpin': %s.\n" - msgstr "Fehler: »hairpin«: %s \n" - - #. Ask for optional 'olpc' arguments. --#: ../clients/cli/connections.c:4172 ../libnm-glib/nm-device.c:1855 -+#: ../clients/cli/connections.c:4184 ../libnm-glib/nm-device.c:1855 - #: ../libnm/nm-device.c:1806 - msgid "OLPC Mesh" - msgstr "OLPC-Mesh" - --#: ../clients/cli/connections.c:4177 -+#: ../clients/cli/connections.c:4189 - msgid "OLPC Mesh channel [1]: " - msgstr "»OLPC Mesh« Kanal [1]: " - --#: ../clients/cli/connections.c:4180 -+#: ../clients/cli/connections.c:4192 - #, c-format - msgid "Error: 'channel': '%s' is not a valid number <1-13>.\n" - msgstr "Fehler: »channel«: »%s« ist keine gültige Zahl <1-13>.\n" - --#: ../clients/cli/connections.c:4188 -+#: ../clients/cli/connections.c:4200 - msgid "DHCP anycast MAC address [none]: " - msgstr "DHCP anycast MAC-Adresse [keine]: " - - #. Ask for optional 'adsl' arguments. --#: ../clients/cli/connections.c:4207 ../libnm-glib/nm-device.c:1871 -+#: ../clients/cli/connections.c:4219 ../libnm-glib/nm-device.c:1871 - #: ../libnm/nm-device.c:1822 - msgid "ADSL" - msgstr "ADSL" - --#: ../clients/cli/connections.c:4215 -+#: ../clients/cli/connections.c:4227 - #, c-format - msgid "ADSL encapsulation %s" - msgstr "ADSL-Einkapselung %s" - - #. Ask for optional 'macvlan' arguments. --#: ../clients/cli/connections.c:4233 -+#: ../clients/cli/connections.c:4245 - msgid "macvlan" - msgstr "macvlan" - --#: ../clients/cli/connections.c:4239 -+#: ../clients/cli/connections.c:4251 - #, c-format - msgid "Tap %s" --msgstr "" -+msgstr "Antippen %s" - --#: ../clients/cli/connections.c:4244 -+#: ../clients/cli/connections.c:4256 - #, c-format - msgid "Error: 'tap': %s.\n" - msgstr "Fehler: »tap«: %s \n" - - # virtuelles LAN, z.B. in virtualisierten Umgebungen - #. Ask for optional 'vxlan' arguments. --#: ../clients/cli/connections.c:4260 ../libnm-glib/nm-device.c:1875 -+#: ../clients/cli/connections.c:4272 ../libnm-glib/nm-device.c:1875 - #: ../libnm/nm-device.c:1826 - msgid "VXLAN" - msgstr "VXLAN" - --#: ../clients/cli/connections.c:4265 ../clients/cli/connections.c:4589 -+#: ../clients/cli/connections.c:4277 ../clients/cli/connections.c:4601 - msgid "Parent device [none]: " - msgstr "Übergeordnetes Gerät [keines]: " - --#: ../clients/cli/connections.c:4270 ../clients/cli/connections.c:4594 -+#: ../clients/cli/connections.c:4282 ../clients/cli/connections.c:4606 - #, c-format - msgid "Error: 'dev': '%s' is neither UUID nor interface name.\n" - msgstr "Fehler: »dev«: »%s« ist weder eine UUID noch ein Schnittstellenname.\n" - --#: ../clients/cli/connections.c:4279 -+#: ../clients/cli/connections.c:4291 - msgid "Local address [none]: " - msgstr "Lokale Adresse [keine]: " - --#: ../clients/cli/connections.c:4284 -+#: ../clients/cli/connections.c:4296 - #, c-format - msgid "Error: 'local': '%s' is not a valid IP address.\n" - msgstr "Fehler: »local«: »%s« ist keine gültige IP-Adresse.\n" - --#: ../clients/cli/connections.c:4293 -+#: ../clients/cli/connections.c:4305 - msgid "Minimum source port [0]: " - msgstr "Kleinster Quellport [0]: " - --#: ../clients/cli/connections.c:4297 --#, fuzzy, c-format -+#: ../clients/cli/connections.c:4309 -+#, c-format - msgid "Error: 'source-port-min': '%s' is not a valid number <0-65535>.\n" --msgstr "Fehler: »priority«: »%s« ist keine gültige Zahl <0-%d>.\n" -+msgstr "Fehler: 'source-port-min': '%s' ist keine gültige Zahl <0-65535>.\n" - --#: ../clients/cli/connections.c:4306 -+#: ../clients/cli/connections.c:4318 - msgid "Maximum source port [0]: " - msgstr "Größter Quellport [0]: " - --#: ../clients/cli/connections.c:4310 -+#: ../clients/cli/connections.c:4322 - #, c-format - msgid "Error: 'source-port-max': '%s' is not a valid number <0-65535>.\n" --msgstr "Fehler: »source-port-max«: »%s« ist keine gültige Zahl <0-65535>.\n" -+msgstr "Fehler: 'source-port-max': '%s' ist keine gültige Zahl <0-65535>.\n" - --#: ../clients/cli/connections.c:4319 -+#: ../clients/cli/connections.c:4331 - msgid "Destination port [8472]: " - msgstr "Zielport [8472]: " - --#: ../clients/cli/connections.c:4323 -+#: ../clients/cli/connections.c:4335 - #, c-format - msgid "Error: 'destination-port': '%s' is not a valid number <0-65535>.\n" --msgstr "Fehler: »destination-port«: »%s« ist keine gültige Zahl <0-65535>.\n" -+msgstr "Fehler: 'destination-port': '%s' ist keine gültige Zahl <0-65535>.\n" - --#: ../clients/cli/connections.c:4362 -+#: ../clients/cli/connections.c:4374 - msgid "IPv4 address (IP[/plen]) [none]: " - msgstr "IPv4-Adresse (IP[/plen]) [keine]: " - --#: ../clients/cli/connections.c:4364 -+#: ../clients/cli/connections.c:4376 - msgid "IPv6 address (IP[/plen]) [none]: " - msgstr "IPv6-Adresse (IP[/plen]) [keine]: " - --#: ../clients/cli/connections.c:4378 -+#: ../clients/cli/connections.c:4390 - #, c-format - msgid " Address successfully added: %s\n" - msgstr " Adresse erfolgreich hinzugefügt: %s\n" - --#: ../clients/cli/connections.c:4380 -+#: ../clients/cli/connections.c:4392 - #, c-format - msgid " Warning: address already present: %s\n" - msgstr " Warnung: Adresse ist bereits vorhanden: %s\n" - --#: ../clients/cli/connections.c:4382 -+#: ../clients/cli/connections.c:4394 - #, c-format - msgid " Warning: ignoring garbage at the end: '%s'\n" - msgstr " Warnung: der Unsinn am Ende wird ignoriert: »%s«\n" - --#: ../clients/cli/connections.c:4384 ../clients/cli/connections.c:5593 --#: ../clients/cli/connections.c:5640 ../clients/cli/connections.c:6562 --#: ../clients/cli/connections.c:6595 -+#: ../clients/cli/connections.c:4396 ../clients/cli/connections.c:5605 -+#: ../clients/cli/connections.c:5652 ../clients/cli/connections.c:6569 -+#: ../clients/cli/connections.c:6602 - msgid "Error: " - msgstr "Fehler: " - --#: ../clients/cli/connections.c:4404 -+#: ../clients/cli/connections.c:4416 - msgid "IPv4 gateway [none]: " - msgstr "IPv4-Gateway [keines]: " - --#: ../clients/cli/connections.c:4407 -+#: ../clients/cli/connections.c:4419 - msgid "IPv6 gateway [none]: " - msgstr "IPv6-Gateway [keines]: " - --#: ../clients/cli/connections.c:4427 -+#: ../clients/cli/connections.c:4439 - #, c-format - msgid "Error: invalid gateway address '%s'\n" - msgstr "Fehler: Ungültige Gateway-Adresse »%s«\n" - - #. Ask for IP addresses --#: ../clients/cli/connections.c:4440 -+#: ../clients/cli/connections.c:4452 - #, c-format - msgid "Do you want to add IP addresses? %s" - msgstr "Möchten Sie die IP-Adresse hinzufügen? %s" - --#: ../clients/cli/connections.c:4448 -+#: ../clients/cli/connections.c:4460 - #, c-format - msgid "Press to finish adding addresses.\n" --msgstr "" --"Drücken Sie die Eingabetaste, um das Hinzufügen einer Adresse " --"abzuschließen.\n" -+msgstr "Drücken Sie um die Adresse hinzuzufügen.\n" - - #. Ask for optional 'tun' arguments. --#: ../clients/cli/connections.c:4492 ../libnm-glib/nm-device.c:1879 -+#: ../clients/cli/connections.c:4504 ../libnm-glib/nm-device.c:1879 - #: ../libnm/nm-device.c:1830 - msgid "Tun" - msgstr "Tun" - --#: ../clients/cli/connections.c:4497 -+#: ../clients/cli/connections.c:4509 - msgid "User ID [none]: " - msgstr "Benutzerkennung [keine]: " - --#: ../clients/cli/connections.c:4510 -+#: ../clients/cli/connections.c:4522 - msgid "Group ID [none]: " - msgstr "Gruppenkennung [keine]: " - --#: ../clients/cli/connections.c:4524 -+#: ../clients/cli/connections.c:4536 - #, c-format - msgid "Enable PI %s" - msgstr "PI %s aktivieren" - --#: ../clients/cli/connections.c:4529 -+#: ../clients/cli/connections.c:4541 - #, c-format - msgid "Error: 'pi': %s.\n" --msgstr "Fehler: »pi«: %s.\n" -+msgstr "Fehler: 'pi': %s.\n" - --#: ../clients/cli/connections.c:4537 -+#: ../clients/cli/connections.c:4549 - #, c-format - msgid "Enable VNET header %s" --msgstr "VNET-Kopfbereich %s aktivieren" -+msgstr "VNET-Header %s aktivieren" - --#: ../clients/cli/connections.c:4542 -+#: ../clients/cli/connections.c:4554 - #, c-format - msgid "Error: 'vnet-hdr': %s.\n" --msgstr "Fehler: »vnet-hdr«: %s.\n" -+msgstr "Fehler: 'vnet-hdr': %s.\n" - --#: ../clients/cli/connections.c:4550 -+#: ../clients/cli/connections.c:4562 - #, c-format - msgid "Enable multi queue %s" --msgstr "" -+msgstr "Mehrere Warteschlangen %s aktivieren" - --#: ../clients/cli/connections.c:4555 -+#: ../clients/cli/connections.c:4567 - #, c-format - msgid "Error: 'multi-queue': %s.\n" - msgstr "Fehler: »multi-queue«: %s.\n" - - #. Ask for optional 'ip-tunnel' arguments. --#: ../clients/cli/connections.c:4569 -+#: ../clients/cli/connections.c:4581 - msgid "IP Tunnel" - msgstr "IP-Tunnel" - --#: ../clients/cli/connections.c:4574 -+#: ../clients/cli/connections.c:4586 - msgid "Local endpoint [none]: " - msgstr "Lokaler Endpunkt [keiner]: " - --#: ../clients/cli/connections.c:4580 -+#: ../clients/cli/connections.c:4592 - #, c-format - msgid "Error: 'local': '%s' is not valid; must be an IP address\n" --msgstr "Fehler: »local«: »%s« ist ungültig. Es muss eine IP-Adresse sein\n" -+msgstr "Fehler: 'local': '%s' ist nicht gültig; muss eine IP-Adresse sein\n" - --#: ../clients/cli/connections.c:4646 ../clients/cli/connections.c:10180 -+#: ../clients/cli/connections.c:4658 ../clients/cli/connections.c:10184 - #, c-format - msgid "Error: . argument is missing." --msgstr "Fehler: Argument für Einstellung fehlt." -+msgstr "Fehler: . Parameter fehlt." - --#: ../clients/cli/connections.c:4651 -+#: ../clients/cli/connections.c:4663 - #, c-format - msgid "Error: value for '%s' is missing." - msgstr "Fehler: Wert für »%s« fehlt." - --#: ../clients/cli/connections.c:4669 -+#: ../clients/cli/connections.c:4681 - #, c-format - msgid "Error: invalid . '%s'." --msgstr "Fehler: Ungültiger Einstellungsname: »%s«." -+msgstr "Fehler: ungültig. '%s'." - --#: ../clients/cli/connections.c:4677 -+#: ../clients/cli/connections.c:4689 - #, c-format - msgid "Error: invalid or not allowed setting '%s': %s." - msgstr "Fehler: Ungültige oder nicht zulässige Einstellung »%s«: %s." - --#: ../clients/cli/connections.c:4688 -+#: ../clients/cli/connections.c:4700 - #, c-format - msgid "Error: don't know how to create '%s' setting." - msgstr "" - "Fehler: Es ist unbekannt, wie die Einstellung »%s« erstellt werden kann." - --#: ../clients/cli/connections.c:4698 -+#: ../clients/cli/connections.c:4710 - #, c-format - msgid "Error: invalid property '%s': %s." - msgstr "Fehler: Ungültige Eigenschaft »%s«: %s." - --#: ../clients/cli/connections.c:4710 -+#: ../clients/cli/connections.c:4722 - #, c-format - msgid "Error: failed to modify %s.%s: %s." - msgstr "Fehler: Ändern ist fehlgeschlagen %s.%s: %s." - --#: ../clients/cli/connections.c:4729 -+#: ../clients/cli/connections.c:4741 - #, c-format - msgid "Error: failed to remove a value from %s.%s: %s." - msgstr "Fehler: Entfernen eines Wertes von %s.%s: %s ist fehlgeschlagen." - --#: ../clients/cli/connections.c:4763 -+#: ../clients/cli/connections.c:4775 - #, c-format - msgid "" - "Warning: 'type' is ignored. Use 'nmcli connection add \"%s\" ...' instead." -@@ -2542,330 +2516,329 @@ msgstr "" - "Warning: »type« wird ignored. Verwenden Sie stattdessen »nmcli connection " - "add %s …« ." - --#: ../clients/cli/connections.c:4771 -+#: ../clients/cli/connections.c:4783 - msgid "Error: redundant 'master' option." - msgstr "Fehler: Redundante Option »master«." - --#: ../clients/cli/connections.c:4784 -+#: ../clients/cli/connections.c:4796 - msgid "Error: 'master' is required." - msgstr "Fehler: »master« ist notwendig." - --#: ../clients/cli/connections.c:4938 -+#: ../clients/cli/connections.c:4950 - #, c-format - msgid "Error: 'parent': not valid without 'p-key'." - msgstr "Fehler: »parent«: nicht gültig ohne »p-key«." - --#: ../clients/cli/connections.c:4993 ../clients/cli/connections.c:5960 -+#: ../clients/cli/connections.c:5005 ../clients/cli/connections.c:5967 - msgid "SSID: " - msgstr "SSID: " - --#: ../clients/cli/connections.c:4996 ../clients/cli/connections.c:5963 -+#: ../clients/cli/connections.c:5008 ../clients/cli/connections.c:5970 - msgid "Error: 'ssid' is required." - msgstr "Fehler: »SSID« ist notwendig." - --#: ../clients/cli/connections.c:5060 -+#: ../clients/cli/connections.c:5072 - msgid "WiMAX NSP name: " - msgstr "WiMAX NSP-Name: " - --#: ../clients/cli/connections.c:5063 -+#: ../clients/cli/connections.c:5075 - msgid "Error: 'nsp' is required." - msgstr "Fehler: »nsp« ist notwendig." - --#: ../clients/cli/connections.c:5115 -+#: ../clients/cli/connections.c:5127 - msgid "PPPoE username: " - msgstr "PPPoE Benutzername: " - --#: ../clients/cli/connections.c:5118 ../clients/cli/connections.c:6030 -+#: ../clients/cli/connections.c:5130 ../clients/cli/connections.c:6037 - msgid "Error: 'username' is required." - msgstr "Fehler: »username« ist notwendig." - --#: ../clients/cli/connections.c:5187 -+#: ../clients/cli/connections.c:5199 - msgid "APN: " - msgstr "APN: " - --#: ../clients/cli/connections.c:5190 -+#: ../clients/cli/connections.c:5202 - msgid "Error: 'apn' is required." - msgstr "Fehler: »apn« ist notwendig." - --#: ../clients/cli/connections.c:5248 -+#: ../clients/cli/connections.c:5260 - msgid "Bluetooth device address: " - msgstr "Bluetooth Geräteadresse: " - --#: ../clients/cli/connections.c:5251 -+#: ../clients/cli/connections.c:5263 - msgid "Error: 'addr' is required." - msgstr "Fehler: »addr« ist notwendig." - --#: ../clients/cli/connections.c:5292 -+#: ../clients/cli/connections.c:5304 - #, c-format - msgid "Error: 'bt-type': '%s' not valid; use [%s, %s (%s), %s]." - msgstr "" - "Fehler: »bt-type«: »%s« ist nicht gültig. Verwenden Sie [%s, %s (%s), %s]." - --#: ../clients/cli/connections.c:5336 -+#: ../clients/cli/connections.c:5348 - msgid "VLAN parent device or connection UUID: " - msgstr "Übergeordnetes VLAN-Gerät oder UUID der Verbindung: " - --#: ../clients/cli/connections.c:5339 ../clients/cli/connections.c:6101 -+#: ../clients/cli/connections.c:5351 ../clients/cli/connections.c:6108 - msgid "Error: 'dev' is required." - msgstr "Fehler: »dev« ist notwendig." - --#: ../clients/cli/connections.c:5343 -+#: ../clients/cli/connections.c:5355 - msgid "VLAN ID <0-4094>: " - msgstr "VLAN-Kennung <0-4094>: " - --#: ../clients/cli/connections.c:5346 ../clients/cli/connections.c:6417 -+#: ../clients/cli/connections.c:5358 ../clients/cli/connections.c:6424 - msgid "Error: 'id' is required." - msgstr "Fehler: »id« ist notwendig." - --#: ../clients/cli/connections.c:5352 -+#: ../clients/cli/connections.c:5364 - #, c-format - msgid "Error: 'id': '%s' is not valid; use <0-4094>." --msgstr "Fehler: »id«: »%s« ist ungültig; Verwenden Sie <0-4094>." -+msgstr "Fehler: 'id': '%s' ist nicht gültig; verwenden Sie <0-4094>." - --#: ../clients/cli/connections.c:5362 ../clients/cli/connections.c:6109 -+#: ../clients/cli/connections.c:5374 ../clients/cli/connections.c:6116 - #, c-format - msgid "Error: 'dev': '%s' is neither UUID, interface name, nor MAC." - msgstr "" - "Fehler: »dev«: »%s« ist weder eine UUID noch ein Schnittstellenname oder " - "eine MAC-Adresse." - --#: ../clients/cli/connections.c:5494 -+#: ../clients/cli/connections.c:5506 - #, c-format - msgid "Error: 'mode': %s." - msgstr "Fehler: »mode«: %s." - --#: ../clients/cli/connections.c:5503 -+#: ../clients/cli/connections.c:5515 - #, c-format - msgid "Error: 'primary': '%s' is not a valid interface name." - msgstr "Fehler: »primary«: »%s« ist kein gültiger Name einer Schnittstelle." - --#: ../clients/cli/connections.c:5726 -+#: ../clients/cli/connections.c:5738 - #, c-format - msgid "Error: 'stp': %s." - msgstr "Fehler: »stp«: %s." - --#: ../clients/cli/connections.c:5735 -+#: ../clients/cli/connections.c:5747 - #, c-format - msgid "Error: 'multicast-snooping': %s." - msgstr "Fehler: »multicast-snooping«: %s." - --#: ../clients/cli/connections.c:5854 -+#: ../clients/cli/connections.c:5866 - #, c-format - msgid "Error: 'hairpin': %s." - msgstr "Fehler: »hairpin«: %s." - --#: ../clients/cli/connections.c:5905 -+#: ../clients/cli/connections.c:5915 - msgid "Error: 'vpn-type' is required." - msgstr "Fehler: »vpn-type« ist notwendig." - --#: ../clients/cli/connections.c:5913 -+#: ../clients/cli/connections.c:5922 - #, c-format - msgid "Warning: 'vpn-type': %s not known.\n" - msgstr "Warnung: »vpn-type«: %s ist unbekannt. \n" - --#: ../clients/cli/connections.c:5976 -+#: ../clients/cli/connections.c:5983 - #, c-format - msgid "Error: 'channel': '%s' is not valid; use <1-13>." - msgstr "Fehler: »channel«: »%s« ist ungültig. Verwenden Sie <1-13>." - --#: ../clients/cli/connections.c:6027 -+#: ../clients/cli/connections.c:6034 - msgid "Username: " - msgstr "Benutzername: " - --#: ../clients/cli/connections.c:6036 -+#: ../clients/cli/connections.c:6043 - #, c-format - msgid "Protocol %s" - msgstr "Protokoll: %s" - --#: ../clients/cli/connections.c:6039 -+#: ../clients/cli/connections.c:6046 - msgid "Error: 'protocol' is required." - msgstr "Fehler: »protocol« ist notwendig." - --#: ../clients/cli/connections.c:6098 -+#: ../clients/cli/connections.c:6105 - msgid "MACVLAN parent device or connection UUID: " --msgstr "Übergeordnetes MACVLAN-Gerät oder UUID der Verbindung: " -+msgstr "MACVLAN übergeordnetes Gerät oder Verbindungs-UUID: " - --#: ../clients/cli/connections.c:6118 ../clients/cli/connections.c:6198 --#: ../clients/cli/connections.c:6300 -+#: ../clients/cli/connections.c:6125 ../clients/cli/connections.c:6205 -+#: ../clients/cli/connections.c:6307 - msgid "Error: 'mode' is required." --msgstr "Fehler: »mode« ist notwendig." -+msgstr "Fehler: 'mode' ist notwendig." - --#: ../clients/cli/connections.c:6124 -+#: ../clients/cli/connections.c:6131 - msgid "Error: 'mode' is not valid." - msgstr "Fehler: »modus« ist ungültig." - --#: ../clients/cli/connections.c:6137 -+#: ../clients/cli/connections.c:6144 - #, c-format - msgid "Error: 'tap': %s." - msgstr "Fehler: »tap«: %s." - --#: ../clients/cli/connections.c:6223 -+#: ../clients/cli/connections.c:6230 - #, c-format - msgid "Error: 'pi': %s." - msgstr "Fehler: »pi«: %s." - --#: ../clients/cli/connections.c:6234 -+#: ../clients/cli/connections.c:6241 - #, c-format - msgid "Error: 'vnet-hdr': %s." - msgstr "Fehler: »vnet-hdr«: %s." - --#: ../clients/cli/connections.c:6245 -+#: ../clients/cli/connections.c:6252 - #, c-format - msgid "Error: 'multi-queue': %s." - msgstr "Fehler: »multi-queue«: %s." - --#: ../clients/cli/connections.c:6314 -+#: ../clients/cli/connections.c:6321 - #, c-format - msgid "Error: 'mode': '%s' is not valid, use one of %s" - msgstr "Fehler: »mode«: »%s« ist ungültig. Verwenden Sie eines von %s" - --#: ../clients/cli/connections.c:6320 -+#: ../clients/cli/connections.c:6327 - msgid "Remote endpoint: " - msgstr "Entfernter Endpunkt: " - --#: ../clients/cli/connections.c:6323 ../clients/cli/connections.c:6425 -+#: ../clients/cli/connections.c:6330 ../clients/cli/connections.c:6432 - msgid "Error: 'remote' is required." - msgstr "Fehler: »remote« ist notwendig." - --#: ../clients/cli/connections.c:6330 -+#: ../clients/cli/connections.c:6337 - #, c-format - msgid "Error: 'remote': '%s' is not valid; must be an IP address" - msgstr "Fehler: »remote«: »%s« ist ungültig. Es muss eine IP-Adresse sein" - --#: ../clients/cli/connections.c:6344 -+#: ../clients/cli/connections.c:6351 - #, c-format - msgid "Error: 'local': '%s' is not valid; must be an IP address" - msgstr "Fehler: »local«: »%s« ist ungültig. Es muss eine IP-Adresse sein" - --#: ../clients/cli/connections.c:6353 ../clients/cli/connections.c:6448 -+#: ../clients/cli/connections.c:6360 ../clients/cli/connections.c:6455 - #, c-format - msgid "Error: 'dev': '%s' is neither UUID nor interface name." --msgstr "Fehler: »dev«: »%s« ist weder eine UUID noch ein Schnittstellenname." -+msgstr "Fehler: 'dev': '%s' ist weder UUID noch Schnittstellenname." - --#: ../clients/cli/connections.c:6414 -+#: ../clients/cli/connections.c:6421 - msgid "VXLAN ID: " - msgstr "VXLAN-Kennung: " - --#: ../clients/cli/connections.c:6422 -+#: ../clients/cli/connections.c:6429 - msgid "Remote: " - msgstr "Gegenstelle: " - --#: ../clients/cli/connections.c:6431 -+#: ../clients/cli/connections.c:6438 - #, c-format - msgid "Error: 'id': '%s' is not valid; use <0-16777215>." --msgstr "Fehler: »id«: »%s« ist ungültig; verwenden Sie <0-16777215>." -+msgstr "Fehler: 'id': '%s' ist nicht gültig; verwenden Sie <0-16777215>." - --#: ../clients/cli/connections.c:6457 -+#: ../clients/cli/connections.c:6464 - #, c-format - msgid "Error: 'remote': '%s' is not a valid IP address" --msgstr "Fehler: »remote«: »%s« ist keine gültige IP-Adresse" -+msgstr "Fehler: 'remote': '%s' ist keine gültige IP-Adresse" - --#: ../clients/cli/connections.c:6466 -+#: ../clients/cli/connections.c:6473 - #, c-format - msgid "Error: 'local': '%s' is not a valid IP address" --msgstr "Fehler: »local«: »%s« ist keine gültige IP-Adresse" -+msgstr "Fehler: 'local': '%s' ist keine gültige IP-Adresse" - --#: ../clients/cli/connections.c:6475 -+#: ../clients/cli/connections.c:6482 - #, c-format - msgid "Error: 'source-port-min': %s is not valid; use <0-65535>." --msgstr "Fehler: »source-port-min«: »%s« ist ungültig; verwenden Sie <0-65535>." -+msgstr "Fehler: 'source-port-min': %s ist ungültig; verwenden Sie <0-65535>." - --#: ../clients/cli/connections.c:6484 -+#: ../clients/cli/connections.c:6491 - #, c-format - msgid "Error: 'source-port-max': %s is not valid; use <0-65535>." --msgstr "Fehler: »source-port-max«: »%s« ist ungültig. Verwenden Sie <0-65535>." -+msgstr "Fehler: 'source-port-max': %s ist ungültig; verwenden Sie <0-65535>." - --#: ../clients/cli/connections.c:6493 -+#: ../clients/cli/connections.c:6500 - #, c-format - msgid "Error: 'destination-port': %s is not valid; use <0-65535>." --msgstr "" --"Fehler: »destination-port«: »%s« ist ungültig; verwenden Sie <0-65535>." -+msgstr "Fehler: 'destination-port': %s ist ungültig; verwenden Sie <0-65535>." - --#: ../clients/cli/connections.c:6533 -+#: ../clients/cli/connections.c:6540 - #, c-format - msgid "Error: '%s' is not a valid connection type." - msgstr "Fehler: »%s« ist kein gültiger Verbindungstyp." - --#: ../clients/cli/connections.c:6574 -+#: ../clients/cli/connections.c:6581 - #, c-format - msgid "Error: IPv4 gateway specified without IPv4 addresses" - msgstr "Fehler: IPv4-Gateway wurde ohne IPv4-Adresse angegeben" - --#: ../clients/cli/connections.c:6578 -+#: ../clients/cli/connections.c:6585 - #, c-format - msgid "Error: multiple IPv4 gateways specified" - msgstr "Fehler: Es wurden mehrere IPv4-Gateways angegeben" - --#: ../clients/cli/connections.c:6582 -+#: ../clients/cli/connections.c:6589 - #, c-format - msgid "Error: Invalid IPv4 gateway '%s'" - msgstr "Fehler: Ungültiges IPv4-Gateway »%s«" - --#: ../clients/cli/connections.c:6607 -+#: ../clients/cli/connections.c:6614 - #, c-format - msgid "Error: IPv6 gateway specified without IPv6 addresses" - msgstr "Fehler: IPv6-Gateway wurde ohne IPv6-Adresse angegeben" - --#: ../clients/cli/connections.c:6611 -+#: ../clients/cli/connections.c:6618 - #, c-format - msgid "Error: multiple IPv6 gateways specified" - msgstr "Fehler: Es wurden mehrere IPv6-Gateways angegeben" - --#: ../clients/cli/connections.c:6615 -+#: ../clients/cli/connections.c:6622 - #, c-format - msgid "Error: Invalid IPv6 gateway '%s'" - msgstr "Fehler: Ungültiges IPv6-Gateway »%s«" - --#: ../clients/cli/connections.c:6663 ../clients/cli/connections.c:10219 -+#: ../clients/cli/connections.c:6670 ../clients/cli/connections.c:10223 - #, c-format - msgid "Error: Failed to add '%s' connection: %s" - msgstr "Fehler: Verbindung »%s« konnte nicht hinzugefügt werden: %s" - --#: ../clients/cli/connections.c:6668 -+#: ../clients/cli/connections.c:6675 - #, c-format - msgid "Connection '%s' (%s) successfully added.\n" - msgstr "Verbindung »%s« (%s) erfolgreich hinzugefügt.\n" - --#: ../clients/cli/connections.c:6947 ../clients/cli/connections.c:10674 -+#: ../clients/cli/connections.c:6951 ../clients/cli/connections.c:10678 - #, c-format - msgid "Error: 'type' argument is required." - msgstr "Fehler: Das Argument »type« ist notwendig." - --#: ../clients/cli/connections.c:6955 -+#: ../clients/cli/connections.c:6959 - #, c-format - msgid "Error: invalid connection type; %s." - msgstr "Fehler: Unbekannter Verbindungstyp: %s." - --#: ../clients/cli/connections.c:6964 ../clients/cli/devices.c:2222 -+#: ../clients/cli/connections.c:6968 ../clients/cli/devices.c:2164 - #, c-format - msgid "Error: 'autoconnect': %s." - msgstr "Fehler: »autoconnect«: %s." - --#: ../clients/cli/connections.c:6974 -+#: ../clients/cli/connections.c:6978 - #, c-format - msgid "Error: 'save': %s." - msgstr "Fehler: »save«: %s." - --#: ../clients/cli/connections.c:6991 -+#: ../clients/cli/connections.c:6995 - msgid "Interface name [*]: " - msgstr "Schnittstellenname [*]: " - --#: ../clients/cli/connections.c:6996 -+#: ../clients/cli/connections.c:7000 - #, c-format - msgid "Error: 'ifname' argument is required." - msgstr "Fehler: Das Argument »ifname« ist notwendig." - --#: ../clients/cli/connections.c:6998 -+#: ../clients/cli/connections.c:7002 - #, c-format - msgid "Error: mandatory 'ifname' not seen before '%s'." - msgstr "Fehler: Erforderliches »ifconfig« nicht vor »%s« vorhanden." - --#: ../clients/cli/connections.c:7007 -+#: ../clients/cli/connections.c:7011 - #, c-format - msgid "Error: 'ifname': '%s' is not a valid interface nor '*'." - msgstr "Fehler: »ifname«: »%s« ist weder eine gültige Schnittstelle noch »*«." - --#: ../clients/cli/connections.c:8031 -+#: ../clients/cli/connections.c:8035 - #, c-format - msgid "['%s' setting values]\n" - msgstr "['%s' Werte werden gesetzt]\n" -@@ -2873,8 +2846,8 @@ msgstr "['%s' Werte werden gesetzt]\n" - # Ausrichtung mit Leerzeichen an der zweitlängsten Zeile. - #. TRANSLATORS: do not translate command names and keywords before :: - #. * However, you should translate terms enclosed in <>. --#. --#: ../clients/cli/connections.c:8113 -+#. -+#: ../clients/cli/connections.c:8117 - #, c-format - msgid "" - "---[ Main menu ]---\n" -@@ -2897,8 +2870,7 @@ msgstr "" - "Eigenschaft wechseln\n" - "remove [.] | :: Einstellung " - "entfernen oder Eigenschaftswert zurücksetzen\n" --"set [. ] :: Eigenschaftswert " --"festlegen\n" -+"set [. ] :: Eigenschaftswert festlegen\n" - "describe [.] :: Eigenschaft beschreiben\n" - "print [all | [.]] :: Die Verbindung ausgeben\n" - "verify [all | fix] :: Die Verbindung prüfen\n" -@@ -2910,7 +2882,7 @@ msgstr "" - "nmcli :: nmcli-Konfiguration\n" - "quit :: nmcli beenden\n" - --#: ../clients/cli/connections.c:8140 -+#: ../clients/cli/connections.c:8144 - #, c-format - msgid "" - "goto [.] | :: enter setting/property for editing\n" -@@ -2930,13 +2902,12 @@ msgstr "" - " nmcli connection> goto secondaries\n" - " nmcli> goto ipv4.addresses\n" - --#: ../clients/cli/connections.c:8147 -+#: ../clients/cli/connections.c:8151 - #, c-format - msgid "" - "remove [.] :: remove setting or reset property value\n" - "\n" --"This command removes an entire setting from the connection, or if a " --"property\n" -+"This command removes an entire setting from the connection, or if a property\n" - "is given, resets that property to the default value.\n" - "\n" - "Examples: nmcli> remove wifi-sec\n" -@@ -2952,7 +2923,7 @@ msgstr "" - "Beispiele: nmcli> remove wifi-sec\n" - " nmcli> remove eth.mtu\n" - --#: ../clients/cli/connections.c:8154 -+#: ../clients/cli/connections.c:8158 - #, c-format - msgid "" - "set [. ] :: set property value\n" -@@ -2967,7 +2938,7 @@ msgstr "" - "\n" - "Beispiel: nmcli> s con.id Meine Verbindung\n" - --#: ../clients/cli/connections.c:8159 -+#: ../clients/cli/connections.c:8163 - #, c-format - msgid "" - "describe [.] :: describe property\n" -@@ -2980,7 +2951,7 @@ msgstr "" - "Zeigt die Eigenschaftsbeschreibung. Sie können die Hilfeseite nm-settings(5) " - "zu Rate ziehen, um alle Einstellungen und Eigenschaften nachzulesen.\n" - --#: ../clients/cli/connections.c:8164 -+#: ../clients/cli/connections.c:8168 - #, c-format - msgid "" - "print [all] :: print setting or connection values\n" -@@ -2995,14 +2966,13 @@ msgstr "" - "\n" - "Beispiel: nmcli ipv4> print all\n" - --#: ../clients/cli/connections.c:8169 -+#: ../clients/cli/connections.c:8173 - #, c-format - msgid "" - "verify [all | fix] :: verify setting or connection validity\n" - "\n" - "Verifies whether the setting or connection is valid and can be saved later.\n" --"It indicates invalid values on error. Some errors may be fixed " --"automatically\n" -+"It indicates invalid values on error. Some errors may be fixed automatically\n" - "by 'fix' option.\n" - "\n" - "Examples: nmcli> verify\n" -@@ -3021,7 +2991,7 @@ msgstr "" - " nmcli> verify fix\n" - " nmcli bond> verify\n" - --#: ../clients/cli/connections.c:8178 -+#: ../clients/cli/connections.c:8182 - #, c-format - msgid "" - "save [persistent|temporary] :: save the connection\n" -@@ -3048,7 +3018,7 @@ msgstr "" - "Verbindung volständig löschen möchten, so muss das Verbindungsprofil\n" - "gelöscht werden.\n" - --#: ../clients/cli/connections.c:8189 -+#: ../clients/cli/connections.c:8193 - #, c-format - msgid "" - "activate [] [/|] :: activate the connection\n" -@@ -3070,25 +3040,21 @@ msgstr "" - "/| - Zugriffspunkt (WLAN) oder NSP (WiMAX) (stellen Sie " - "»/« voraus wenn nicht angegeben wird)\n" - --#: ../clients/cli/connections.c:8196 ../clients/cli/connections.c:8355 -+#: ../clients/cli/connections.c:8200 ../clients/cli/connections.c:8359 - #, c-format --msgid "" --"back :: go to upper menu level\n" -+msgid "back :: go to upper menu level\n" - "\n" --msgstr "" --"back :: Eine Menüebene nach oben gehen\n" -+msgstr "back :: Eine Menüebene nach oben gehen\n" - "\n" - --#: ../clients/cli/connections.c:8199 -+#: ../clients/cli/connections.c:8203 - #, c-format --msgid "" --"help/? [] :: help for the nmcli commands\n" -+msgid "help/? [] :: help for the nmcli commands\n" - "\n" --msgstr "" --"help/? [] :: Hilfe zu den nmcli-Befehlen\n" -+msgstr "help/? [] :: Hilfe zu den nmcli-Befehlen\n" - "\n" - --#: ../clients/cli/connections.c:8202 -+#: ../clients/cli/connections.c:8206 - #, c-format - msgid "" - "nmcli [ ] :: nmcli configuration\n" -@@ -3115,7 +3081,7 @@ msgstr "" - " nmcli> nmcli save-confirmation no\n" - " nmcli> nmcli prompt-color 3\n" - --#: ../clients/cli/connections.c:8224 ../clients/cli/connections.c:8361 -+#: ../clients/cli/connections.c:8228 ../clients/cli/connections.c:8365 - #, c-format - msgid "" - "quit :: exit nmcli\n" -@@ -3128,16 +3094,16 @@ msgstr "" - "Dieser Befehl beendet nmcli. Wenn die Verbindung in Bearbeitung nicht " - "gespeichert ist wird der Benutzer gefragt, die Aktion zu bestätigen.\n" - --#: ../clients/cli/connections.c:8229 ../clients/cli/connections.c:8366 --#: ../clients/cli/connections.c:8790 ../clients/cli/connections.c:9738 -+#: ../clients/cli/connections.c:8233 ../clients/cli/connections.c:8370 -+#: ../clients/cli/connections.c:8794 ../clients/cli/connections.c:9742 - #, c-format - msgid "Unknown command: '%s'\n" - msgstr "Unbekannter Befehl: »%s«\n" - - #. TRANSLATORS: do not translate command names and keywords before :: - #. * However, you should translate terms enclosed in <>. --#. --#: ../clients/cli/connections.c:8295 -+#. -+#: ../clients/cli/connections.c:8299 - #, c-format - msgid "" - "---[ Property menu ]---\n" -@@ -3166,7 +3132,7 @@ msgstr "" - "ausgeben\n" - "quit :: nmcli beenden\n" - --#: ../clients/cli/connections.c:8320 -+#: ../clients/cli/connections.c:8324 - #, c-format - msgid "" - "set [] :: set new value\n" -@@ -3177,7 +3143,7 @@ msgstr "" - "\n" - "Dieser Befehl setzt den für die Eigenschaft\n" - --#: ../clients/cli/connections.c:8324 -+#: ../clients/cli/connections.c:8328 - #, c-format - msgid "" - "add [] :: append new value to the property\n" -@@ -3192,7 +3158,7 @@ msgstr "" - "die Eigenschaft ein Container-Typ ist. Für einwertige Eigenschaften wird der " - "Wert ersetzt (genau wie »set«).\n" - --#: ../clients/cli/connections.c:8330 -+#: ../clients/cli/connections.c:8334 - #, c-format - msgid "" - "change :: change current value\n" -@@ -3203,7 +3169,7 @@ msgstr "" - "\n" - "Zeigt den aktuellen Wert an und lässt ihn bearbeiten.\n" - --#: ../clients/cli/connections.c:8334 -+#: ../clients/cli/connections.c:8338 - #, c-format - msgid "" - "remove [||