From 8ca68d8c302ae1956620558fcdc3e7cba10e04a1 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Mon, 17 Jul 2017 17:43:58 +0200 Subject: [PATCH] Update to 1.8.2 release --- .gitignore | 1 + ...ybe-uninitialized-in-nm-udev-utils.c.patch | 64 - ...x-device-run-state-unknown-rh1440171.patch | 140 - 0004-proxy-crash-rh1450459.patch | 65 - 0005-device-fix-wait-carrier-rh1450444.patch | 586 ---- ...-add-route-to-DHCP4-server-rh1448987.patch | 85 - ...ate-ext-conf-before-commit-rh1449873.patch | 165 - 0008-utf8safe-fixes-rh1443114.patch | 1803 ----------- 0009-ifcfg-rh-fix-null-next-hop.patch | 140 - 0010-bluetooth-nap-crash-rh1454385.patch | 61 - ...ice-release-removed-slaves-rh1448907.patch | 73 - 0012-config-slaves-order-rh1452585.patch | 225 -- ...cli-fix-8021x-password-raw-rh1456362.patch | 121 - 0014-translations-rh1382625.patch | 2823 ----------------- 0015-ifcfg-rh-legacy-netmask-rh1445414.patch | 721 ----- 0016-tui-connect-crash-rh1456826.patch | 43 - ...nm-fix-reject-vlan-id-4095-rh1456911.patch | 30 - ...eriodic-connectivity-check-rh1458399.patch | 147 - ...nd-improve-option-matching-rh1457909.patch | 252 -- ...device-fix-external-assume-rh1457242.patch | 43 - 0021-bond-crash-mode-rh1459580.patch | 36 - ...onnectivity-ip-iface-check-rh1459932.patch | 32 - ...t-nm-owned-in-device-state-rh1376199.patch | 510 --- ...-fix-delayed-assume-master-rh1452062.patch | 536 ---- 0025-improve-logging-assume-rh1452062.patch | 1173 ------- ...enality-only-with-defroute-rh1459604.patch | 42 - ...cli-fix-interface-overview-rh1460219.patch | 63 - ...-ppp-unexport-ppp-manager-on-dispose.patch | 526 --- 0029-cli-wifi-spurious-output.patch | 49 - 0030-device-mtu-preserve-rh1460760.patch | 135 - ...-remove-ext-ipv4-addresses-rh1459813.patch | 51 - NetworkManager.spec | 71 +- sources | 2 +- 33 files changed, 10 insertions(+), 10804 deletions(-) delete mode 100644 0002-utils-fix-maybe-uninitialized-in-nm-udev-utils.c.patch delete mode 100644 0003-fix-device-run-state-unknown-rh1440171.patch delete mode 100644 0004-proxy-crash-rh1450459.patch delete mode 100644 0005-device-fix-wait-carrier-rh1450444.patch delete mode 100644 0006-dhcp-don-t-add-route-to-DHCP4-server-rh1448987.patch delete mode 100644 0007-device-update-ext-conf-before-commit-rh1449873.patch delete mode 100644 0008-utf8safe-fixes-rh1443114.patch delete mode 100644 0009-ifcfg-rh-fix-null-next-hop.patch delete mode 100644 0010-bluetooth-nap-crash-rh1454385.patch delete mode 100644 0011-device-release-removed-slaves-rh1448907.patch delete mode 100644 0012-config-slaves-order-rh1452585.patch delete mode 100644 0013-nmcli-fix-8021x-password-raw-rh1456362.patch delete mode 100644 0014-translations-rh1382625.patch delete mode 100644 0015-ifcfg-rh-legacy-netmask-rh1445414.patch delete mode 100644 0016-tui-connect-crash-rh1456826.patch delete mode 100644 0017-libnm-fix-reject-vlan-id-4095-rh1456911.patch delete mode 100644 0018-periodic-connectivity-check-rh1458399.patch delete mode 100644 0019-bond-improve-option-matching-rh1457909.patch delete mode 100644 0020-device-fix-external-assume-rh1457242.patch delete mode 100644 0021-bond-crash-mode-rh1459580.patch delete mode 100644 0022-connectivity-ip-iface-check-rh1459932.patch delete mode 100644 0023-persist-nm-owned-in-device-state-rh1376199.patch delete mode 100644 0024-fix-delayed-assume-master-rh1452062.patch delete mode 100644 0025-improve-logging-assume-rh1452062.patch delete mode 100644 0026-apply-route-penality-only-with-defroute-rh1459604.patch delete mode 100644 0027-cli-fix-interface-overview-rh1460219.patch delete mode 100644 0028-ppp-unexport-ppp-manager-on-dispose.patch delete mode 100644 0029-cli-wifi-spurious-output.patch delete mode 100644 0030-device-mtu-preserve-rh1460760.patch delete mode 100644 0031-don-t-remove-ext-ipv4-addresses-rh1459813.patch diff --git a/.gitignore b/.gitignore index 93ca781..6e04bef 100644 --- a/.gitignore +++ b/.gitignore @@ -338,3 +338,4 @@ network-manager-applet-0.8.1.tar.bz2 /NetworkManager-1.7.91.tar.xz /NetworkManager-1.7.92.tar.xz /NetworkManager-1.8.0.tar.xz +/NetworkManager-1.8.2.tar.xz diff --git a/0002-utils-fix-maybe-uninitialized-in-nm-udev-utils.c.patch b/0002-utils-fix-maybe-uninitialized-in-nm-udev-utils.c.patch deleted file mode 100644 index ac84527..0000000 --- a/0002-utils-fix-maybe-uninitialized-in-nm-udev-utils.c.patch +++ /dev/null @@ -1,64 +0,0 @@ -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/0003-fix-device-run-state-unknown-rh1440171.patch b/0003-fix-device-run-state-unknown-rh1440171.patch deleted file mode 100644 index 7f2778b..0000000 --- a/0003-fix-device-run-state-unknown-rh1440171.patch +++ /dev/null @@ -1,140 +0,0 @@ -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/0004-proxy-crash-rh1450459.patch b/0004-proxy-crash-rh1450459.patch deleted file mode 100644 index 473cd7f..0000000 --- a/0004-proxy-crash-rh1450459.patch +++ /dev/null @@ -1,65 +0,0 @@ -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/0005-device-fix-wait-carrier-rh1450444.patch b/0005-device-fix-wait-carrier-rh1450444.patch deleted file mode 100644 index 50918dd..0000000 --- a/0005-device-fix-wait-carrier-rh1450444.patch +++ /dev/null @@ -1,586 +0,0 @@ -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/0006-dhcp-don-t-add-route-to-DHCP4-server-rh1448987.patch b/0006-dhcp-don-t-add-route-to-DHCP4-server-rh1448987.patch deleted file mode 100644 index d122472..0000000 --- a/0006-dhcp-don-t-add-route-to-DHCP4-server-rh1448987.patch +++ /dev/null @@ -1,85 +0,0 @@ -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/0007-device-update-ext-conf-before-commit-rh1449873.patch b/0007-device-update-ext-conf-before-commit-rh1449873.patch deleted file mode 100644 index a379892..0000000 --- a/0007-device-update-ext-conf-before-commit-rh1449873.patch +++ /dev/null @@ -1,165 +0,0 @@ -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/0008-utf8safe-fixes-rh1443114.patch b/0008-utf8safe-fixes-rh1443114.patch deleted file mode 100644 index 2a410bd..0000000 --- a/0008-utf8safe-fixes-rh1443114.patch +++ /dev/null @@ -1,1803 +0,0 @@ -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/0009-ifcfg-rh-fix-null-next-hop.patch b/0009-ifcfg-rh-fix-null-next-hop.patch deleted file mode 100644 index 8210672..0000000 --- a/0009-ifcfg-rh-fix-null-next-hop.patch +++ /dev/null @@ -1,140 +0,0 @@ -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/0010-bluetooth-nap-crash-rh1454385.patch b/0010-bluetooth-nap-crash-rh1454385.patch deleted file mode 100644 index 5234d1d..0000000 --- a/0010-bluetooth-nap-crash-rh1454385.patch +++ /dev/null @@ -1,61 +0,0 @@ -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/0011-device-release-removed-slaves-rh1448907.patch b/0011-device-release-removed-slaves-rh1448907.patch deleted file mode 100644 index 04a3577..0000000 --- a/0011-device-release-removed-slaves-rh1448907.patch +++ /dev/null @@ -1,73 +0,0 @@ -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/0012-config-slaves-order-rh1452585.patch b/0012-config-slaves-order-rh1452585.patch deleted file mode 100644 index cd7a179..0000000 --- a/0012-config-slaves-order-rh1452585.patch +++ /dev/null @@ -1,225 +0,0 @@ -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/0013-nmcli-fix-8021x-password-raw-rh1456362.patch b/0013-nmcli-fix-8021x-password-raw-rh1456362.patch deleted file mode 100644 index 7406d16..0000000 --- a/0013-nmcli-fix-8021x-password-raw-rh1456362.patch +++ /dev/null @@ -1,121 +0,0 @@ -From c10c09d54b7e38dae1c73be0c5b3c7e01ac57315 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Tue, 23 May 2017 15:56:27 +0200 -Subject: [PATCH 1/2] clients: fix setter for 802-1x.password-raw - -The property is a GBytes, not a GByteArray. - -https://bugzilla.gnome.org/show_bug.cgi?id=782836 -(cherry picked from commit 30393ee2360e8678188cc47d794f2199d50e82ba) -(cherry picked from commit cc6c9468fc01d69505141ee8956766079dbed903) ---- - clients/cli/settings.c | 23 ++++++++++++----------- - 1 file changed, 12 insertions(+), 11 deletions(-) - -diff --git a/clients/cli/settings.c b/clients/cli/settings.c -index 87b1f50..3bcd09c 100644 ---- a/clients/cli/settings.c -+++ b/clients/cli/settings.c -@@ -1643,11 +1643,12 @@ nmc_util_is_domain (const char *domain) - } - - static gboolean --nmc_property_set_byte_array (NMSetting *setting, const char *prop, const char *val, GError **error) -+nmc_property_set_bytes (NMSetting *setting, const char *prop, const char *val, GError **error) - { -- char **strv = NULL, **iter; -- char *val_strip; -+ gs_free char *val_strip = NULL; -+ gs_strfreev char **strv = NULL; - const char *delimiters = " \t,"; -+ char **iter; - long int val_int; - GBytes *bytes; - GByteArray *array = NULL; -@@ -1659,10 +1660,8 @@ nmc_property_set_byte_array (NMSetting *setting, const char *prop, const char *v - - /* First try hex string in the format of AAbbCCDd */ - bytes = nm_utils_hexstr2bin (val_strip); -- if (bytes) { -- array = g_bytes_unref_to_array (bytes); -+ if (bytes) - goto done; -- } - - /* Otherwise, consider the following format: AA b 0xCc D */ - strv = nmc_strsplit_set (val_strip, delimiters, 0); -@@ -1670,19 +1669,21 @@ nmc_property_set_byte_array (NMSetting *setting, const char *prop, const char *v - for (iter = strv; iter && *iter; iter++) { - if (!nmc_string_to_int_base (g_strstrip (*iter), 16, TRUE, 0, 255, &val_int)) { - g_set_error (error, 1, 0, _("'%s' is not a valid hex character"), *iter); -+ g_byte_array_free (array, TRUE); - success = FALSE; - goto done; - } - g_byte_array_append (array, (const guint8 *) &val_int, 1); - } -+ bytes = g_byte_array_free_to_bytes (array); - - done: - if (success) -- g_object_set (setting, prop, array, NULL); -+ g_object_set (setting, prop, bytes, NULL); -+ -+ if (bytes) -+ g_bytes_unref (bytes); - -- g_strfreev (strv); -- if (array) -- g_byte_array_free (array, TRUE); - return success; - } - -@@ -2186,7 +2187,7 @@ DEFINE_ALLOWED_VAL_FUNC (nmc_property_802_1X_allowed_phase2_autheap, _802_1X_val - static gboolean - nmc_property_802_1X_set_password_raw (NMSetting *setting, const char *prop, const char *val, GError **error) - { -- return nmc_property_set_byte_array (setting, prop, val, error); -+ return nmc_property_set_bytes (setting, prop, val, error); - } - - static const char * --- -2.9.3 - -From 3ad0b8645e890523da23f550dc6db75c40da2718 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Tue, 23 May 2017 16:01:54 +0200 -Subject: [PATCH 2/2] clients: fix appending integer to result in - nmc_property_set_bytes() - -(cherry picked from commit d76c190dc72df042733cca13849e18bcc13eed65) -(cherry picked from commit 06d3c95e4fc70561b12be80e5982487443d914ec) ---- - clients/cli/settings.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/clients/cli/settings.c b/clients/cli/settings.c -index 3bcd09c..e0f045a 100644 ---- a/clients/cli/settings.c -+++ b/clients/cli/settings.c -@@ -1667,13 +1667,16 @@ nmc_property_set_bytes (NMSetting *setting, const char *prop, const char *val, G - strv = nmc_strsplit_set (val_strip, delimiters, 0); - array = g_byte_array_sized_new (g_strv_length (strv)); - for (iter = strv; iter && *iter; iter++) { -+ guint8 v8; -+ - if (!nmc_string_to_int_base (g_strstrip (*iter), 16, TRUE, 0, 255, &val_int)) { - g_set_error (error, 1, 0, _("'%s' is not a valid hex character"), *iter); - g_byte_array_free (array, TRUE); - success = FALSE; - goto done; - } -- g_byte_array_append (array, (const guint8 *) &val_int, 1); -+ v8 = val_int; -+ g_byte_array_append (array, &v8, 1); - } - bytes = g_byte_array_free_to_bytes (array); - --- -2.9.3 - diff --git a/0014-translations-rh1382625.patch b/0014-translations-rh1382625.patch deleted file mode 100644 index 9ea4aae..0000000 --- a/0014-translations-rh1382625.patch +++ /dev/null @@ -1,2823 +0,0 @@ -From 5a10ecc088f1af661ba4b6b419948620d6780f52 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Mon, 29 May 2017 15:27:04 +0200 -Subject: [PATCH 2/2] po: import Japanese translation - -https://bugzilla.redhat.com/show_bug.cgi?id=1382625 ---- - po/ja.po | 1250 +++++++++++++++++++++++++++++++------------------------------- - 1 file changed, 618 insertions(+), 632 deletions(-) - -diff --git a/po/ja.po b/po/ja.po -index 022bfef..620dfb6 100644 ---- a/po/ja.po -+++ b/po/ja.po -@@ -5,9 +5,8 @@ - # Satoru SATOH , 2005-2007. - # Kiyoto Hashida , 2010. - # Noriko Mizumoto , 2013 - 2014. --# Lubomir Rintel , 2016. #zanata --# Lubomir Rintel , 2017. #zanata --# Thomas Haller , 2017. #zanata -+# kmoriguc , 2017. #zanata -+# lrintel , 2017. #zanata - msgid "" - msgstr "" - "Project-Id-Version: PACKAGE VERSION\n" -@@ -21,7 +20,7 @@ msgstr "" - "Content-Type: text/plain; charset=UTF-8\n" - "Content-Transfer-Encoding: 8bit\n" - "Plural-Forms: Plural-Forms: nplurals=1; plural=0;\n" --"X-Generator: Zanata 3.9.6\n" -+"X-Generator: Zanata 4.1.1\n" - - #: ../clients/cli/agent.c:39 - #, c-format -@@ -31,7 +30,7 @@ msgid "" - "COMMAND := { secret | polkit | all }\n" - "\n" - msgstr "" --"Usage: nmcli agent { COMMAND | help }\n" -+"使い方: nmcli agent { COMMAND | help }\n" - "\n" - "COMMAND := { secret | polkit | all }\n" - "\n" -@@ -164,26 +163,27 @@ msgid "invalid IP address: %s" - msgstr "無効な IP アドレス: %s" - - #: ../clients/cli/common.c:426 --#, fuzzy - msgid "" - "The valid syntax is: 'ip[/prefix] [next-hop] [metric] [attribute=val]... [," - "ip[/prefix] ...]'" --msgstr "'%s' は無効です (書式: ip[/prefix] [next-hop] [metric])" -+msgstr "" -+"有効な構文は以下のようになります: 'ip[/prefix] [next-hop] [metric] " -+"[attribute=val]... [,ip[/prefix] ...]'" - - #: ../clients/cli/common.c:458 - #, c-format - msgid "the next hop ('%s') must be first" --msgstr "" -+msgstr "次のホップ ('%s') が初回である必要があります" - - #: ../clients/cli/common.c:464 - #, c-format - msgid "the metric ('%s') must be before attributes" --msgstr "" -+msgstr "メトリック ('%s') が属性の前にある必要があります" - - #: ../clients/cli/common.c:504 --#, fuzzy, c-format -+#, c-format - msgid "invalid route: %s. " --msgstr "無効なルート: %s" -+msgstr "無効なルート: %s。" - - #: ../clients/cli/common.c:516 - msgid "default route cannot be added (NetworkManager handles it by itself)" -@@ -571,42 +571,42 @@ msgstr "'%s' は有効な優先度ではありません (<0-%ld>)" - #: ../clients/cli/common.c:911 - #, c-format - msgid "cannot read team config from file '%s'" --msgstr "" -+msgstr "ファイル '%s' から team 設定を読み込めません" - - #: ../clients/cli/common.c:918 - #, c-format - msgid "team config file '%s' contains non-valid utf-8" --msgstr "" -+msgstr "team 設定ファイル '%s' には無効な utf-8 が含まれています" - - #: ../clients/cli/common.c:930 --#, fuzzy, c-format -+#, c-format - msgid "'%s' does not contain a valid team configuration" --msgstr "'%s' は有効な team 設定でもファイル名でもありません" -+msgstr "'%s' には有効な team 設定が含まれていません" - - #: ../clients/cli/common.c:933 - #, c-format - msgid "team configuration must be a JSON object" --msgstr "" -+msgstr "team 設定は JSON オブジェクトである必要があります" - - #: ../clients/cli/common.c:986 - #, c-format - msgid "cannot read pac-script from file '%s'" --msgstr "" -+msgstr "ファイル '%s' から pac-script を読み込めません" - - #: ../clients/cli/common.c:993 --#, fuzzy, c-format -+#, c-format - msgid "file '%s' contains non-valid utf-8" --msgstr "インデックス '%s' は無効です" -+msgstr "ファイル '%s' には無効な utf-8 が含まれています" - - #: ../clients/cli/common.c:1006 --#, fuzzy, c-format -+#, c-format - msgid "'%s' does not contain a valid PAC Script" --msgstr "'%s' は有効な PSK ではありません" -+msgstr "'%s' には有効な PAC スクリプトが含まれていません" - - #: ../clients/cli/common.c:1009 --#, fuzzy, c-format -+#, c-format - msgid "Not a valid PAC Script" --msgstr "は有効な MAC アドレスではありません" -+msgstr "有効な PAC スクリプトではありません" - - #: ../clients/cli/common.c:1132 - #, c-format -@@ -644,16 +644,15 @@ msgstr "エラー: NetworkManager が起動していません。" - #: ../clients/cli/common.c:1768 - #, c-format - msgid "Error: argument '%s' not understood. Try passing --help instead." --msgstr "" -+msgstr "エラー: 引数 '%s' が認識されません。代わりに --help を渡してください。" - - #: ../clients/cli/common.c:1778 --#, fuzzy - msgid "Error: missing argument. Try passing --help." --msgstr "エラー: %s オプション用の引数がありません。" -+msgstr "エラー: 引数がありません。--help を渡してください。" - - #: ../clients/cli/common.c:1831 - msgid "access denied" --msgstr "" -+msgstr "アクセスは拒否されました" - - #. define some prompts for connection editor - #: ../clients/cli/connections.c:62 -@@ -670,48 +669,40 @@ msgstr "接続タイプを入力してください: " - - #. define some other prompts - #: ../clients/cli/connections.c:67 --#, fuzzy - msgid "Connection type" --msgstr "接続タイプ: " -+msgstr "接続タイプ" - - #: ../clients/cli/connections.c:68 --#, fuzzy - msgid "Interface name [*]" --msgstr "インターフェース名 [*]: " -+msgstr "インターフェース名 [*]" - - #: ../clients/cli/connections.c:69 --#, fuzzy - msgid "VPN type" --msgstr "VPN タイプ: " -+msgstr "VPN タイプ" - - #: ../clients/cli/connections.c:70 --#, fuzzy - msgid "Master" --msgstr "マスター: " -+msgstr "マスター" - - #: ../clients/cli/connections.c:72 ../clients/tui/nmt-page-infiniband.c:88 - msgid "Transport mode" - msgstr "トランスポートモード" - - #: ../clients/cli/connections.c:77 --#, fuzzy - msgid "Bluetooth type" --msgstr "Bluetooth タイプ %s" -+msgstr "Bluetooth タイプ" - - #: ../clients/cli/connections.c:83 --#, fuzzy - msgid "Bonding mode" --msgstr "ボンディングモニタリングモード %s" -+msgstr "ボンディングモード" - - #: ../clients/cli/connections.c:85 ../clients/cli/connections.c:4320 --#, fuzzy - msgid "Bonding monitoring mode" --msgstr "ボンディングモニタリングモード %s" -+msgstr "ボンディングモニタリングモード" - - #: ../clients/cli/connections.c:90 --#, fuzzy - msgid "Protocol" --msgstr "プロトコル %s" -+msgstr "プロトコル" - - #: ../clients/cli/connections.c:93 - msgid "Wi-Fi mode" -@@ -722,48 +713,40 @@ msgid "ADSL encapsulation" - msgstr "ADSL カプセル化" - - #: ../clients/cli/connections.c:102 --#, fuzzy - msgid "Tun mode" --msgstr "トンネルモード: " -+msgstr "トンネルモード" - - #: ../clients/cli/connections.c:107 --#, fuzzy - msgid "IP Tunnel mode" --msgstr "トンネルモード: " -+msgstr "IP トンネルモード" - - #: ../clients/cli/connections.c:109 --#, fuzzy - msgid "MACVLAN mode" --msgstr "MACVLAN モード: " -+msgstr "MACVLAN モード" - - #: ../clients/cli/connections.c:111 --#, fuzzy - msgid "MACsec mode" --msgstr "MACVLAN モード: " -+msgstr "MACsec モード" - - #: ../clients/cli/connections.c:116 - msgid "Proxy method" --msgstr "" -+msgstr "プロキシメソッド" - - #: ../clients/cli/connections.c:121 --#, fuzzy - msgid "Connection (name, UUID, or path)" --msgstr "接続 (名前、UUID またはパス): " -+msgstr "接続 (名前、UUID またはパス)" - - #: ../clients/cli/connections.c:122 --#, fuzzy - msgid "VPN connection (name, UUID, or path)" --msgstr "VPN 接続 (名前、UUID またはパス): " -+msgstr "VPN 接続 (名前、UUID またはパス)" - - #: ../clients/cli/connections.c:123 --#, fuzzy - msgid "Connection(s) (name, UUID, or path)" --msgstr "接続 (名前、UUID またはパス): " -+msgstr "接続 (名前、UUID またはパス)" - - #: ../clients/cli/connections.c:124 --#, fuzzy - msgid "Connection(s) (name, UUID, path or apath)" --msgstr "接続 (名前、UUID またはパス): " -+msgstr "接続 (名前、UUID、パス または apath)" - - #. 0 - #: ../clients/cli/connections.c:130 ../clients/cli/connections.c:225 -@@ -867,7 +850,6 @@ msgstr "ACTIVE-PATH" - - #. 12 - #: ../clients/cli/connections.c:143 --#, fuzzy - msgid "SLAVE" - msgstr "スレーブ" - -@@ -966,7 +948,7 @@ msgid "DHCP6" - msgstr "DHCP6" - - #: ../clients/cli/connections.c:301 --#, fuzzy, c-format -+#, c-format - msgid "" - "Usage: nmcli connection { COMMAND | help }\n" - "\n" -@@ -1005,10 +987,10 @@ msgid "" - " export [id | uuid | path] []\n" - "\n" - msgstr "" --"Usage: nmcli connection { COMMAND | help }\n" -+"使い方: nmcli connection { COMMAND | help }\n" - "\n" --"COMMAND := { show | up | down | add | modify | edit | delete | monitor | " --"reload | load }\n" -+"COMMAND := { show | up | down | add | modify | clone | edit | delete | " -+"monitor | reload | load | import | export }\n" - "\n" - " show [--active] [--order ]\n" - " show [--active] [id | uuid | path | apath] ...\n" -@@ -1308,6 +1290,153 @@ msgid "" - " [ip6 ] [gw6 ]\n" - "\n" - msgstr "" -+"使い方: nmcli connection add { ARGUMENTS | help }\n" -+"\n" -+"ARGUMENTS := COMMON_OPTIONS TYPE_SPECIFIC_OPTIONS SLAVE_OPTIONS IP_OPTIONS " -+"[-- ([+|-]. )+]\n" -+"\n" -+" COMMON_OPTIONS:\n" -+" type \n" -+" ifname | \"*\"\n" -+" [con-name ]\n" -+" [autoconnect yes|no]\n" -+" [save yes|no]\n" -+" [master ]\n" -+" [slave-type ]\n" -+"\n" -+" TYPE_SPECIFIC_OPTIONS:\n" -+" ethernet: [mac ]\n" -+" [cloned-mac ]\n" -+" [mtu ]\n" -+"\n" -+" wifi: ssid \n" -+" [mac ]\n" -+" [cloned-mac ]\n" -+" [mtu ]\n" -+" [mode infrastructure|ap|adhoc]\n" -+"\n" -+" wimax: [mac ]\n" -+" [nsp ]\n" -+"\n" -+" pppoe: username \n" -+" [password ]\n" -+" [service ]\n" -+" [mtu ]\n" -+" [mac ]\n" -+"\n" -+" gsm: apn \n" -+" [user ]\n" -+" [password ]\n" -+"\n" -+" cdma: [user ]\n" -+" [password ]\n" -+"\n" -+" infiniband: [mac ]\n" -+" [mtu ]\n" -+" [transport-mode datagram | connected]\n" -+" [parent ]\n" -+" [p-key ]\n" -+"\n" -+" bluetooth: [addr ]\n" -+" [bt-type panu|dun-gsm|dun-cdma]\n" -+"\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" -+" [lacp-rate slow (0) | fast (1)]\n" -+"\n" -+" bond-slave: master \n" -+"\n" -+" team: [config |]\n" -+"\n" -+" team-slave: master \n" -+" [config |]\n" -+"\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" -+"\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" -+"\n" -+" olpc-mesh: ssid \n" -+" [channel <1-13>]\n" -+" [dhcp-anycast ]\n" -+"\n" -+" adsl: username \n" -+" protocol pppoa|pppoe|ipoatm\n" -+" [password ]\n" -+" [encapsulation vcmux|llc]\n" -+"\n" -+" tun: mode tun|tap\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" -+"\n" -+" macsec: dev \n" -+" mode \n" -+" [cak ckn ]\n" -+" [encrypt yes|no]\n" -+" [port 1-65534]\n" -+"\n" -+"\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" -+" [source-port-min <0-65535>]\n" -+" [source-port-max <0-65535>]\n" -+" [destination-port <0-65535>]\n" -+"\n" -+" dummy: \n" -+"\n" -+" SLAVE_OPTIONS:\n" -+" bridge: [priority <0-63>]\n" -+" [path-cost <1-65535>]\n" -+" [hairpin yes|no]\n" -+"\n" -+" team: [config |]\n" -+"\n" -+" IP_OPTIONS:\n" -+" [ip4 ] [gw4 ]\n" -+" [ip6 ] [gw6 ]\n" -+"\n" - - #: ../clients/cli/connections.c:495 - #, c-format -@@ -1581,7 +1710,6 @@ msgid "never" - msgstr "しない" - - #: ../clients/cli/connections.c:1190 --#, fuzzy - msgid "Activate connection details" - msgstr "アクティブな接続の詳細" - -@@ -1607,19 +1735,18 @@ msgid "incorrect item '%s' in '--order' option" - msgstr "'--order' オプションの正しくないアイテム '%s'" - - #: ../clients/cli/connections.c:1705 --#, fuzzy - msgid "No connection specified" --msgstr "エラー: 接続が指定されていません。" -+msgstr "接続が指定されていません。" - - #: ../clients/cli/connections.c:1720 --#, fuzzy, c-format -+#, c-format - msgid "%s argument is missing" --msgstr "エラー: %s 引数がありません。" -+msgstr "%s 引数がありません。" - - #: ../clients/cli/connections.c:1730 --#, fuzzy, c-format -+#, c-format - msgid "unknown connection '%s'" --msgstr "エラー: 不明な接続 '%s'\n" -+msgstr "不明な接続 '%s'" - - #: ../clients/cli/connections.c:1763 - msgid "'--order' argument is missing" -@@ -1678,9 +1805,9 @@ msgid "no active connection or device" - msgstr "アクティブな接続またはデバイスがありません" - - #: ../clients/cli/connections.c:2081 --#, fuzzy, c-format -+#, c-format - msgid "device '%s' not compatible with connection '%s':" --msgstr "デバイス '%s' は接続 '%s' と互換性がありません" -+msgstr "デバイス '%s' は接続 '%s' と互換性がありません:" - - #: ../clients/cli/connections.c:2117 - #, c-format -@@ -1693,84 +1820,68 @@ msgid "no device found for connection '%s'" - msgstr "接続 '%s'用のデバイスが見つかりません" - - #: ../clients/cli/connections.c:2140 --#, fuzzy - msgid "Unknown reason" - msgstr "不明な理由" - - #: ../clients/cli/connections.c:2142 --#, fuzzy - msgid "The connection was disconnected" --msgstr "接続はボンド接続ではありませんでした。" -+msgstr "接続が切断されました" - - #: ../clients/cli/connections.c:2144 --#, fuzzy - msgid "Disconnected by user" --msgstr "D-Bus により切断" -+msgstr "ユーザーにより切断" - - #: ../clients/cli/connections.c:2146 --#, fuzzy - msgid "The base network connection was interrupted" --msgstr "基本ネットワーク接続が妨害されました。" -+msgstr "基本ネットワーク接続が中断されました。" - - #: ../clients/cli/connections.c:2148 --#, fuzzy - msgid "The VPN service stopped unexpectedly" --msgstr "VPN サービスが予期しない停止をしました" -+msgstr "VPN サービスが予期せず停止しました" - - #: ../clients/cli/connections.c:2150 --#, fuzzy - msgid "The VPN service returned invalid configuration" --msgstr "VPN サービスは無効な設定を返しました" -+msgstr "VPN サービスが無効な設定を返しました" - - #: ../clients/cli/connections.c:2152 --#, fuzzy - msgid "The connection attempt timed out" --msgstr "接続試行は時間切れです" -+msgstr "接続試行がタイムアウトしました" - - #: ../clients/cli/connections.c:2154 --#, fuzzy - msgid "The VPN service did not start in time" --msgstr "VPN サービスは時間内に開始していません" -+msgstr "VPN サービスは時間内に開始しませんでした" - - #: ../clients/cli/connections.c:2156 --#, fuzzy - msgid "The VPN service failed to start" --msgstr "VPN サービスの開始は失敗しました" -+msgstr "VPN サービスの開始に失敗しました" - - #: ../clients/cli/connections.c:2158 --#, fuzzy - msgid "No valid secrets" --msgstr "有効な VPN シークレットはありません" -+msgstr "有効なシークレットはありません" - - #: ../clients/cli/connections.c:2160 --#, fuzzy - msgid "Invalid secrets" --msgstr "無効な VPN シークレット" -+msgstr "無効なシークレット" - - #: ../clients/cli/connections.c:2162 --#, fuzzy - msgid "The connection was removed" - msgstr "接続は削除されました" - - #: ../clients/cli/connections.c:2164 --#, fuzzy - msgid "Master connection failed" --msgstr "接続に失敗" -+msgstr "マスター接続に失敗しました" - - #: ../clients/cli/connections.c:2166 --#, fuzzy - msgid "Could not create a software link" --msgstr "一時ファイルを作成できませんでした: %s" -+msgstr "ソフトウェアリンクを作成できませんでした" - - #: ../clients/cli/connections.c:2168 --#, fuzzy - msgid "The device disappeared" --msgstr "このデバイスのアクティブな接続が消滅しました" -+msgstr "デバイスが消滅しました" - - #: ../clients/cli/connections.c:2171 --#, fuzzy - msgid "Invalid reason" --msgstr "無効なルート: %s" -+msgstr "無効な理由" - - #: ../clients/cli/connections.c:2196 ../clients/cli/connections.c:2366 - #: ../clients/cli/connections.c:6468 -@@ -1794,9 +1905,9 @@ msgstr "" - "Bus アクティブパス: %s)\n" - - #: ../clients/cli/connections.c:2261 --#, fuzzy, c-format -+#, c-format - msgid "Error: Timeout expired (%d seconds)" --msgstr "エラー: 制限時間の %d 秒が経過" -+msgstr "エラー: タイムアウト (%d 秒) になりました" - - #: ../clients/cli/connections.c:2427 - #, c-format -@@ -1871,9 +1982,9 @@ msgid "Error: no active connection provided." - msgstr "エラー: アクティブな接続がありません。" - - #: ../clients/cli/connections.c:2878 --#, fuzzy, c-format -+#, c-format - msgid "Connection '%s' deactivation failed: %s\n" --msgstr "エラー: 接続のアクティベーションに失敗: %s" -+msgstr "接続 '%s' の非アクティブ化に失敗しました: %s\n" - - #: ../clients/cli/connections.c:3341 ../clients/cli/utils.c:710 - #, c-format -@@ -1906,14 +2017,14 @@ msgid "Error: failed to remove a value from %s.%s: %s." - msgstr "エラー: '%s' の値の削除に失敗しました、%s: %s。" - - #: ../clients/cli/connections.c:3748 --#, fuzzy, c-format -+#, c-format - msgid "Error: '%s' is mandatory." --msgstr "エラー: '%s' を繰り返すことはできません。" -+msgstr "エラー: '%s' は必須です。" - - #: ../clients/cli/connections.c:3780 --#, fuzzy, c-format -+#, c-format - msgid "Error: invalid slave type; %s." --msgstr "エラー: 無効な接続タイプ; %s。" -+msgstr "エラー: 無効なスレーブタイプ; %s。" - - #: ../clients/cli/connections.c:3793 - #, c-format -@@ -1921,24 +2032,23 @@ msgid "Error: invalid connection type; %s." - msgstr "エラー: 無効な接続タイプ; %s。" - - #: ../clients/cli/connections.c:4002 --#, fuzzy, c-format -+#, c-format - msgid "Error: bad connection type: %s." --msgstr "エラー: 無効な接続タイプ; %s。" -+msgstr "エラー: 問題のある接続タイプ; %s。" - - #: ../clients/cli/connections.c:4065 --#, fuzzy, c-format -+#, c-format - msgid "Error: '%s': %s" --msgstr "エラー: %s: %s。" -+msgstr "エラー: '%s': %s" - - #: ../clients/cli/connections.c:4086 --#, fuzzy - msgid "Error: master is required" --msgstr "エラー: 'マスター' が必要です。" -+msgstr "エラー: マスターが必要です" - - #: ../clients/cli/connections.c:4145 --#, fuzzy, c-format -+#, c-format - msgid "Error: error adding bond option '%s=%s'." --msgstr "エラー: 不明な接続 '%s' です。" -+msgstr "エラー: ボンドオプション '%s=%s' の追加中にエラー。" - - #: ../clients/cli/connections.c:4176 - #, c-format -@@ -1954,48 +2064,40 @@ msgstr "" - "エラー: 'bt-type': '%s' は無効です; [%s, %s (%s), %s] を使用してください。" - - #: ../clients/cli/connections.c:4282 --#, fuzzy - msgid "PPPoE username" --msgstr "PPPoE ユーザー名: " -+msgstr "PPPoE ユーザー名" - - #: ../clients/cli/connections.c:4283 ../clients/cli/connections.c:4304 - #: ../clients/cli/connections.c:4306 ../clients/cli/connections.c:4355 --#, fuzzy - msgid "Password [none]" --msgstr "パスワード [none]: " -+msgstr "パスワード [none]" - - #: ../clients/cli/connections.c:4284 --#, fuzzy - msgid "Service [none]" --msgstr "サービス [none]: " -+msgstr "サービス [none]" - - #: ../clients/cli/connections.c:4285 ../clients/cli/connections.c:4288 - #: ../clients/cli/connections.c:4297 --#, fuzzy - msgid "MTU [auto]" --msgstr "MTU [auto]: " -+msgstr "MTU [auto]" - - #: ../clients/cli/connections.c:4286 ../clients/cli/connections.c:4289 - #: ../clients/cli/connections.c:4298 ../clients/cli/connections.c:4301 - #: ../clients/cli/connections.c:4342 --#, fuzzy - msgid "MAC [none]" --msgstr "MAC [none]: " -+msgstr "MAC [none]" - - #: ../clients/cli/connections.c:4287 ../clients/cli/connections.c:4299 --#, fuzzy - msgid "Cloned MAC [none]" --msgstr "クローンの MAC [none]: " -+msgstr "クローンしたMAC [none]" - - #: ../clients/cli/connections.c:4292 --#, fuzzy - msgid "Parent interface [none]" --msgstr "親インターフェース [none]: " -+msgstr "親インターフェース [none]" - - #: ../clients/cli/connections.c:4293 --#, fuzzy - msgid "P_KEY [none]" --msgstr "P_KEY [none]: " -+msgstr "P_KEY [none]" - - #. 0 - #: ../clients/cli/connections.c:4294 ../clients/cli/connections.c:4349 -@@ -2004,150 +2106,121 @@ msgid "SSID" - msgstr "SSID" - - #: ../clients/cli/connections.c:4300 --#, fuzzy - msgid "WiMAX NSP name" --msgstr "WiMAX NSP 名: " -+msgstr "WiMAX NSP 名" - - #: ../clients/cli/connections.c:4302 --#, fuzzy - msgid "APN" --msgstr "AP" -+msgstr "APN" - - #: ../clients/cli/connections.c:4303 ../clients/cli/connections.c:4305 - #: ../clients/cli/connections.c:4348 --#, fuzzy - msgid "Username [none]" --msgstr "ユーザー名 [none]: " -+msgstr "ユーザー名 [none]" - - #: ../clients/cli/connections.c:4307 --#, fuzzy - msgid "Bluetooth device address" --msgstr "Bluetooth デバイスアドレス: " -+msgstr "Bluetooth デバイスアドレス" - - #: ../clients/cli/connections.c:4310 --#, fuzzy - msgid "VLAN parent device or connection UUID" --msgstr "VLAN 親デバイスまたは接続 UUID: " -+msgstr "VLAN 親デバイスまたは接続 UUID" - - #: ../clients/cli/connections.c:4312 --#, fuzzy - msgid "VLAN ID (<0-4094>)" --msgstr "VLAN ID <0-4094>: " -+msgstr "VLAN ID (<0-4094>)" - - #: ../clients/cli/connections.c:4313 --#, fuzzy - msgid "VLAN flags (<0-7>) [none]" --msgstr "VLAN フラグ (<0-7>) [none]: " -+msgstr "VLAN フラグ (<0-7>) [none]" - - #: ../clients/cli/connections.c:4314 --#, fuzzy - msgid "Ingress priority maps [none]" --msgstr "イングレス優先度マップ [none]: " -+msgstr "イングレス優先度マップ [none]" - - #: ../clients/cli/connections.c:4315 --#, fuzzy - msgid "Egress priority maps [none]" --msgstr "イーグレス優先度マップ [none]: " -+msgstr "イーグレス優先度マップ [none]" - - #: ../clients/cli/connections.c:4318 --#, fuzzy - msgid "Bonding primary interface [none]" --msgstr "ボンドのプライマリインターフェース [none]:" -+msgstr "ボンドのプライマリインターフェース [none]" - - #: ../clients/cli/connections.c:4322 --#, fuzzy - msgid "Bonding miimon [100]" --msgstr "ボンドの miimon [100]:" -+msgstr "ボンドの miimon [100]" - - #: ../clients/cli/connections.c:4323 --#, fuzzy - msgid "Bonding downdelay [0]" --msgstr "ボンドの downdelay [0]: " -+msgstr "ボンドの downdelay [0]" - - #: ../clients/cli/connections.c:4324 --#, fuzzy - msgid "Bonding updelay [0]" --msgstr "ボンドの updelay [0]: " -+msgstr "ボンドの updelay [0]" - - #: ../clients/cli/connections.c:4325 --#, fuzzy - msgid "Bonding arp-interval [0]" --msgstr "ボンドの arp-interval [0]: " -+msgstr "ボンドの arp-interval [0]" - - #: ../clients/cli/connections.c:4327 --#, fuzzy - msgid "Bonding arp-ip-target [none]" --msgstr "ボンドの arp-ip-target [none]: " -+msgstr "ボンドの arp-ip-target [none]" - - #: ../clients/cli/connections.c:4329 --#, fuzzy - msgid "LACP rate ('slow' or 'fast') [slow]" --msgstr "LACP レート ('低速' または '高速') [低速]: " -+msgstr "LACP レート ('slow' または 'fast') [slow]" - - #: ../clients/cli/connections.c:4331 ../clients/cli/connections.c:4332 --#, fuzzy - msgid "Team JSON configuration [none]" --msgstr "team JSON 設定 [none]: " -+msgstr "team JSON 設定 [none]" - - #: ../clients/cli/connections.c:4333 --#, fuzzy - msgid "Enable STP [no]" --msgstr "STP %s の有効化 " -+msgstr "STP の有効化 [no]" - - #: ../clients/cli/connections.c:4335 --#, fuzzy - msgid "STP priority [32768]" --msgstr "STP の優先度 [32768]: " -+msgstr "STP の優先度 [32768]" - - #: ../clients/cli/connections.c:4336 --#, fuzzy - msgid "Forward delay [15]" --msgstr "フォワード遅延 [15]:" -+msgstr "フォワード遅延 [15]" - - #: ../clients/cli/connections.c:4337 --#, fuzzy - msgid "Hello time [2]" --msgstr "Hello タイム [2]: " -+msgstr "Hello タイム [2]" - - #: ../clients/cli/connections.c:4338 --#, fuzzy - msgid "Max age [20]" --msgstr "最大エイジ [20]: " -+msgstr "最大エイジ [20]" - - #: ../clients/cli/connections.c:4339 --#, fuzzy - msgid "MAC address ageing time [300]" --msgstr "MAC アドレスのエージングタイム [300]:" -+msgstr "MAC アドレスのエージングタイム [300]" - - #: ../clients/cli/connections.c:4340 --#, fuzzy - msgid "Enable IGMP snooping [no]" --msgstr "IGMP スヌーピングの有効化" -+msgstr "IGMP スヌーピングの有効化 [no]" - - #: ../clients/cli/connections.c:4343 --#, fuzzy - msgid "Bridge port priority [32]" --msgstr "ブリッジポートの優先度 [32]:" -+msgstr "ブリッジポートの優先度 [32]" - - #: ../clients/cli/connections.c:4344 --#, fuzzy - msgid "Bridge port STP path cost [100]" --msgstr "ブリッジポートの STP パスコスト [100]: " -+msgstr "ブリッジポートの STP パスコスト [100]" - - #: ../clients/cli/connections.c:4345 --#, fuzzy - msgid "Hairpin [no]" --msgstr "ヘアピンモード" -+msgstr "ヘアピン [no]" - - #: ../clients/cli/connections.c:4350 --#, fuzzy - msgid "OLPC Mesh channel [1]" --msgstr "OLPC メッシュチャンネル [1]: " -+msgstr "OLPC メッシュチャンネル [1]" - - #: ../clients/cli/connections.c:4351 --#, fuzzy - msgid "DHCP anycast MAC address [none]" --msgstr "DHCP anycast MAC アドレス [none]: " -+msgstr "DHCP anycast MAC アドレス [none]" - - #. TTLS and PEAP are actually much more complicated, but this complication - #. * is not visible here since we only care about phase2 authentication -@@ -2162,130 +2235,112 @@ msgstr "ユーザー名" - - #: ../clients/cli/connections.c:4358 - msgid "MACsec parent device or connection UUID" --msgstr "" -+msgstr "MACsec 親デバイスまたは接続 UUID" - - #: ../clients/cli/connections.c:4360 - msgid "Enable encryption [yes]" --msgstr "" -+msgstr "暗号化の有効化 [yes]" - - #: ../clients/cli/connections.c:4361 - #: ../clients/common/nm-secret-agent-simple.c:520 - msgid "MKA CAK" --msgstr "" -+msgstr "MKA CAK" - - #: ../clients/cli/connections.c:4362 - msgid "MKA_CKN" --msgstr "" -+msgstr "MKA_CKN" - - #: ../clients/cli/connections.c:4363 - msgid "SCI port [1]" --msgstr "" -+msgstr "SCI ポート [1]" - - #: ../clients/cli/connections.c:4365 --#, fuzzy - msgid "MACVLAN parent device or connection UUID" --msgstr "MACVLAN 親デバイスまたは接続 UUID: " -+msgstr "MACVLAN 親デバイスまたは接続 UUID" - - #: ../clients/cli/connections.c:4369 - msgid "Tap [no]" --msgstr "" -+msgstr "Tap [no]" - - #: ../clients/cli/connections.c:4371 --#, fuzzy - msgid "VXLAN ID" --msgstr "VXLAN ID: " -+msgstr "VXLAN ID" - - #: ../clients/cli/connections.c:4372 ../clients/cli/connections.c:4391 --#, fuzzy - msgid "Remote" --msgstr "リモート: " -+msgstr "リモート" - - #: ../clients/cli/connections.c:4373 ../clients/cli/connections.c:4392 --#, fuzzy - msgid "Parent device [none]" --msgstr "親デバイス [none]: " -+msgstr "親デバイス [none]" - - #: ../clients/cli/connections.c:4375 --#, fuzzy - msgid "Local address [none]" --msgstr "ローカルアドレス [none]: " -+msgstr "ローカルアドレス [none]" - - #: ../clients/cli/connections.c:4376 --#, fuzzy - msgid "Minimum source port [0]" --msgstr "最小ソースポート [0]: " -+msgstr "最小ソースポート数 [0]" - - #: ../clients/cli/connections.c:4377 --#, fuzzy - msgid "Maximum source port [0]" --msgstr "最小ソースポート [0]: " -+msgstr "最大ソースポート数 [0]" - - #: ../clients/cli/connections.c:4378 --#, fuzzy - msgid "Destination port [8472]" --msgstr "送信先ポート [8472]: " -+msgstr "接続先ポート [8472]" - - #: ../clients/cli/connections.c:4381 --#, fuzzy - msgid "User ID [none]" --msgstr "ユーザー ID [none]: " -+msgstr "ユーザー ID [none]" - - #: ../clients/cli/connections.c:4382 --#, fuzzy - msgid "Group ID [none]" --msgstr "グループ ID [none]: " -+msgstr "グループ ID [none]" - - #: ../clients/cli/connections.c:4383 --#, fuzzy - msgid "Enable PI [no]" --msgstr "PI %s の有効化" -+msgstr "PI の有効化 [no]" - - #: ../clients/cli/connections.c:4385 --#, fuzzy - msgid "Enable VNET header [no]" --msgstr "VNET ヘッダー %s の有効化" -+msgstr "VNET ヘッダー の有効化 [no]" - - #: ../clients/cli/connections.c:4387 --#, fuzzy - msgid "Enable multi queue [no]" --msgstr "複数のキュー %s の有効化" -+msgstr "複数のキューの有効化 [no]" - - #: ../clients/cli/connections.c:4390 --#, fuzzy - msgid "Local endpoint [none]" --msgstr "ローカルエンドポイント [none]: " -+msgstr "ローカルエンドポイント [none]" - - #: ../clients/cli/connections.c:4394 --#, fuzzy - msgid "IPv4 address (IP[/plen]) [none]" --msgstr "IPv4 アドレス (IP[/plen]) [none]: " -+msgstr "IPv4 アドレス (IP[/plen]) [none]" - - #: ../clients/cli/connections.c:4396 --#, fuzzy - msgid "IPv4 gateway [none]" --msgstr "IPv4 ゲートウェイ [none]: " -+msgstr "IPv4 ゲートウェイ [none]" - - #: ../clients/cli/connections.c:4397 --#, fuzzy - msgid "IPv6 address (IP[/plen]) [none]" --msgstr "IPv6 アドレス (IP[/plen]) [none]: " -+msgstr "IPv6 アドレス (IP[/plen]) [none]" - - #: ../clients/cli/connections.c:4399 --#, fuzzy - msgid "IPv6 gateway [none]" --msgstr "IPv6 ゲートウェイ [none]: " -+msgstr "IPv6 ゲートウェイ [none]" - - #: ../clients/cli/connections.c:4401 - msgid "Browser only [no]" --msgstr "" -+msgstr "ブラウザー専用 [no]" - - #: ../clients/cli/connections.c:4403 - msgid "PAC URL" --msgstr "" -+msgstr "PAC URL" - - #: ../clients/cli/connections.c:4404 - msgid "PAC script" --msgstr "" -+msgstr "PAC スクリプト" - - #: ../clients/cli/connections.c:4539 - #, c-format -@@ -2302,9 +2357,9 @@ msgid "Error: invalid or not allowed setting '%s': %s." - msgstr "エラー: 無効または許可されていない設定 '%s' です: %s。" - - #: ../clients/cli/connections.c:4633 --#, fuzzy, c-format -+#, c-format - msgid "Error: '%s' is ambiguous (%s.%s or %s.%s)." --msgstr "'%s' が不明瞭です (%s x %s)" -+msgstr "エラー:'%s' があいまいです (%s.%s または %s.%s)。" - - #: ../clients/cli/connections.c:4647 - #, c-format -@@ -2326,13 +2381,15 @@ msgstr "接続 '%s' (%s) が正常に追加されました。\n" - msgid "" - "You can specify this option more than once. Press when you're done.\n" - msgstr "" -+"このオプションは複数回指定することができます。終了したら を押してくだ" -+"さい。\n" - - #. Ask for optional arguments. - #: ../clients/cli/connections.c:4854 --#, fuzzy, c-format -+#, c-format - msgid "There is %d optional setting for %s.\n" - msgid_plural "There are %d optional settings for %s.\n" --msgstr[0] "'%2$s' 接続タイプには %1$d 種類のオプション引数があります。\n" -+msgstr[0] "'%s' には %d のオプション設定があります。\n" - - #: ../clients/cli/connections.c:4857 - #, c-format -@@ -2341,81 +2398,68 @@ msgid_plural "Do you want to provide them? %s" - msgstr[0] "指定しますか? %s" - - #: ../clients/cli/connections.c:4871 --#, fuzzy - msgid "Wired Ethernet" --msgstr "Ethernet" -+msgstr "有線イーサネット" - - #: ../clients/cli/connections.c:4873 ../src/devices/nm-device-infiniband.c:192 - msgid "InfiniBand connection" - msgstr "InfiniBand 接続" - - #: ../clients/cli/connections.c:4875 --#, fuzzy - msgid "Wi-Fi connection" --msgstr "Wi-Fi 接続 %d" -+msgstr "Wi-Fi 接続" - - #: ../clients/cli/connections.c:4877 --#, fuzzy - msgid "WiMAX connection" --msgstr "CDMA 接続" -+msgstr "WiMAX 接続" - - #: ../clients/cli/connections.c:4879 - msgid "PPPoE" - msgstr "PPPoE" - - #: ../clients/cli/connections.c:4881 --#, fuzzy - msgid "CDMA mobile broadband connection" --msgstr "モバイルブロードバンド接続 %d" -+msgstr "CDMA モバイルブロードバンド接続" - - #: ../clients/cli/connections.c:4883 --#, fuzzy - msgid "GSM mobile broadband connection" --msgstr "モバイルブロードバンド接続 %d" -+msgstr "GSM モバイルブロードバンド接続" - - #: ../clients/cli/connections.c:4885 --#, fuzzy - msgid "bluetooth connection" --msgstr "ボンド接続" -+msgstr "bluetooth 接続" - - #: ../clients/cli/connections.c:4887 ../src/devices/nm-device-vlan.c:433 - msgid "VLAN connection" - msgstr "VLAN 接続" - - #: ../clients/cli/connections.c:4889 --#, fuzzy - msgid "Bond device" --msgstr "Ethernet デバイス" -+msgstr "Bond デバイス" - - #: ../clients/cli/connections.c:4891 --#, fuzzy - msgid "Team device" --msgstr "TUN デバイスモード" -+msgstr "Team デバイス" - - #: ../clients/cli/connections.c:4893 --#, fuzzy - msgid "Team port" --msgstr "team " -+msgstr "Team ポート" - - #: ../clients/cli/connections.c:4895 --#, fuzzy - msgid "Bridge device" --msgstr "Ethernet デバイス" -+msgstr "ブリッジデバイス" - - #: ../clients/cli/connections.c:4897 --#, fuzzy - msgid "Bridge port" --msgstr "ブリッジ" -+msgstr "ブリッジポート" - - #: ../clients/cli/connections.c:4899 ../src/nm-manager.c:4080 --#, fuzzy - msgid "VPN connection" - msgstr "VPN 接続" - - #: ../clients/cli/connections.c:4901 --#, fuzzy - msgid "OLPC Mesh connection" --msgstr "CDMA 接続" -+msgstr "OLPC Mesh 接続" - - #: ../clients/cli/connections.c:4903 ../src/devices/adsl/nm-device-adsl.c:137 - msgid "ADSL connection" -@@ -2423,35 +2467,31 @@ msgstr "ADSL 接続" - - #: ../clients/cli/connections.c:4905 - msgid "MACsec connection" --msgstr "" -+msgstr "MACsec 接続" - - #: ../clients/cli/connections.c:4907 --#, fuzzy - msgid "macvlan connection" --msgstr "ボンド接続" -+msgstr "macvlan 接続" - - #: ../clients/cli/connections.c:4909 ../src/devices/nm-device-vxlan.c:369 - msgid "VXLAN connection" - msgstr "VXLAN 接続" - - #: ../clients/cli/connections.c:4911 --#, fuzzy - msgid "Tun device" --msgstr "TUN デバイスモード" -+msgstr "TUN デバイス" - - #: ../clients/cli/connections.c:4913 --#, fuzzy - msgid "IPv4 protocol" --msgstr "ADSL プロトコル" -+msgstr "IPv4 プロトコル" - - #: ../clients/cli/connections.c:4915 --#, fuzzy - msgid "IPv6 protocol" --msgstr "ADSL プロトコル" -+msgstr "IPv6 プロトコル" - - #: ../clients/cli/connections.c:4917 - msgid "Proxy" --msgstr "" -+msgstr "プロキシ" - - #: ../clients/cli/connections.c:5004 ../clients/cli/utils.c:186 - #, c-format -@@ -2464,9 +2504,9 @@ msgid "Error: 'save': %s." - msgstr "エラー: 'save': %s。" - - #: ../clients/cli/connections.c:5082 --#, fuzzy, c-format -+#, c-format - msgid "Error: '%s' argument is required." --msgstr "エラー: 'タイプ' 引数が必要です。" -+msgstr "エラー: '%s' 引数が必要です。" - - #: ../clients/cli/connections.c:6054 - #, c-format -@@ -3268,9 +3308,9 @@ msgid "Error: Connection deletion failed: %s" - msgstr "エラー: 接続の削除に失敗しました: %s" - - #: ../clients/cli/connections.c:8391 ../clients/cli/connections.c:8516 --#, fuzzy, c-format -+#, c-format - msgid "Error: %s.\n" --msgstr "エラー: %s." -+msgstr "エラー: %s.\n" - - #: ../clients/cli/connections.c:8392 ../clients/cli/connections.c:8517 - #, c-format -@@ -3348,9 +3388,9 @@ msgid "Error: 'file' argument is required." - msgstr "エラー: 'file' 引数が必要です。" - - #: ../clients/cli/connections.c:8708 --#, fuzzy, c-format -+#, c-format - msgid "Error: failed to find VPN plugin for %s." --msgstr "エラー: VPN プラグインのロードに失敗しました: %s。" -+msgstr "エラー: %s 用の VPN プラグインが見つかりません。" - - #: ../clients/cli/connections.c:8716 ../clients/cli/connections.c:8817 - #, c-format -@@ -3392,7 +3432,6 @@ msgid "Interface: " - msgstr "インターフェース: " - - #: ../clients/cli/devices.c:37 --#, fuzzy - msgid "Interface(s): " - msgstr "インターフェース: " - -@@ -3520,7 +3559,7 @@ msgstr "速度" - #. 3 - #: ../clients/cli/devices.c:104 - msgid "SRIOV" --msgstr "" -+msgstr "SRIOV" - - #. 0 - #: ../clients/cli/devices.c:113 -@@ -3678,7 +3717,7 @@ msgstr "スレーブ" - #. 1 - #: ../clients/cli/devices.c:204 - msgid "CONFIG" --msgstr "" -+msgstr "CONFIG" - - #. 0 - #: ../clients/cli/devices.c:213 -@@ -3814,7 +3853,7 @@ msgid "PORT-ID-TYPE" - msgstr "PORT-ID-TYPE" - - #: ../clients/cli/devices.c:295 --#, fuzzy, c-format -+#, c-format - msgid "" - "Usage: nmcli device { COMMAND | help }\n" - "\n" -@@ -3854,10 +3893,10 @@ msgid "" - " lldp [list [ifname ]]\n" - "\n" - msgstr "" --"使い方: nmcli device { コマンド | help }\n" -+"使い方: nmcli device { COMMAND | help }\n" - "\n" --"コマンド := { status | show | connect | reapply | disconnect | delete | " --"monitor | wifi | lldp }\n" -+"COMMAND := { status | show | set | connect | reapply | modify | disconnect | " -+"delete | monitor | wifi | lldp }\n" - "\n" - " status\n" - "\n" -@@ -3867,7 +3906,9 @@ msgstr "" - "\n" - " connect \n" - "\n" --" reapply ...\n" -+" reapply \n" -+"\n" -+" modify ([+|-]. )+\n" - "\n" - " disconnect ...\n" - "\n" -@@ -3877,15 +3918,15 @@ msgstr "" - "\n" - " wifi [list [ifname ] [bssid ]]\n" - "\n" --" wifi connect <(B)SSID> [password <パスワード>] [wep-key-type key|phrase] " -+" wifi connect <(B)SSID> [password ] [wep-key-type key|phrase] " - "[ifname ]\n" --" [bssid ] [name <名前>] [private yes|no] " -+" [bssid ] [name ] [private yes|no] " - "[hidden yes|no]\n" - "\n" --" wifi hotspot [ifname ] [con-name <名前>] [ssid ] [band a|bg] " --"[channel <チャネル>] [password <パスワード>]\n" -+" wifi hotspot [ifname ] [con-name ] [ssid ] [band a|bg] " -+"[channel ] [password ]\n" - "\n" --" wifi rescan [ifname ] [[ssid <スキャンする SSID>] ...]\n" -+" wifi rescan [ifname ] [[ssid ] ...]\n" - "\n" - " lldp [list [ifname ]]\n" - "\n" -@@ -3932,9 +3973,9 @@ msgid "" - "The command lists details for all devices, or for a given device.\n" - "\n" - msgstr "" --"使い方: nmcli device show { 引数 | help }\n" -+"使い方: nmcli device show { ARGUMENTS | help }\n" - "\n" --"引数 := []\n" -+"ARGUMENTS := []\n" - "\n" - "デバイスの詳細を表示します。\n" - "このコマンドですべてのデバイスまたは指定デバイスの詳細を表示させます。\n" -@@ -3953,9 +3994,9 @@ msgid "" - "It will also consider connections that are not set to auto-connect.\n" - "\n" - msgstr "" --"使い方: nmcli device connect { 引数 | help }\n" -+"使い方: nmcli device connect { ARGUMENTS | help }\n" - "\n" --"引数 := \n" -+"ARGUMENTS := \n" - "\n" - "デバイスを接続します。\n" - "NetworkManager により適した接続が検索され、アクティベートされます。\n" -@@ -3963,7 +4004,7 @@ msgstr "" - "\n" - - #: ../clients/cli/devices.c:356 --#, fuzzy, c-format -+#, c-format - msgid "" - "Usage: nmcli device reapply { ARGUMENTS | help }\n" - "\n" -@@ -3973,16 +4014,16 @@ msgid "" - "made since it was last applied.\n" - "\n" - msgstr "" --"使い方: nmcli device reapply { 引数 | help }\n" -+"使い方: n nmcli device reapply { ARGUMENTS | help }\n" - "\n" --"引数 := ...\n" -+"ARGUMENTS := \n" - "\n" --"変更が最後に適用されてから現在アクティブな接続に対して行われた変更\n" --"でデバイスの更新を試行します。\n" -+"現在アクティブな接続に最後に適用されて以来の\n" -+"変更でデバイスの更新を試行します。\n" - "\n" - - #: ../clients/cli/devices.c:367 --#, fuzzy, c-format -+#, c-format - msgid "" - "Usage: nmcli device modify { ARGUMENTS | --help }\n" - "\n" -@@ -4002,27 +4043,24 @@ msgid "" - "nmcli dev mod em1 -ipv4.dns 1\n" - "nmcli dev mod em1 -ipv6.addr \"abbe::cafe/56\"\n" - msgstr "" --"使い方: nmcli connection modify { ARGUMENTS | help }\n" -+"使い方: nmcli device modify { ARGUMENTS | --help }\n" - "\n" --"ARGUMENTS := [id | uuid | path] ([+|-]. )+\n" -+"ARGUMENTS := ([+|-]. )+\n" - "\n" --"接続プロファイルの 1 つ以上のプロパティーを変更します。\n" --"プロファイルは名前、UUID、または D-Bus パスで識別されます。複数の値から成るプ" --"ロパティーの場合は、\n" -+"接続プロファイルを編集せずに、現在アクティブなデバイス上の 1 つ以上のプロパ" -+"ティーを変更します。\n" -+"変更はすぐに反映されます。\n" -+"複数の値で構成されるプロパティーの場合は、\n" - "プロパティー名にオプションの '+' または '-' プレフィックスを使用できます。\n" - "'+' 記号を使用すると、値全体を上書きせずにアイテムを追加できます。\n" --"'-' 記号を使用すると、値全体の代わりに、選択されたアイテムを削除できます。\n" -+"'-' 記号を使用すると、値全体ではなく、選択されたアイテムを削除できます。\n" - "\n" - "例:\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, " -+"nmcli dev mod em1 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" --"nmcli con mod bond0 +bond.options mii=500\n" --"nmcli con mod bond0 -bond.options downdelay\n" --"\n" -+"nmcli dev mod em1 +ipv4.dns 8.8.4.4\n" -+"nmcli dev mod em1 -ipv4.dns 1\n" -+"nmcli dev mod em1 -ipv6.addr \"abbe::cafe/56\"\n" - - #: ../clients/cli/devices.c:387 - #, c-format -@@ -4036,9 +4074,9 @@ msgid "" - "further connections without user/manual intervention.\n" - "\n" - msgstr "" --"使い方: nmcli device disconnect { 引数 | help }\n" -+"使い方: nmcli device disconnect { ARGUMENTS | help }\n" - "\n" --"引数 := ...\n" -+"ARGUMENTS := ...\n" - "\n" - "デバイスの接続を切断します。\n" - "このコマンドにより、デバイスの接続が切断され、ユーザーまたは手作業による介入" -@@ -4059,9 +4097,9 @@ msgid "" - "command.\n" - "\n" - msgstr "" --"使い方: nmcli device delete { 引数 | help }\n" -+"使い方: nmcli device delete { ARGUMENTS | help }\n" - "\n" --"引数 := ...\n" -+"ARGUMENTS := ...\n" - "\n" - "ソフトウェアデバイスを削除します。\n" - "このコマンドにより、インターフェースが削除されます。ソフトウェアデバイス\n" -@@ -4082,11 +4120,11 @@ msgid "" - "Modify device properties.\n" - "\n" - msgstr "" --"使い方: nmcli device set { 引数 | help }\n" -+"使い方: nmcli device set { ARGUMENTS | help }\n" - "\n" --"引数 := デバイス { プロパティー [ プロパティー ... ] }\n" --"デバイス := [ifname] \n" --"プロパティー := { autoconnect { yes | no } |\n" -+"ARGUMENTS := DEVICE { PROPERTY [ PROPERTY ... ] }\n" -+"DEVICE := [ifname] \n" -+"PROPERTY := { autoconnect { yes | no } |\n" - " { managed { yes | no }\n" - "\n" - "デバイスプロパティーを変更します。\n" -@@ -4104,9 +4142,9 @@ msgid "" - "Monitors all devices in case no interface is specified.\n" - "\n" - msgstr "" --"使い方: nmcli device monitor { 引数 | help }\n" -+"使い方: nmcli device monitor { ARGUMENTS | help }\n" - "\n" --"引数 := [] ...\n" -+"ARGUMENTS := [] ...\n" - "\n" - "デバイスアクティビティーを監視します。\n" - "このコマンドにより、指定されたデバイスの状態が変わるたびに行が出力されま" -@@ -4115,7 +4153,7 @@ msgstr "" - "\n" - - #: ../clients/cli/devices.c:437 --#, fuzzy, c-format -+#, c-format - msgid "" - "Usage: nmcli device wifi { ARGUMENTS | help }\n" - "\n" -@@ -4166,20 +4204,20 @@ msgid "" - "use 'nmcli device wifi list' for that.\n" - "\n" - msgstr "" --"使い方: nmcli device wifi { 引数 | help }\n" -+"使い方: nmcli device wifi { ARGUMENTS | help }\n" - "\n" --"Wi-Fi デバイス上での操作を行います。\n" -+"Wi-Fi デバイス上で演算を実行します。\n" - "\n" --"引数 := [list [ifname ] [bssid ]]\n" -+"ARGUMENTS := [list [ifname ] [bssid ]]\n" - "\n" - "使用可能な Wi-Fi アクセスポイントを一覧表示します。'ifname' オプションと " - "'bssid' オプションを使用すると、\n" - "特定のインターフェース用の AP または特定の BSSID を持つ AP を一覧表示すること" - "ができます。\n" - "\n" --"引数 := connect <(B)SSID> [password <パスワード>] [wep-key-type key|phrase] " --"[ifname ]\n" --" [bssid ] [name <名前>] [private yes|no] [hidden " -+"ARGUMENTS := connect <(B)SSID> [password ] [wep-key-type key|" -+"phrase] [ifname ]\n" -+" [bssid ] [name ] [private yes|no] [hidden " - "yes|no]\n" - "\n" - "SSID または BSSID で指定した Wi-Fi ネットワークへ接続します。このコマンドによ" -@@ -4188,21 +4226,23 @@ msgstr "" - "クライアントで SSID をクリックした場合と同じ動作になります。常に新規の接続" - "が\n" - "作成されるため、主に新規の Wi-Fi ネットワークに接続する場合に役に立ちます。\n" --"ネットワーク用の接続がすでに存在する場合は、「nmcli con up id <名前>」を使っ" -+"ネットワーク用の接続がすでに存在する場合は、「nmcli con up id 」を使っ" - "て\n" - "既存のプロファイルを有効にすることが推奨されます。現時点でサポートされている" - "のはオープンな\n" - "WEP ネットワークおよび WPA-PSK ネットワークのみであることに注意してくださ" - "い。また、\n" --"IP 設定は DHCP で取得されるとみなされます。\n" -+"IP 設定は DHCP で取得されることが前提となります。\n" - "\n" - "ARGUMENTS := wifi hotspot [ifname ] [con-name ] [ssid ]\n" - " [band a|bg] [channel ] [password " - "]\n" - "\n" --"Create a Wi-Fi hotspot. Use 'connection down' or 'device disconnect'\n" --"to stop the hotspot.\n" --"Parameters of the hotspot can be influenced by the optional parameters:\n" -+"Wi-Fi ホットスポットを作成します。'connection down' または 'device " -+"disconnect'\n" -+"を使ってホットスポットを停止します。\n" -+"ホットスポットのパラメーターは以下のオプションのパラメーターに影響を受けま" -+"す:\n" - "ifname - Wi-Fi device to use\n" - "con-name - name of the created hotspot connection profile\n" - "ssid - SSID of the hotspot\n" -@@ -4212,15 +4252,16 @@ msgstr "" - "\n" - "ARGUMENTS := rescan [ifname ] [[ssid ] ...]\n" - "\n" --"Request that NetworkManager immediately re-scan for available access " --"points.\n" --"NetworkManager scans Wi-Fi networks periodically, but in some cases it " --"might\n" --"be useful to start scanning manually. 'ssid' allows scanning for a specific\n" --"SSID, which is useful for APs with hidden SSIDs. More 'ssid' parameters can " --"be\n" --"given. Note that this command does not show the APs,\n" --"use 'nmcli device wifi list' for that.\n" -+"NetworkManager が直ちに利用可能なアクセスポイントを再スキャンすることをリクエ" -+"ストします。\n" -+"\n" -+"NetworkManager は定期的に Wi-Fi ネットワークをスキャンしますが、\n" -+"スキャンを手動で開始することが便利な場合もあります。'ssid' を使用すると特定" -+"の\n" -+"SSID をスキャンすることができ、非表示 SSID の AP で便利です。複数の 'ssid' パ" -+"ラメーターを使用することが可能です\n" -+"このコマンドは AP を表示せず、\n" -+"それには 'nmcli device wifi list' を使用することに留意してください。\n" - "\n" - - #: ../clients/cli/devices.c:484 -@@ -4235,9 +4276,9 @@ msgid "" - "used to list neighbors for a particular interface.\n" - "\n" - msgstr "" --"使い方: nmcli device lldp { 引数 | help }\n" -+"使い方: nmcli device lldp { ARGUMENTS | help }\n" - "\n" --"引数 := [list [ifname ]]\n" -+"ARGUMENTS := [list [ifname ]]\n" - "\n" - "LLDP を介して検出された近接デバイスを一覧表示します。'ifname' オプションを使" - "用すると、\n" -@@ -4265,14 +4306,13 @@ msgid "Error: not all devices found." - msgstr "エラー: 一部のデバイスが見つかりません。" - - #: ../clients/cli/devices.c:641 --#, fuzzy - msgid "No interface specified" --msgstr "エラー: インターフェースが指定されていません。" -+msgstr "インターフェースが指定されていません" - - #: ../clients/cli/devices.c:660 --#, fuzzy, c-format -+#, c-format - msgid "Device '%s' not found" --msgstr "エラー: デバイス'%s' が見つかりません" -+msgstr "デバイス'%s' が見つかりません" - - #: ../clients/cli/devices.c:746 ../clients/cli/devices.c:898 - msgid "(none)" -@@ -4429,9 +4469,9 @@ msgid "Device '%s' successfully removed.\n" - msgstr "デバイス '%s' が正常に削除されました。\n" - - #: ../clients/cli/devices.c:1980 ../clients/cli/devices.c:2050 --#, fuzzy, c-format -+#, c-format - msgid "Error: Reapplying connection to device '%s' (%s) failed: %s" --msgstr "エラー: デバイス '%s' (%s) への接続の再適用に失敗しました: %s\n" -+msgstr "エラー: デバイス '%s' (%s) への接続の再適用に失敗しました: %s" - - #: ../clients/cli/devices.c:1990 ../clients/cli/devices.c:2059 - #, c-format -@@ -4439,9 +4479,10 @@ msgid "Connection successfully reapplied to device '%s'.\n" - msgstr "接続がデバイス '%s' に正常に再適用されました。\n" - - #: ../clients/cli/devices.c:2084 --#, fuzzy, c-format -+#, c-format - msgid "Error: Reading applied connection from device '%s' (%s) failed: %s" --msgstr "エラー: デバイス '%s' (%s) への接続の再適用に失敗しました: %s\n" -+msgstr "" -+"エラー: デバイス '%s' (%s) からの適用済み接続の読み取りに失敗しました: %s" - - #: ../clients/cli/devices.c:2148 - #, c-format -@@ -5185,71 +5226,61 @@ msgid "Networkmanager is now in the '%s' state\n" - msgstr "Networkmanager の状態は '%s' です\n" - - #: ../clients/cli/general.c:1103 --#, fuzzy - msgid "connection available" --msgstr "接続に失敗" -+msgstr "接続が利用可能" - - #: ../clients/cli/general.c:1105 --#, fuzzy - msgid "connections available" --msgstr "接続に失敗" -+msgstr "接続が利用可能" - - #: ../clients/cli/general.c:1123 --#, fuzzy - msgid "autoconnect" --msgstr "接続済み" -+msgstr "自動接続" - - #: ../clients/cli/general.c:1125 --#, fuzzy - msgid "fw missing" --msgstr "データがありません" -+msgstr "fw がありません" - - #: ../clients/cli/general.c:1130 --#, fuzzy - msgid "plugin missing" --msgstr "データがありません" -+msgstr "プラグインがありません" - - #: ../clients/cli/general.c:1135 - msgid "sw" --msgstr "" -+msgstr "sw" - - #: ../clients/cli/general.c:1137 --#, fuzzy - msgid "hw" --msgstr "表示する" -+msgstr "hw" - - #: ../clients/cli/general.c:1142 - msgid "iface" --msgstr "" -+msgstr "iface" - - #: ../clients/cli/general.c:1145 --#, fuzzy - msgid "port" --msgstr "ポータル" -+msgstr "ポート" - - #: ../clients/cli/general.c:1148 - msgid "mtu" --msgstr "" -+msgstr "mtu" - - #: ../clients/cli/general.c:1165 --#, fuzzy - msgid "master" --msgstr "マスター: " -+msgstr "マスター" - - #: ../clients/cli/general.c:1171 --#, fuzzy - msgid "ip4 default" --msgstr "デフォルト" -+msgstr "ip4 デフォルト" - - #: ../clients/cli/general.c:1173 --#, fuzzy - msgid "ip6 default" --msgstr "デフォルト" -+msgstr "ip6 デフォルト" - - #: ../clients/cli/general.c:1253 --#, fuzzy, c-format -+#, c-format - msgid "%s VPN connection" --msgstr "VPN 接続" -+msgstr "%s VPN 接続" - - #: ../clients/cli/general.c:1323 - #, c-format -@@ -5261,6 +5292,13 @@ msgid "" - "Consult nmcli(1) and nmcli-examples(5) manual pages for complete usage " - "details.\n" - msgstr "" -+"既知のデバイスに関する情報を取得するには、\"nmcli device show\" を使用しま" -+"す。\n" -+"アクティブな接続プロファイルの概要を取得するには、\"nmcli connection show\" " -+"を使用します。\n" -+"\n" -+"使用方法の詳細情報については、nmcli(1) と nmcli-examples(5) の man ページを参" -+"照してください。\n" - - #: ../clients/cli/general.c:1344 - #, c-format -@@ -5272,7 +5310,7 @@ msgid "Networkmanager is not running (waiting for it)\n" - msgstr "Networkmanager が実行されていません (待機中)\n" - - #: ../clients/cli/nmcli.c:171 --#, fuzzy, c-format -+#, c-format - msgid "" - "Usage: nmcli [OPTIONS] OBJECT { COMMAND | help }\n" - "\n" -@@ -5304,35 +5342,34 @@ msgid "" - " m[onitor] monitor NetworkManager changes\n" - "\n" - msgstr "" --"使い方: %s [オプション] オブジェクト { コマンド | help }\n" -+"使い方: nmcli [OPTIONS] OBJECT { COMMAND | help }\n" - "\n" --"オプション\n" --" -t[erse] 簡潔な出力\n" --" -p[retty] 人間が読みやすい出力\n" --" -m[ode] tabular|multiline 出力モード\n" --" -c[olors] auto|yes|no 出力で色を使用するかどうか\n" --" -f[ields] |all|common 出力フィールドの指定\n" --" -e[scape] yes|no 値内のコラムセパレーターをエス" --"ケープ\n" --" -n[ocheck] nmcli および NetworkManager の" --"バージョンをチェックしない\n" --" -a[sk] 足りないパラメーターを問い合わせ" --"る\n" --" -s[how-secrets] パスワードの表示を許可\n" --" -w[ait] 動作の完了を待機する場合のタイム" --"アウトを設定\n" --" -v[ersion] プログラムバージョンを表示\n" --" -h[elp] このヘルプを出力\n" --"\n" --"オブジェクト\n" --" g[eneral] NetworkManager の全般的な状態と動作\n" --" n[etworking] 全体的なネットワーク制御\n" --" r[adio] NetworkManager ラジオスイッチ\n" --" c[onnection] NetworkManager の接続\n" --" d[evice] NetworkManager で管理しているデバイス\n" --" a[gent] NetworkManager シークレットエージェントまたは polkit エー" --"ジェント\n" --" m[onitor] NetworkManager の変更を監視\n" -+"OPTIONS\n" -+" -t[erse] terse output\n" -+" -p[retty] pretty output\n" -+" -m[ode] tabular|multiline output mode\n" -+" -c[olors] auto|yes|no whether to use colors in " -+"output\n" -+" -f[ields] |all|common specify fields to output\n" -+" -g[et-values] |all|common shortcut for -m tabular -t -" -+"f\n" -+" -e[scape] yes|no escape columns separators " -+"in values\n" -+" -a[sk] ask for missing parameters\n" -+" -s[how-secrets] allow displaying passwords\n" -+" -w[ait] set timeout waiting for " -+"finishing operations\n" -+" -v[ersion] show program version\n" -+" -h[elp] print this help\n" -+"\n" -+"OBJECT\n" -+" g[eneral] NetworkManager's general status and operations\n" -+" n[etworking] overall networking control\n" -+" r[adio] NetworkManager radio switches\n" -+" c[onnection] NetworkManager's connections\n" -+" d[evice] devices managed by NetworkManager\n" -+" a[gent] NetworkManager secret agent or polkit agent\n" -+" m[onitor] monitor NetworkManager changes\n" - "\n" - - #: ../clients/cli/nmcli.c:249 -@@ -5388,11 +5425,9 @@ msgid "Error: Option '%s' is unknown, try 'nmcli -help'." - msgstr "エラー: オプション '%s' は不明です、'nmcli -help' を確認してください。" - - #: ../clients/cli/nmcli.c:433 ../clients/cli/nmcli.c:440 --#, fuzzy, c-format -+#, c-format - msgid "Error: nmcli terminated by signal %s (%d)\n" --msgstr "" --"\n" --"Error: nmcli がシグナル %s (%d) で終了しました\n" -+msgstr "Error: nmcli がシグナル %s (%d) で終了しました\n" - - #: ../clients/cli/nmcli.c:538 - msgid "Success" -@@ -5712,9 +5747,9 @@ msgstr "" - " ab 4 55 0xa6 ea 3a 74 C2\n" - - #: ../clients/cli/settings.c:2243 --#, fuzzy, c-format -+#, c-format - msgid "invalid option '%s', use a combination of [%s]" --msgstr "無効なオプション '%s' です。[%s] のいずれかを使用してください" -+msgstr "無効なオプション '%s' です。[%s] の組み合わせを使用してください" - - #: ../clients/cli/settings.c:2411 - #, c-format -@@ -5748,9 +5783,9 @@ msgstr "" - "例: mode=2,miimon=120\n" - - #: ../clients/cli/settings.c:2486 --#, fuzzy, c-format -+#, c-format - msgid "%d (forever)" --msgstr "%d (no)" -+msgstr "%d (forever)" - - #. Don't allow setting type unless the connection is brand new. - #. * Just because it's a bad idea and the user wouldn't probably want that. -@@ -5760,9 +5795,9 @@ msgstr "%d (no)" - #. * nmc_setting_set_property() is called only after the property - #. * we're setting (type) has been removed. - #: ../clients/cli/settings.c:2542 --#, fuzzy, c-format -+#, c-format - msgid "Can not change the connection type" --msgstr "不明な/未処理の Bluetooth 接続タイプ" -+msgstr "接続タイプを変更できません" - - #: ../clients/cli/settings.c:2566 ../libnm-core/nm-setting-connection.c:887 - #: ../libnm-util/nm-setting-connection.c:791 -@@ -6121,9 +6156,9 @@ msgid "'%s' is not a valid channel; use <1-13>" - msgstr "'%s' は有効なチャンネルではありません; <1-13> を使用してください" - - #: ../clients/cli/settings.c:4563 --#, fuzzy, c-format -+#, c-format - msgid "invalid method '%s', use one of %s" --msgstr "無効なモード '%s' です。%s のいずれかを使用してください" -+msgstr "無効なメソッド '%s' です。%s のいずれかを使用してください" - - #: ../clients/cli/settings.c:4628 - #, c-format -@@ -6462,20 +6497,18 @@ msgid "Wired 802.1X authentication" - msgstr "有線 802.1X の認証" - - #: ../clients/common/nm-secret-agent-simple.c:475 --#, fuzzy, c-format -+#, c-format - msgid "Secrets are required to access the wired network '%s'" --msgstr "" --"ワイヤレスネットワーク '%s' へのアクセスにはパスワードまたは暗号キーが必要で" --"す。" -+msgstr "有線ネットワーク '%s' へのアクセスにはシークレットが必要です" - - #: ../clients/common/nm-secret-agent-simple.c:480 - msgid "DSL authentication" - msgstr "DSL 認証" - - #: ../clients/common/nm-secret-agent-simple.c:481 --#, fuzzy, c-format -+#, c-format - msgid "Secrets are required for the DSL connection '%s'" --msgstr "タイプ '%s' の接続には設定が必要です" -+msgstr "DSL 接続 '%s' にはシークレットが必要です" - - #: ../clients/common/nm-secret-agent-simple.c:489 - msgid "PIN code required" -@@ -6506,50 +6539,50 @@ msgstr "'%s' への接続にはパスワードが必要です。" - #: ../clients/common/nm-secret-agent-simple.c:515 - #, c-format - msgid "Secrets are required to access the MACsec network '%s'" --msgstr "" -+msgstr "MACsec ネットワーク '%s' へのアクセスにはシークレットが必要です" - - #: ../clients/common/nm-secret-agent-simple.c:519 - msgid "MACsec PSK authentication" --msgstr "" -+msgstr "MACsec PSK 認証" - - #: ../clients/common/nm-secret-agent-simple.c:528 - msgid "MACsec EAP authentication" --msgstr "" -+msgstr "MACsec EAP 認証" - - #: ../clients/common/nm-secret-agent-simple.c:568 - msgid "VPN password required" --msgstr "PIN パスワードが必要です" -+msgstr "VPN パスワードが必要です" - - #: ../clients/common/nm-vpn-helpers.c:48 --#, fuzzy, c-format -+#, c-format - msgid "unknown VPN plugin \"%s\"" --msgstr "プラグイン %s をロードできません" -+msgstr "不明な VPNプラグイン '%s'" - - #: ../clients/common/nm-vpn-helpers.c:59 --#, fuzzy, c-format -+#, c-format - msgid "cannot load legacy-only VPN plugin \"%s\" for \"%s\"" --msgstr "プラグイン %s をロードできません" -+msgstr "'%s' 向けレガシー専用 VPN プラグイン '%s' を読み込めません" - - #: ../clients/common/nm-vpn-helpers.c:64 --#, fuzzy, c-format -+#, c-format - msgid "" - "cannot load VPN plugin \"%s\" due to missing \"%s\". Missing client plugin?" --msgstr "'%s' で VPN プラグインをロードできません: 不明なプラグイン名" -+msgstr "" -+"'%s' がないため VPN プラグイン '%s' を読み込めません。クライアントプラグイン" -+"がありませんか?" - - #: ../clients/common/nm-vpn-helpers.c:69 --#, fuzzy, c-format -+#, c-format - msgid "failed to load VPN plugin \"%s\": %s" --msgstr "エラー: VPN プラグインのロードに失敗しました: %s。" -+msgstr "VPN プラグイン '%s' の読み込みに失敗しました: %s" - - #: ../clients/common/nm-vpn-helpers.c:121 --#, fuzzy - msgid "Certificate password" --msgstr "プライベートキーのパスワード" -+msgstr "証明書のパスワード" - - #: ../clients/common/nm-vpn-helpers.c:122 --#, fuzzy - msgid "HTTP proxy password" --msgstr "グループパスワード" -+msgstr "HTTP プロキシのパスワード" - - #: ../clients/common/nm-vpn-helpers.c:125 - #: ../clients/common/nm-vpn-helpers.c:128 -@@ -6574,14 +6607,14 @@ msgid "Connecting" - msgstr "接続中" - - #: ../clients/nm-online.c:189 --#, fuzzy, c-format -+#, c-format - msgid "Error: timeout creating NMClient object\n" --msgstr "エラー: NMClient オブジェクトを作成できませんでした: %s。" -+msgstr "エラー: NMClient オブジェクトの作成でタイムアウト\n" - - #: ../clients/nm-online.c:209 --#, fuzzy, c-format -+#, c-format - msgid "Error: Could not create NMClient object: %s\n" --msgstr "エラー: NMClient オブジェクトを作成できませんでした: %s。" -+msgstr "エラー: NMClient オブジェクトを作成できませんでした: %s\n" - - #: ../clients/nm-online.c:235 - msgid "" -@@ -6740,14 +6773,13 @@ msgid "VLAN connection %d" - msgstr "VLAN 接続 %d" - - #: ../clients/tui/nm-editor-utils.c:225 ../clients/tui/nmt-page-ip-tunnel.c:136 --#, fuzzy - msgid "IP tunnel" - msgstr "IP トンネル" - - #: ../clients/tui/nm-editor-utils.c:229 --#, fuzzy, c-format -+#, c-format - msgid "IP tunnel connection %d" --msgstr "IP トンネル接続" -+msgstr "IP トンネル接続 %d" - - #: ../clients/tui/nm-editor-utils.c:244 - #, c-format -@@ -6792,7 +6824,6 @@ msgid "Could not create editor for invalid connection '%s'." - msgstr "無効な接続 '%s' のエディタを作成できませんでした。" - - #: ../clients/tui/nmt-editor.c:112 --#, fuzzy - msgid "Edit Connection" - msgstr "接続の編集" - -@@ -7061,39 +7092,39 @@ msgstr "この接続には IPv6 アドレス設定が必要になります" - #. The order must match the NM_IP_TUNNEL_MODE_* enum - #: ../clients/tui/nmt-page-ip-tunnel.c:78 - msgid "IPIP" --msgstr "" -+msgstr "IPIP" - - #: ../clients/tui/nmt-page-ip-tunnel.c:79 - msgid "GRE" --msgstr "" -+msgstr "GRE" - - #: ../clients/tui/nmt-page-ip-tunnel.c:80 - msgid "SIT" --msgstr "" -+msgstr "SIT" - - #: ../clients/tui/nmt-page-ip-tunnel.c:81 - msgid "ISATAP" --msgstr "" -+msgstr "ISATAP" - - #: ../clients/tui/nmt-page-ip-tunnel.c:82 - msgid "VTI" --msgstr "" -+msgstr "VTI" - - #: ../clients/tui/nmt-page-ip-tunnel.c:83 - msgid "IP6IP6" --msgstr "" -+msgstr "IP6IP6" - - #: ../clients/tui/nmt-page-ip-tunnel.c:84 - msgid "IPIP6" --msgstr "" -+msgstr "IPIP6" - - #: ../clients/tui/nmt-page-ip-tunnel.c:85 - msgid "IP6GRE" --msgstr "" -+msgstr "IP6GRE" - - #: ../clients/tui/nmt-page-ip-tunnel.c:86 - msgid "VTI6" --msgstr "" -+msgstr "VTI6" - - #: ../clients/tui/nmt-page-ip-tunnel.c:150 ../clients/tui/nmt-page-vlan.c:99 - msgid "Parent" -@@ -7101,20 +7132,19 @@ msgstr "親" - - #: ../clients/tui/nmt-page-ip-tunnel.c:157 - msgid "Local IP" --msgstr "" -+msgstr "ローカル IP" - - #: ../clients/tui/nmt-page-ip-tunnel.c:163 --#, fuzzy - msgid "Remote IP" --msgstr "リモート: " -+msgstr "リモート IP" - - #: ../clients/tui/nmt-page-ip-tunnel.c:169 - msgid "Input key" --msgstr "" -+msgstr "入力キー" - - #: ../clients/tui/nmt-page-ip-tunnel.c:176 - msgid "Output key" --msgstr "" -+msgstr "出力キー" - - #: ../clients/tui/nmt-page-ppp.c:131 - msgid "PPP CONFIGURATION" -@@ -7392,7 +7422,7 @@ msgstr "終了" - - #: ../clients/tui/nmtui-connect.c:416 ../clients/tui/nmtui-edit.c:120 - msgid "Back" --msgstr "" -+msgstr "戻る" - - #: ../clients/tui/nmtui-connect.c:439 - #, c-format -@@ -7965,7 +7995,7 @@ msgstr "無効なキー/証明書値パス \"%s\"" - #: ../libnm-core/nm-keyfile-reader.c:1030 - #, c-format - msgid "invalid PKCS#11 URI \"%s\"" --msgstr "" -+msgstr "無効な PKCS#11 URI \"%s\"" - - #: ../libnm-core/nm-keyfile-reader.c:1068 - msgid "invalid key/cert value data:;base64, is not base64" -@@ -7989,9 +8019,9 @@ msgid "invalid parity value '%s'" - msgstr "無効なパリティー値 '%s'" - - #: ../libnm-core/nm-keyfile-reader.c:1298 --#, fuzzy, c-format -+#, c-format - msgid "ignoring invalid team configuration: %s" --msgstr "無効な %s ルートを無視: %s" -+msgstr "無効な team 設定を無視: %s" - - #: ../libnm-core/nm-keyfile-reader.c:1504 - #, c-format -@@ -8037,19 +8067,16 @@ msgid "binary data missing" - msgstr "バイナリーデータがありません" - - #: ../libnm-core/nm-setting-8021x.c:500 --#, fuzzy - msgid "URI not NUL terminated" --msgstr "file:// URI が NUL で終了していません" -+msgstr "URI が NUL でないため終了しました" - - #: ../libnm-core/nm-setting-8021x.c:509 --#, fuzzy - msgid "URI is empty" --msgstr "file:// URI が空です" -+msgstr "URI が空です" - - #: ../libnm-core/nm-setting-8021x.c:517 --#, fuzzy - msgid "URI is not valid UTF-8" --msgstr "file:// URI が有効な UTF-8 ではありません" -+msgstr "URI が有効な UTF-8 ではありません" - - #: ../libnm-core/nm-setting-8021x.c:753 ../libnm-util/nm-setting-8021x.c:639 - msgid "CA certificate must be in X.509 format" -@@ -8120,7 +8147,7 @@ msgstr "証明書が無効です: %s" - #: ../libnm-core/nm-setting-8021x.c:3198 - #, c-format - msgid "password is not supported when certificate is not on a PKCS#11 token" --msgstr "" -+msgstr "証明書が PKCS#11 トークンにない場合は、パスワードはサポートされません" - - #: ../libnm-core/nm-setting-8021x.c:3235 - #: ../libnm-core/nm-setting-bluetooth.c:129 -@@ -8178,9 +8205,8 @@ msgid "'%s' is not a valid value for the property" - msgstr "'%s' は有効なプロパティの値ではありません" - - #: ../libnm-core/nm-setting-8021x.c:3290 --#, fuzzy - msgid "invalid auth flags" --msgstr "無効なルート: %s" -+msgstr "無効な auth フラグ" - - #: ../libnm-core/nm-setting-bluetooth.c:168 - #, c-format -@@ -8213,9 +8239,9 @@ msgid "'%s=%s' is incompatible with '%s > 0'" - msgstr "'%s=%s' は '%s > 0' とは互換性がありません" - - #: ../libnm-core/nm-setting-bond.c:629 --#, fuzzy, c-format -+#, c-format - msgid "'%s' is not a valid for '%s' option: %s" --msgstr "'%s' は '%s' オプション用の有効な IPv4 アドレスではありません" -+msgstr "'%s' は '%s' オプションに無効です: %s" - - #: ../libnm-core/nm-setting-bond.c:640 ../libnm-util/nm-setting-bond.c:577 - #, c-format -@@ -8342,11 +8368,9 @@ msgstr "" - "'%s' に設定する必要があります" - - #: ../libnm-core/nm-setting-connection.c:1077 --#, fuzzy, c-format -+#, c-format - msgid "A slave connection with '%s' set to '%s' cannot have a '%s' setting" --msgstr "" --"'%s' が設定され、ポートタイプが '%s' のスレーブ接続を検出します。'%s' は " --"'%s' に設定する必要があります" -+msgstr "'%s' に設定されている '%s' とのスレーブ接続には、'%s' 設定ができません" - - #: ../libnm-core/nm-setting-dcb.c:522 ../libnm-util/nm-setting-dcb.c:594 - msgid "flags invalid" -@@ -8439,12 +8463,12 @@ msgid "Missing IPv6 address" - msgstr "不明な IPv6 アドレス" - - #: ../libnm-core/nm-setting-ip-config.c:138 --#, fuzzy, c-format -+#, c-format - msgid "Invalid IPv4 address '%s'" - msgstr "無効な IPv4 アドレス '%s'" - - #: ../libnm-core/nm-setting-ip-config.c:138 --#, fuzzy, c-format -+#, c-format - msgid "Invalid IPv6 address '%s'" - msgstr "無効な IPv6 アドレス '%s'" - -@@ -8464,41 +8488,40 @@ msgid "Invalid routing metric '%s'" - msgstr "無効なルーティングメトリック '%s'" - - #: ../libnm-core/nm-setting-ip-config.c:1260 --#, fuzzy - msgid "unknown attribute" --msgstr "不明な設定名" -+msgstr "不明な属性" - - #: ../libnm-core/nm-setting-ip-config.c:1270 --#, fuzzy, c-format -+#, c-format - msgid "invalid attribute type '%s'" --msgstr "無効なパリティー値 '%s'" -+msgstr "無効な属性タイプ '%s'" - - #: ../libnm-core/nm-setting-ip-config.c:1281 - #, c-format - msgid "attribute is not valid for a IPv4 route" --msgstr "" -+msgstr "属性は IPv4 ルートには無効です" - - #: ../libnm-core/nm-setting-ip-config.c:1282 - #, c-format - msgid "attribute is not valid for a IPv6 route" --msgstr "" -+msgstr "属性は IPv6 ルートには無効です" - - #: ../libnm-core/nm-setting-ip-config.c:1298 - #: ../libnm-core/nm-setting-ip-config.c:1322 --#, fuzzy, c-format -+#, c-format - msgid "'%s' is not a valid IPv4 address" --msgstr "'%s' は有効な IP アドレスではありません" -+msgstr "'%s' は有効な IPv4 アドレスではありません" - - #: ../libnm-core/nm-setting-ip-config.c:1299 - #: ../libnm-core/nm-setting-ip-config.c:1323 --#, fuzzy, c-format -+#, c-format - msgid "'%s' is not a valid IPv6 address" --msgstr "'%s' は有効な IP アドレスではありません" -+msgstr "'%s' は有効な IPv6 アドレスではありません" - - #: ../libnm-core/nm-setting-ip-config.c:1313 --#, fuzzy, c-format -+#, c-format - msgid "invalid prefix %s" --msgstr "無効なルート: %s" -+msgstr "無効なプレフィックス %s" - - #: ../libnm-core/nm-setting-ip-config.c:2429 - #, c-format -@@ -8539,9 +8562,9 @@ msgid "%d. route cannot be a default route" - msgstr "%d. ルートをデフォルトルートにすることはできません" - - #: ../libnm-core/nm-setting-ip-config.c:2523 --#, fuzzy, c-format -+#, c-format - msgid "a gateway is incompatible with '%s'" --msgstr "'%s=%s' は '%s > 0' とは互換性がありません" -+msgstr "ゲートウェイは '%s' と互換性がありません" - - #: ../libnm-core/nm-setting-ip4-config.c:143 - #: ../libnm-core/nm-setting-ip6-config.c:167 -@@ -8577,32 +8600,29 @@ msgid "property cannot be set when dhcp-hostname is also set" - msgstr "dhcp-hostname も設定されている場合は、プロパティーを設定できません" - - #: ../libnm-core/nm-setting-ip4-config.c:235 --#, fuzzy, c-format -+#, c-format - msgid "multiple addresses are not allowed for '%s=%s'" --msgstr "このプロパティは '%s=%s' には許可されていません" -+msgstr "'%s=%s' では複数のアドレスは許可されていません" - - #: ../libnm-core/nm-setting-ip4-config.c:249 --#, fuzzy - msgid "property should be TRUE when method is set to disabled" --msgstr "プロパティータイプは '%s' に設定する必要があります" -+msgstr "メソッドが無効に設定されている場合は、プロパティーは TRUE にします" - - #: ../libnm-core/nm-setting-ip6-config.c:241 --#, fuzzy - msgid "value is not a valid token" --msgstr "値 '%s' は有効な UUID ではありません" -+msgstr "値 は有効なトークンではありません" - - #: ../libnm-core/nm-setting-ip6-config.c:252 --#, fuzzy - msgid "only makes sense with EUI64 address generation mode" --msgstr "IPv6 SLAAC アドレス生成モード" -+msgstr "EUI64 アドレス生成モードでのみ、意味が通じます" - - #: ../libnm-core/nm-setting-ip6-config.c:264 - msgid "token is not in canonical form" --msgstr "" -+msgstr "トークンが正規形式ではありません" - - #: ../libnm-core/nm-setting-ip6-config.c:276 - msgid "property should be TRUE when method is set to ignore" --msgstr "" -+msgstr "メソッドが ignore に設定されている場合は、プロパティーは TRUE にします" - - #: ../libnm-core/nm-setting-ip-tunnel.c:318 - #, c-format -@@ -8639,17 +8659,16 @@ msgstr "固定 TTL は、パス MTU 検出が有効な場合のみ許可され - - #: ../libnm-core/nm-setting-macsec.c:235 - msgid "the key is empty" --msgstr "" -+msgstr "キーが空です" - - #: ../libnm-core/nm-setting-macsec.c:246 - #, c-format - msgid "the key must be %d characters" --msgstr "" -+msgstr "キーは %d 文字にする必要があります" - - #: ../libnm-core/nm-setting-macsec.c:254 --#, fuzzy - msgid "the key contains non-hexadecimal characters" --msgstr "IV は 16進法でない数字を含んでいます。" -+msgstr "キーは 16進法でない文字が含まれています" - - #: ../libnm-core/nm-setting-macsec.c:291 ../libnm-core/nm-setting-vlan.c:634 - #: ../libnm-util/nm-setting-vlan.c:556 -@@ -8666,12 +8685,12 @@ msgstr "プロパティ、'%s:%s' いずれも指定されていません" - #: ../libnm-core/nm-setting-macsec.c:333 - #, c-format - msgid "EAP key management requires '%s' setting presence" --msgstr "" -+msgstr "EAP キー管理には '%s' 設定が必要です" - - #: ../libnm-core/nm-setting-macsec.c:344 - #, c-format - msgid "invalid port %d" --msgstr "" -+msgstr "無効なポート %d" - - #: ../libnm-core/nm-setting-macvlan.c:192 - msgid "non promiscuous operation is allowed only in passthru mode" -@@ -8703,34 +8722,34 @@ msgid "setting this property requires non-zero '%s' property" - msgstr "このプロパティを設定するにはゼロ以外の '%s' プロパティが必要です" - - #: ../libnm-core/nm-setting-proxy.c:163 --#, fuzzy, c-format -+#, c-format - msgid "invalid proxy method" --msgstr "無効な優先度マップ '%s'" -+msgstr "無効なプロキシメソッド" - - #: ../libnm-core/nm-setting-proxy.c:173 ../libnm-core/nm-setting-proxy.c:182 --#, fuzzy, c-format -+#, c-format - msgid "this property is not allowed for method none" --msgstr "このプロパティは '%s=%s' には許可されていません" -+msgstr "このプロパティはメソッド none には許可されていません" - - #: ../libnm-core/nm-setting-proxy.c:193 - #, c-format - msgid "the script is too large" --msgstr "" -+msgstr "スクリプトが長すぎます" - - #: ../libnm-core/nm-setting-proxy.c:201 --#, fuzzy, c-format -+#, c-format - msgid "the script is not valid utf8" --msgstr "インデックス '%s' は無効です" -+msgstr "スクリプトは有効な utf8 ではありません" - - #: ../libnm-core/nm-setting-proxy.c:209 - #, c-format - msgid "the script lacks FindProxyForURL function" --msgstr "" -+msgstr "スクリプトには FindProxyForURL 関数がありません" - - #: ../libnm-core/nm-setting-team.c:94 ../libnm-core/nm-setting-team-port.c:122 - #, c-format - msgid "team config exceeds size limit" --msgstr "" -+msgstr "team 設定が制限サイズを超えています" - - #: ../libnm-core/nm-setting-tun.c:187 - #, c-format -@@ -8748,66 +8767,59 @@ msgid "'%s': invalid group ID" - msgstr "'%s': 無効なグループ ID" - - #: ../libnm-core/nm-setting-user.c:111 --#, fuzzy - msgid "missing key" --msgstr "不明な設定" -+msgstr "キーがみつかりません" - - #: ../libnm-core/nm-setting-user.c:117 --#, fuzzy - msgid "key is too long" --msgstr "エラー: ssid が長すぎます。" -+msgstr "キーが長すぎます" - - #: ../libnm-core/nm-setting-user.c:122 --#, fuzzy - msgid "key must be UTF8" --msgstr "パスワードは UTF-8 である必要があります" -+msgstr "キーは UTF-8 である必要があります" - - #: ../libnm-core/nm-setting-user.c:145 - msgid "key requires a '.' for a namespace" --msgstr "" -+msgstr "キーはネームスペースに '.' が必要です" - - #: ../libnm-core/nm-setting-user.c:158 - msgid "key cannot contain \"..\"" --msgstr "" -+msgstr "キーに \"..\" を含めることはできません" - - #: ../libnm-core/nm-setting-user.c:163 --#, fuzzy - msgid "key contains invalid characters" --msgstr "IV は 16進法でない数字を含んでいます。" -+msgstr "キーに無効な文字が含まれています" - - #: ../libnm-core/nm-setting-user.c:188 --#, fuzzy - msgid "value is missing" --msgstr "エラー: %s 引数がありません。" -+msgstr "値がありません" - - #: ../libnm-core/nm-setting-user.c:195 --#, fuzzy - msgid "value is too large" --msgstr "シークレット値が空でした" -+msgstr "値が長すぎます" - - #: ../libnm-core/nm-setting-user.c:201 --#, fuzzy - msgid "value is not valid UTF8" --msgstr "file:// URI が有効な UTF-8 ではありません" -+msgstr "値が有効な UTF-8 ではありません" - - #: ../libnm-core/nm-setting-user.c:338 - msgid "maximum number of user data entries reached" --msgstr "" -+msgstr "ユーザーデータエントリーが最大数に達しました" - - #: ../libnm-core/nm-setting-user.c:379 --#, fuzzy, c-format -+#, c-format - msgid "invalid key \"%s\": %s" --msgstr "無効なルート: %s" -+msgstr "無効なキー '%s': %s" - - #: ../libnm-core/nm-setting-user.c:383 --#, fuzzy, c-format -+#, c-format - msgid "invalid value for \"%s\": %s" --msgstr "'%s' は有効な '%s' の値ではありません" -+msgstr "'%s' の無効な値: %s" - - #: ../libnm-core/nm-setting-user.c:398 - #, c-format - msgid "maximum number of user data entries reached (%u instead of %u)" --msgstr "" -+msgstr "ユーザーデータエントリーが最大数に達しました (%u ではなく %u)" - - #: ../libnm-core/nm-setting-vlan.c:670 ../libnm-util/nm-setting-vlan.c:600 - #, c-format -@@ -8820,7 +8832,7 @@ msgstr "フラグが無効です" - - #: ../libnm-core/nm-setting-vlan.c:691 - msgid "vlan setting should have a ethernet setting as well" --msgstr "" -+msgstr "vlan 設定にはイーサネット設定も必要です" - - #: ../libnm-core/nm-setting-vpn.c:460 - #, c-format -@@ -8865,9 +8877,9 @@ msgid "%d is greater than local port max %d" - msgstr "%d はローカルポートの最大 %d よりも大きいです" - - #: ../libnm-core/nm-setting-wired.c:632 ../libnm-util/nm-setting-wired.c:613 --#, fuzzy, c-format -+#, c-format - msgid "'%s' is not a valid Ethernet port value" --msgstr "'%s' は有効な Ethernet ポート値ではありません" -+msgstr "'%s' は有効なイーサネットポート値ではありません" - - #: ../libnm-core/nm-setting-wired.c:642 ../libnm-util/nm-setting-wired.c:623 - #, c-format -@@ -8889,16 +8901,15 @@ msgstr "Wake-on-LAN パスワードはマジックパケットモードでのみ - - #: ../libnm-core/nm-setting-wired.c:770 - msgid "when link autonegotiation is enabled no duplex value is accepted" --msgstr "" -+msgstr "リンク autonegotiation が有効になっていると、二重値は承認されません" - - #: ../libnm-core/nm-setting-wired.c:778 - msgid "when link autonegotiation is enabled speed should be 0" --msgstr "" -+msgstr "リンク autonegotiation が有効になっている場合は、スピードは 0 にします" - - #: ../libnm-core/nm-setting-wired.c:788 --#, fuzzy - msgid "both speed and duplex are required for static link configuration" --msgstr "VPN サービスは無効な設定を返しました" -+msgstr "スピードと二重の両方が静的リンク設定に必要です" - - #: ../libnm-core/nm-setting-wireless-security.c:882 - #: ../libnm-util/nm-setting-wireless-security.c:912 -@@ -8948,14 +8959,14 @@ msgid "'%s' requires setting '%s' property" - msgstr "'%s' の場合は '%s' プロパティーを設定する必要があります" - - #: ../libnm-core/nm-setting-wireless.c:883 --#, fuzzy, c-format -+#, c-format - msgid "invalid value" --msgstr "無効なキー/証明書値" -+msgstr "無効な値" - - #: ../libnm-core/nm-setting-wireless.c:904 - #, c-format - msgid "conflicting value of mac-address-randomization and cloned-mac-address" --msgstr "" -+msgstr "mac-address-randomization と cloned-mac-address の値の競合" - - #: ../libnm-core/nm-setting.c:838 - #, c-format -@@ -9001,9 +9012,9 @@ msgid "not a file (%s)" - msgstr "ファイルではありません (%s)" - - #: ../libnm-core/nm-utils.c:2464 --#, fuzzy, c-format -+#, c-format - msgid "invalid file owner %d for %s" --msgstr "'%s' は無効なフィールドです; 許可されているのは次のフィールドです: %s" -+msgstr "'%s' の無効なファイル所有者 %d" - - #: ../libnm-core/nm-utils.c:2475 - #, c-format -@@ -9041,94 +9052,91 @@ msgid "Could not find \"%s\" binary" - msgstr "\"%s\" バイナリーを見つけることができませんでした" - - #: ../libnm-core/nm-utils.c:3665 --#, fuzzy, c-format -+#, c-format - msgid "not a valid ethernet MAC address for mask at position %lld" --msgstr "'%s' は '%s' オプション用の有効な IPv4 アドレスではありません" -+msgstr "%lld の場所でマスク用に有効なイーサネット MAC アドレスではありません" - - #: ../libnm-core/nm-utils.c:3680 - #, c-format - msgid "not a valid ethernet MAC address #%u at position %lld" --msgstr "" -+msgstr "%lld の場所で有効なイーサネット MAC アドレス #%u ではありません" - - #: ../libnm-core/nm-utils.c:3714 --#, fuzzy - msgid "interface name is too short" --msgstr "インターフェース名 [*]: " -+msgstr "インターフェース名が短すぎます" - - #: ../libnm-core/nm-utils.c:3720 - msgid "interface name is longer than 15 characters" --msgstr "" -+msgstr "インターフェース名が 15 文字を超えています" - - #: ../libnm-core/nm-utils.c:3726 --#, fuzzy - msgid "interface name is reserved" --msgstr "インターフェース名と UUID が’必要です\n" -+msgstr "インターフェース名が予約されています" - - #: ../libnm-core/nm-utils.c:3733 - msgid "interface name contains an invalid character" --msgstr "" -+msgstr "インターフェース名に無効な文字が含まれています" - - #: ../libnm-core/nm-utils.c:4534 ../libnm-core/nm-utils.c:4668 - msgid "value is NULL" --msgstr "" -+msgstr "値が NULL です" - - #: ../libnm-core/nm-utils.c:4534 ../libnm-core/nm-utils.c:4668 --#, fuzzy - msgid "value is empty" --msgstr "シークレット値が空でした" -+msgstr "値が空です" - - #: ../libnm-core/nm-utils.c:4543 --#, fuzzy, c-format -+#, c-format - msgid "invalid JSON at position %d (%s)" --msgstr "無効なオプション '%s'" -+msgstr "%d (%s) で無効な JSON" - - #: ../libnm-core/nm-utils.c:4555 ../libnm-core/nm-utils.c:4687 - msgid "is not a JSON object" --msgstr "" -+msgstr "JSON オブジェクトではありません" - - #: ../libnm-core/nm-utils.c:4657 - msgid "not valid utf-8" --msgstr "" -+msgstr "utf-8 ではありません" - - #: ../libnm-core/nm-utils.c:4782 ../libnm-core/nm-utils.c:4800 - #, c-format - msgid "unterminated escape sequence" --msgstr "" -+msgstr "未終了のエスケープシーケンス" - - #: ../libnm-core/nm-utils.c:4810 - #, c-format - msgid "missing key-value separator '%c'" --msgstr "" -+msgstr "キー-値のセパレーター '%c' がありません" - - #: ../libnm-core/nm-utils.c:4827 --#, fuzzy, c-format -+#, c-format - msgid "unknown attribute '%s'" --msgstr "不明なデバイス '%s' です。" -+msgstr "不明な属性 '%s'" - - #: ../libnm-core/nm-utils.c:4837 --#, fuzzy, c-format -+#, c-format - msgid "invalid uint32 value '%s' for attribute '%s'" --msgstr "無効なオプション '%s'、またはその値 '%s' です" -+msgstr "属性 '%s' の無効な uint32 値 '%s'" - - #: ../libnm-core/nm-utils.c:4846 --#, fuzzy, c-format -+#, c-format - msgid "invalid uint8 value '%s' for attribute '%s'" --msgstr "無効なオプション '%s'、またはその値 '%s' です" -+msgstr "属性 '%s' の無効な uint8 値 '%s'" - - #: ../libnm-core/nm-utils.c:4859 --#, fuzzy, c-format -+#, c-format - msgid "invalid boolean value '%s' for attribute '%s'" --msgstr "無効なオプション '%s'、またはその値 '%s' です" -+msgstr "属性 '%s' の無効なブール値 '%s'" - - #: ../libnm-core/nm-utils.c:4867 - #, c-format - msgid "unsupported attribute '%s' of type '%s'" --msgstr "" -+msgstr "タイプ '%s' のサポートされていない属性 '%s'" - - #: ../libnm-core/nm-vpn-editor-plugin.c:296 --#, fuzzy, c-format -+#, c-format - msgid "cannot load plugin \"%s\": %s" --msgstr "プラグイン %s をロードできません" -+msgstr "プラグイン '%s' を読み込めません: %s" - - #: ../libnm-core/nm-vpn-editor-plugin.c:307 - #, c-format -@@ -9389,9 +9397,8 @@ msgid "" - msgstr "デバイスには接続に必要な Bluetooth 機能がありません。" - - #: ../libnm/nm-device-dummy.c:46 --#, fuzzy - msgid "The connection was not a dummy connection." --msgstr "接続はモデム接続ではありませんでした。" -+msgstr "接続はダミー接続ではありませんでした。" - - #: ../libnm/nm-device-dummy.c:53 ../libnm/nm-device-generic.c:97 - msgid "The connection did not specify an interface name." -@@ -9406,9 +9413,9 @@ msgid "The connection and device differ in S390 subchannels." - msgstr "接続とデバイスは S390 サブチャネルで異なります。" - - #: ../libnm/nm-device-ethernet.c:236 --#, fuzzy, c-format -+#, c-format - msgid "Invalid device MAC address %s." --msgstr "無効なデバイス MAC アドレスです。" -+msgstr "無効なデバイス MAC アドレス %s。" - - #: ../libnm/nm-device-ethernet.c:241 - msgid "The MACs of the device and the connection do not match." -@@ -9516,11 +9523,11 @@ msgstr "接続は WiMAX 接続ではありませんでした。" - - #: ../libnm/nm-device.c:1651 - msgid "MACsec" --msgstr "" -+msgstr "MACsec" - - #: ../libnm/nm-device.c:1653 - msgid "Dummy" --msgstr "" -+msgstr "ダミー" - - #: ../libnm/nm-device.c:2544 - #, c-format -@@ -9555,16 +9562,12 @@ msgstr "" - "れます" - - #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:3 --#, fuzzy - msgid "Reload NetworkManager configuration" --msgstr "NetworkManager の設定を表示して終了する" -+msgstr "NetworkManager 設定をリロード" - - #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:4 --#, fuzzy - msgid "System policy prevents reloading NetworkManager" --msgstr "" --"システムポリシーによりシステムのネットワーキングの有効化または無効化が阻止さ" --"れます" -+msgstr "システムポリシーにより NetworkManager のリロードが回避されます" - - #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:5 - msgid "" -@@ -9674,23 +9677,21 @@ msgstr "システムポリシーにより永続的なグローバル DNS 設定 - - #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:27 - msgid "Perform a checkpoint or rollback of interfaces configuration" --msgstr "" -+msgstr "インターフェース設定のチェックポイントまたはロールバックを実行" - - #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:28 --#, fuzzy - msgid "System policy prevents the creation of a checkpoint or its rollback" --msgstr "システムポリシーにより永続的なシステムのホスト名の修正が阻止されます" -+msgstr "" -+"システムポリシーによりチェックポイントまたはそのロールバックの作成が回避され" -+"ます" - - #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:29 --#, fuzzy - msgid "Enable or disable device statistics" --msgstr "Wi-Fi デバイスを有効または無効にする" -+msgstr "デバイスの統計値を有効または無効にする" - - #: ../data/org.freedesktop.NetworkManager.policy.in.in.h:30 --#, fuzzy - msgid "System policy prevents enabling or disabling device statistics" --msgstr "" --"システムポリシーにより Wi-Fi デバイスの有効化または無効化が阻止されます" -+msgstr "システムポリシーによりデバイス統計値の有効化または無効化が阻止されます" - - #: ../shared/nm-utils/nm-shared-utils.c:312 - #, c-format -@@ -9913,9 +9914,8 @@ msgid "Bridge connection" - msgstr "ブリッジ接続" - - #: ../src/devices/nm-device-dummy.c:70 --#, fuzzy - msgid "Dummy connection" --msgstr "ADSL 接続" -+msgstr "ダミー接続" - - #: ../src/devices/nm-device-ethernet.c:1435 - msgid "PPPoE connection" -@@ -10173,9 +10173,8 @@ msgid "Connection UUID" - msgstr "接続 UUID" - - #: ../src/nm-iface-helper.c:293 --#, fuzzy - msgid "Connection Token for Stable IDs" --msgstr "接続プロファイルの詳細" -+msgstr "安定 ID の接続トークン" - - #: ../src/nm-iface-helper.c:294 - msgid "Whether to manage IPv6 SLAAC" -@@ -10281,16 +10280,3 @@ msgstr "不明なログレベル '%s'" - #, c-format - msgid "Unknown log domain '%s'" - msgstr "不明なログドメイン '%s'" -- --#, fuzzy --#~ msgid "unrecognized option '%s'" --#~ msgstr "無効なオプション '%s'" -- --#~ msgid "Option '--terse' requires specifying '--fields'" --#~ msgstr "オプション '--terse' には '--fields' の指定が必要です" -- --#~ msgid "" --#~ "Option '--terse' requires specific '--fields' option values , not '%s'" --#~ msgstr "" --#~ "オプション'--terse' には特定の '--fields' オプションの値が必要で、 '%s' で" --#~ "はありません" --- -2.13.0 - -From 82b97f68923936b4af74dc602fa2eb3ae1f9d0ac Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Mon, 29 May 2017 15:25:34 +0200 -Subject: [PATCH 1/2] po: add zanata.xml - ---- - zanata.xml | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - create mode 100644 zanata.xml - -diff --git a/zanata.xml b/zanata.xml -new file mode 100644 -index 0000000..644c06b ---- /dev/null -+++ b/zanata.xml -@@ -0,0 +1,16 @@ -+ -+ -+ -+ -+ -+ https://vendors.zanata.redhat.com/ -+ networkmanager -+ RHEL-7.4 -+ gettext -+ po -+ po -+ -+ --- -2.13.0 - diff --git a/0015-ifcfg-rh-legacy-netmask-rh1445414.patch b/0015-ifcfg-rh-legacy-netmask-rh1445414.patch deleted file mode 100644 index fa081b5..0000000 --- a/0015-ifcfg-rh-legacy-netmask-rh1445414.patch +++ /dev/null @@ -1,721 +0,0 @@ -From 3757404ab4d14fcd6e61b367c37308ef1e3dbc3a Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Thu, 25 May 2017 15:03:40 +0200 -Subject: [PATCH 1/5] ifcfg-rh: fix writing NETMASK in write_ip4_setting() - -(cherry picked from commit efd462d946ae3382975cd73f60f33185a2cf9542) -(cherry picked from commit 2bf3d590ceb99c9f7d0c5dfd3e031e69d14fa5b8) ---- - src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -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 400e9bd..c66af01 100644 ---- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c -+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c -@@ -2196,7 +2196,8 @@ write_ip4_setting (NMConnection *connection, shvarFile *ifcfg, GError **error) - char buf[INET_ADDRSTRLEN]; - - g_free (tmp); -- svSetValueStr (ifcfg, netmask_key, nm_utils_inet4_ntop (prefix, buf)); -+ svSetValueStr (ifcfg, netmask_key, -+ nm_utils_inet4_ntop (nm_utils_ip4_prefix_to_netmask (prefix), buf)); - } - - svUnsetValue (ifcfg, gw_key); --- -2.9.4 - - -From 37b96ee417fb9bb67a02c162f1dbe05fa4a9eb5f Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Thu, 25 May 2017 14:53:03 +0200 -Subject: [PATCH 2/5] ifcfg-rh: add svFindFirstKeyWithPrefix() function - -During backporting manually patched to use GList instead of CList. - -(cherry picked from commit e9d960740af008acb91074b31a570fba17dc0344) -(cherry picked from commit 3dfddc18a53601463da49451c05cc62869773e16) ---- - src/settings/plugins/ifcfg-rh/shvar.c | 22 ++++++++++++++++++++++ - src/settings/plugins/ifcfg-rh/shvar.h | 2 ++ - 2 files changed, 24 insertions(+) - -diff --git a/src/settings/plugins/ifcfg-rh/shvar.c b/src/settings/plugins/ifcfg-rh/shvar.c -index 9fce5aa..47ad5a2 100644 ---- a/src/settings/plugins/ifcfg-rh/shvar.c -+++ b/src/settings/plugins/ifcfg-rh/shvar.c -@@ -905,6 +905,28 @@ svGetKeys (shvarFile *s) - - /*****************************************************************************/ - -+const char * -+svFindFirstKeyWithPrefix (shvarFile *s, const char *key_prefix) -+{ -+ const GList *current; -+ const shvarLine *l; -+ -+ g_return_val_if_fail (s, NULL); -+ g_return_val_if_fail (key_prefix, NULL); -+ -+ for (current = s->lineList; current; current = current->next) { -+ l = current->data; -+ if ( l->key -+ && l->line -+ && g_str_has_prefix (l->key, key_prefix)) -+ return l->key; -+ } -+ -+ return NULL; -+} -+ -+/*****************************************************************************/ -+ - static const char * - _svGetValue (shvarFile *s, const char *key, char **to_free) - { -diff --git a/src/settings/plugins/ifcfg-rh/shvar.h b/src/settings/plugins/ifcfg-rh/shvar.h -index 9d8c236..a13920a 100644 ---- a/src/settings/plugins/ifcfg-rh/shvar.h -+++ b/src/settings/plugins/ifcfg-rh/shvar.h -@@ -44,6 +44,8 @@ shvarFile *svCreateFile (const char *name); - /* Open the file , return shvarFile on success, NULL on failure */ - shvarFile *svOpenFile (const char *name, GError **error); - -+const char *svFindFirstKeyWithPrefix (shvarFile *s, const char *key_prefix); -+ - /* Get the value associated with the key, and leave the current pointer - * pointing at the line containing the value. The char* returned MUST - * be freed by the caller. --- -2.9.4 - - -From 9df20fdb815fd37f31fa488325bfc3803bfa5003 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Thu, 25 May 2017 14:07:28 +0200 -Subject: [PATCH 3/5] build: sort filenames in Makefile.am alphabetically - -(cherry picked from commit 371b761680d660ea61ae33e02916564a0c3acc02) -(cherry picked from commit 85aa450e947785dc2eab73a5b248345ce9662b5b) ---- - Makefile.am | 301 ++++++++++++++++++++++++++++++------------------------------ - 1 file changed, 151 insertions(+), 150 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 909847e..c543a21 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -2003,154 +2003,153 @@ $(src_settings_plugins_ifcfg_rh_tests_test_ifcfg_rh_OBJECTS): $(libnm_core_lib_h - endif - - EXTRA_DIST += \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-System_test-bridge-component-a.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-System_test-bridge-component-b.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-System_test-wired-802-1X-subj-matches.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_User_1.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Bond_Main.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Bridge_Component.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Permissions.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Proxy_Basic.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Team_Port.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_VLAN_reorder_hdr.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_WiFi_Band_A.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_WiFi_Hidden.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_WiFi_MAC_always.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_WiFi_MAC_default.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_WiFi_MAC_missing.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_WiFi_MAC_never.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Wifi_LEAP.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Wifi_WEP_104_ASCII.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Wired_Auto-Negotiate.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Wired_Wake-on-LAN.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Vlan_test-vlan-interface.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-dcb-test.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-random_wifi_connection.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-random_wifi_connection_2.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-team-slave-enp31s0f1-142.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bond-eth-type \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bond-main \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bond-mode-numeric \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bond-slave \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bond-slave-ib \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bridge-component \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bridge-main \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bridge-missing-stp \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dcb \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dcb-bad-booleans \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dcb-bad-percent \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dcb-bad-uints \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dcb-default-app-priorities \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dcb-pgpct-not-100 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dcb-short-booleans \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dcb-short-percent \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dcb-short-uints \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dns-options \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-fcoe-fabric \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-fcoe-vn2vn \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-ibft \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-minimal \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-misc-variables \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-variables-corner-cases-1 \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-nm-controlled \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-nm-controlled-unrecognized \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-unrecognized \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-bootproto \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-dhcp \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-dhcp-plus-ip \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-shared-plus-ip \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-dhcp-send-hostname \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-dhcpv6-hostname-fallback \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-dhcp6-only \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-autoip \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-global-gateway \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/network-test-wired-global-gateway \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-global-gateway-ignore \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/network-test-wired-global-gateway-ignore \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-obsolete-gateway-n \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-never-default \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/network-test-wired-never-default \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-defroute-no \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-defroute-no-gatewaydev-yes \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/network-test-wired-defroute-no-gatewaydev-yes \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-8021x-peap-mschapv2 \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wired-8021x-peap-mschapv2 \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-8021x-tls-agent \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-8021x-tls-always \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-802-1X-subj-matches \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-802-1x-ttls-eapgtc \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-onboot-no \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-noip \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-onboot-no \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-permissions \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-read-proxy-basic \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-sit-ignore \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-static-routes-legacy \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-static-routes-legacy.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master-1 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master-2 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master-invalid \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-port-1 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-port-2 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-port-empty-config \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-unrecognized \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-variables-corner-cases-1 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-flags-1 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-flags-2 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-interface \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-only-device \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-only-vlanid \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-physdev \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-reorder-hdr-1 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-reorder-hdr-2 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-trailing-spaces \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-band-a \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-band-a-channel-mismatch \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-band-bg-channel-mismatch \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-dynamic-wep-leap \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-hidden \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-leap \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-leap-agent \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-leap-always-ask \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-mac-random-always \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-mac-random-default \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-mac-random-missing \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-mac-random-never \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-open \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-open-auto \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-open-ssid-quoted \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-open-ssid-long-quoted \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-open-ssid-bad-hex \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-open-ssid-hex \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-open-ssid-long-hex \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-open-ssid-bad-hex \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-open-ssid-long-quoted \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-open-ssid-quoted \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wep \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep-104-ascii \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep-40-ascii \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep-adhoc \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wep-adhoc \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep-agent-keys \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep-eap-ttls-chap \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wep-eap-ttls-chap \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-leap \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-leap \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-leap-agent \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-leap-always-ask \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep-no-keys \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep-passphrase \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-eap-tls \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-eap-ttls-tls \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-psk \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-psk-2 \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-2 \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-psk-unquoted \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-unquoted \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-psk-unquoted2 \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-unquoted2 \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-psk-adhoc \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-adhoc \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-psk-hex \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-hex \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-eap-tls \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-eap-tls \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-eap-ttls-tls \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-eap-ttls-tls \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-hidden \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-band-a \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-band-a-channel-mismatch \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-band-bg-channel-mismatch \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-mac-random-always \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-mac-random-never \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-mac-random-default \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-mac-random-missing \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/test_ca_cert.pem \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/test1_key_and_cert.pem \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-ibft \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-static-routes-legacy \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/route-test-static-routes-legacy \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-sit-ignore \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-routes \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/route-test-wired-static-routes \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-routes-legacy \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/route-test-wired-static-routes-legacy \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-psk-unquoted \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wpa-psk-unquoted2 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-802-1X-subj-matches \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-802-1x-ttls-eapgtc \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-8021x-peap-mschapv2 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-8021x-tls-agent \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-8021x-tls-always \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-auto-negotiate-on \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-autoip \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ctc-static \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-defroute-no \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-defroute-no-gatewaydev-yes \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-dhcp \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-dhcp-plus-ip \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-dhcp-send-hostname \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-dhcp6-only \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-dhcpv6-hostname-fallback \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-global-gateway \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-global-gateway-ignore \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv4-manual-1 \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv4-manual-2 \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv4-manual-3 \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv4-manual-4 \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv6-manual \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/route6-test-wired-ipv6-manual \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-no-prefix-8 \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-no-prefix-16 \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-no-prefix-24 \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv6-only \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep-passphrase \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wep-passphrase \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep-40-ascii \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wep-40-ascii \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep-104-ascii \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wep-104-ascii \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv6-only-1 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-never-default \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-obsolete-gateway-n \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-qeth-static \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ctc-static \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bridge-main \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bridge-component \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bridge-missing-stp \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-interface \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-only-vlanid \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-only-device \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-physdev \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-reorder-hdr-1 \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-reorder-hdr-2 \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-flags-1 \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-flags-2 \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep-no-keys \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-permissions \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep-agent-keys \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-dynamic-wep-leap \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-dynamic-wep-leap \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bond-eth-type \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bond-main \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bond-slave \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bond-slave-ib \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-bond-mode-numeric \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dcb \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dcb-default-app-priorities \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dcb-bad-booleans \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dcb-short-booleans \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dcb-bad-uints \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dcb-short-uints \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dcb-bad-percent \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dcb-short-percent \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dcb-pgpct-not-100 \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-fcoe-fabric \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-fcoe-vn2vn \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master-1 \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master-2 \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-master-invalid \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-port-1 \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-port-2 \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-team-port-empty-config \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-read-proxy-basic \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-trailing-spaces \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dns-options \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-wake-on-lan \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-auto-negotiate-on \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-shared-plus-ip \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-bootproto \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-no-prefix-16 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-no-prefix-24 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-no-prefix-8 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-routes \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-static-routes-legacy \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-unknown-ethtool-opt \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv6-only-1 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-wake-on-lan \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-1 \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-1.expected \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-2 \ -@@ -2159,32 +2158,34 @@ EXTRA_DIST += \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-3.expected \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-4 \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-write-unknown-4.expected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-System_test-bridge-component-a.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-System_test-bridge-component-b.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-System_test-wired-802-1X-subj-matches.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Bond_Main.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Bridge_Component.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Permissions.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Proxy_Basic.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Team_Port.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_VLAN_reorder_hdr.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_WiFi_Band_A.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_WiFi_Hidden.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_WiFi_MAC_always.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_WiFi_MAC_default.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_WiFi_MAC_missing.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_WiFi_MAC_never.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Wifi_LEAP.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Wifi_WEP_104_ASCII.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Wired_Auto-Negotiate.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Wired_Wake-on-LAN.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Vlan_test-vlan-interface.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-dcb-test.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-random_wifi_connection.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-random_wifi_connection_2.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-team-slave-enp31s0f1-142.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-static-routes-legacy.cexpected \ -- src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_User_1.cexpected -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-dynamic-wep-leap \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-leap \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wep \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wep-104-ascii \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wep-40-ascii \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wep-adhoc \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wep-eap-ttls-chap \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wep-passphrase \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-eap-tls \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-eap-ttls-tls \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-2 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-adhoc \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-hex \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-unquoted \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-unquoted2 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wired-8021x-peap-mschapv2 \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/network-test-wired-defroute-no-gatewaydev-yes \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/network-test-wired-global-gateway \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/network-test-wired-global-gateway-ignore \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/network-test-wired-never-default \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/route-test-static-routes-legacy \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/route-test-wired-static-routes \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/route-test-wired-static-routes-legacy \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/route6-test-wired-ipv6-manual \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/test1_key_and_cert.pem \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/test_ca_cert.pem \ -+ $(NULL) - - # make target dependencies can't have colons in their names, which ends up - # meaning that we can't add the alias files to EXTRA_DIST. They are instead --- -2.9.4 - - -From 20046c93062b14b0329cf151bc5e8a7f3c455531 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Thu, 25 May 2017 14:03:42 +0200 -Subject: [PATCH 4/5] ifcfg-rh/tests: add test for reading NETMASK property - -(cherry picked from commit ba05819c89d913ad1bc6b86e62c7704d173ef534) -(cherry picked from commit 7ebc132864776a1c0ce4a33660408a2953e076c8) ---- - Makefile.am | 1 + - shared/nm-utils/nm-test-utils.h | 9 +++++ - .../ifcfg-rh/tests/network-scripts/ifcfg-netmask-1 | 14 +++++++ - .../network-scripts/ifcfg-netmask-1.cexpected | 22 +++++++++++ - .../plugins/ifcfg-rh/tests/test-ifcfg-rh.c | 44 ++++++++++++++++++++++ - 5 files changed, 90 insertions(+) - create mode 100644 src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-netmask-1 - create mode 100644 src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-netmask-1.cexpected - -diff --git a/Makefile.am b/Makefile.am -index c543a21..50ef197 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -2025,6 +2025,7 @@ EXTRA_DIST += \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Test_Write_Wired_Wake-on-LAN.cexpected \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-Vlan_test-vlan-interface.cexpected \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-dcb-test.cexpected \ -+ src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-netmask-1 \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-random_wifi_connection.cexpected \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-random_wifi_connection_2.cexpected \ - src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-team-slave-enp31s0f1-142.cexpected \ -diff --git a/shared/nm-utils/nm-test-utils.h b/shared/nm-utils/nm-test-utils.h -index 0dfdfce..bc52113 100644 ---- a/shared/nm-utils/nm-test-utils.h -+++ b/shared/nm-utils/nm-test-utils.h -@@ -1183,6 +1183,15 @@ nmtst_file_get_contents (const char *filename) - return contents; - } - -+#define nmtst_file_set_contents(filename, content) \ -+ G_STMT_START { \ -+ GError *_error = NULL; \ -+ gboolean _success; \ -+ \ -+ _success = g_file_set_contents ((filename), (content), -1, &_error); \ -+ nmtst_assert_success (_success, _error); \ -+ } G_STMT_END -+ - /*****************************************************************************/ - - static inline void -diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-netmask-1 b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-netmask-1 -new file mode 100644 -index 0000000..ecb36c3 ---- /dev/null -+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-netmask-1 -@@ -0,0 +1,14 @@ -+DNS1="192.0.2.1" -+IPADDR="102.0.2.2" -+GATEWAY="192.0.2.1" -+NETMASK="255.254.0.0" -+BOOTPROTO="static" -+DEVICE="eth1" -+ONBOOT="yes" -+IPV6INIT="yes" -+ -+#bogus -+PREFIX1=25 -+NETMASK0=255.255.0.0 -+ -+#end -diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-netmask-1.cexpected b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-netmask-1.cexpected -new file mode 100644 -index 0000000..4c2294a ---- /dev/null -+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-netmask-1.cexpected -@@ -0,0 +1,22 @@ -+DNS1=192.0.2.1 -+IPADDR=102.0.2.2 -+GATEWAY=192.0.2.1 -+BOOTPROTO="static" -+DEVICE=eth1 -+ONBOOT=yes -+IPV6INIT=yes -+ -+#bogus -+ -+#end -+TYPE=Ethernet -+PROXY_METHOD=none -+BROWSER_ONLY=no -+PREFIX=15 -+DEFROUTE=yes -+IPV4_FAILURE_FATAL=no -+IPV6_AUTOCONF=yes -+IPV6_DEFROUTE=yes -+IPV6_FAILURE_FATAL=no -+NAME="System netmask-1" -+UUID=${UUID} -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 babb068..e30d2d7 100644 ---- a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c -+++ b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c -@@ -399,6 +399,48 @@ _writer_new_connection_fail (NMConnection *connection, - - /*****************************************************************************/ - -+static void -+test_read_netmask_1 (void) -+{ -+ nmtst_auto_unlinkfile char *testfile = NULL; -+ gs_unref_object NMConnection *connection = NULL; -+ gs_unref_object NMConnection *reread = NULL; -+ gs_free char *content = NULL; -+ NMSettingConnection *s_con; -+ NMSettingIPConfig *s_ip4; -+ NMIPAddress *ip4_addr; -+ const char *FILENAME = TEST_IFCFG_DIR "/network-scripts/ifcfg-netmask-1"; -+ -+ connection = _connection_from_file (FILENAME, NULL, TYPE_ETHERNET, NULL); -+ -+ s_con = nm_connection_get_setting_connection (connection); -+ g_assert (s_con); -+ g_assert_cmpstr (nm_setting_connection_get_id (s_con), ==, "System netmask-1"); -+ -+ s_ip4 = nm_connection_get_setting_ip4_config (connection); -+ g_assert (s_ip4); -+ g_assert_cmpuint (nm_setting_ip_config_get_num_dns (s_ip4), ==, 1); -+ ip4_addr = nm_setting_ip_config_get_address (s_ip4, 0); -+ g_assert (ip4_addr); -+ g_assert_cmpstr (nm_ip_address_get_address (ip4_addr), ==, "102.0.2.2"); -+ g_assert_cmpint (nm_ip_address_get_prefix (ip4_addr), ==, 15); -+ -+ nmtst_assert_connection_verifies_without_normalization (connection); -+ -+ content = nmtst_file_get_contents (FILENAME); -+ -+ testfile = g_strdup (TEST_SCRATCH_DIR "/network-scripts/ifcfg-netmask-1.copy"); -+ -+ nmtst_file_set_contents (testfile, content); -+ -+ _writer_update_connection (connection, -+ TEST_SCRATCH_DIR "/network-scripts/", -+ testfile, -+ TEST_IFCFG_DIR "/network-scripts/ifcfg-netmask-1.cexpected"); -+} -+ -+/*****************************************************************************/ -+ - static gboolean - verify_cert_or_key (NMSetting8021x *s_compare, - const char *file, -@@ -9348,6 +9390,8 @@ int main (int argc, char **argv) - nmtst_add_test_func (TPATH "read-static", test_read_wired_static, TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-static", "System test-wired-static", GINT_TO_POINTER (TRUE)); - nmtst_add_test_func (TPATH "read-static-bootproto", test_read_wired_static, TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-static-bootproto", "System test-wired-static-bootproto", GINT_TO_POINTER (FALSE)); - -+ g_test_add_func (TPATH "read-netmask-1", test_read_netmask_1); -+ - g_test_add_func (TPATH "read-dhcp", test_read_wired_dhcp); - g_test_add_func (TPATH "read-dhcp-plus-ip", test_read_wired_dhcp_plus_ip); - g_test_add_func (TPATH "read-shared-plus-ip", test_read_wired_shared_plus_ip); --- -2.9.4 - - -From 78895ad4d2fcc5fd3b2f845521ac14b9f6030fd6 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Thu, 25 May 2017 15:00:27 +0200 -Subject: [PATCH 5/5] ifcfg-rh: fix preserving NETMASK key in - write_ip4_setting() - -To support legacy scripts, we want to write out the NETMASK -key whenever the ifcfg file has a NETMASK key previously. -Note, that we anyway always write the relevant PREFIX key. -The NETMASK is redundant, only there to help legacy scripts. - -That was broken, because we would svUnsetValue("NETMASK") before -checking whether the NETMASK key is present. - -Also, when saving a connection to ifcfg-rh file that was created -by other tools, we might mix up the numbering. E.g. we never -write out IPADDR0. Hence, turn on legacy mode whenever the ifcfg-rh -file has any key starting with "NETMASK". - -(cherry picked from commit 844bf3d1a239f409d12ea437dbe866b66f5f1af4) -(cherry picked from commit 92a277dc6f08d66cf567b9bf6f1c32c513c7325e) ---- - .../plugins/ifcfg-rh/nms-ifcfg-rh-writer.c | 32 ++++++++++++---------- - .../network-scripts/ifcfg-netmask-1.cexpected | 1 + - 2 files changed, 18 insertions(+), 15 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 c66af01..d2b7ff6 100644 ---- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c -+++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c -@@ -2067,6 +2067,7 @@ write_ip4_setting (NMConnection *connection, shvarFile *ifcfg, GError **error) - int timeout; - GString *searches; - const char *method = NULL; -+ gboolean has_netmask; - - s_ip4 = nm_connection_get_setting_ip4_config (connection); - if (!s_ip4) { -@@ -2139,16 +2140,7 @@ write_ip4_setting (NMConnection *connection, shvarFile *ifcfg, GError **error) - else if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_SHARED)) - svSetValueStr (ifcfg, "BOOTPROTO", "shared"); - -- /* Clear out un-numbered IP address fields */ -- svUnsetValue (ifcfg, "IPADDR"); -- svUnsetValue (ifcfg, "PREFIX"); -- svUnsetValue (ifcfg, "NETMASK"); -- svUnsetValue (ifcfg, "GATEWAY"); -- /* Clear out zero-indexed IP address fields */ -- svUnsetValue (ifcfg, "IPADDR0"); -- svUnsetValue (ifcfg, "PREFIX0"); -- svUnsetValue (ifcfg, "NETMASK0"); -- svUnsetValue (ifcfg, "GATEWAY0"); -+ has_netmask = !!svFindFirstKeyWithPrefix (ifcfg, "NETMASK"); - - /* Write out IPADDR, PREFIX, GATEWAY for current IP addresses - * without labels. Unset obsolete NETMASK. -@@ -2192,20 +2184,30 @@ write_ip4_setting (NMConnection *connection, shvarFile *ifcfg, GError **error) - g_free (tmp); - - /* If the legacy "NETMASK" is present, keep it. */ -- if (svGetValue (ifcfg, netmask_key, &tmp)) { -+ if (has_netmask) { - char buf[INET_ADDRSTRLEN]; - -- g_free (tmp); - svSetValueStr (ifcfg, netmask_key, - nm_utils_inet4_ntop (nm_utils_ip4_prefix_to_netmask (prefix), buf)); -- } -+ } else -+ svUnsetValue (ifcfg, netmask_key); - - svUnsetValue (ifcfg, gw_key); - n++; - } - -- /* Clear remaining IPADDR, etc */ -- for (i = n; i < 256; i++) { -+ svUnsetValue (ifcfg, "IPADDR0"); -+ svUnsetValue (ifcfg, "PREFIX0"); -+ svUnsetValue (ifcfg, "NETMASK0"); -+ svUnsetValue (ifcfg, "GATEWAY0"); -+ if (n == 0) { -+ svUnsetValue (ifcfg, "IPADDR"); -+ svUnsetValue (ifcfg, "PREFIX"); -+ svUnsetValue (ifcfg, "NETMASK"); -+ i = 1; -+ } else -+ i = n; -+ for (; i < 256; i++) { - nm_sprintf_buf (addr_key, "IPADDR%u", i); - nm_sprintf_buf (prefix_key, "PREFIX%u", i); - nm_sprintf_buf (netmask_key, "NETMASK%u", i); -diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-netmask-1.cexpected b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-netmask-1.cexpected -index 4c2294a..5dfdce4 100644 ---- a/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-netmask-1.cexpected -+++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-netmask-1.cexpected -@@ -1,6 +1,7 @@ - DNS1=192.0.2.1 - IPADDR=102.0.2.2 - GATEWAY=192.0.2.1 -+NETMASK=255.254.0.0 - BOOTPROTO="static" - DEVICE=eth1 - ONBOOT=yes --- -2.9.4 - diff --git a/0016-tui-connect-crash-rh1456826.patch b/0016-tui-connect-crash-rh1456826.patch deleted file mode 100644 index 9568042..0000000 --- a/0016-tui-connect-crash-rh1456826.patch +++ /dev/null @@ -1,43 +0,0 @@ -From c710b2bf095e9301066d33a13e8a406f0d134b2f Mon Sep 17 00:00:00 2001 -From: Arnaud Lefebvre -Date: Tue, 30 May 2017 13:45:32 +0200 -Subject: [PATCH 1/1] nmtui connect: avoid segfault when iface is not found - -https://github.com/NetworkManager/NetworkManager/pull/21 -(cherry picked from commit 1fcbb69ae22ed4a6047e36c816f49b2a67a13583) -(cherry picked from commit cc36b9f6eb7870d02e0df7c26a7a980709b620fd) ---- - clients/tui/nmt-connect-connection-list.c | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/clients/tui/nmt-connect-connection-list.c b/clients/tui/nmt-connect-connection-list.c -index edfaa09..0011fc5 100644 ---- a/clients/tui/nmt-connect-connection-list.c -+++ b/clients/tui/nmt-connect-connection-list.c -@@ -621,6 +621,7 @@ nmt_connect_connection_list_get_connection (NmtConnectConnectionList *list, - NmtConnectDevice *nmtdev; - NmtConnectConnection *nmtconn = NULL; - NMConnection *conn = NULL; -+ const char *iface = NULL; - - g_return_val_if_fail (identifier, FALSE); - -@@ -643,9 +644,12 @@ nmt_connect_connection_list_get_connection (NmtConnectConnectionList *list, - goto found; - } - -- if (!conn && nmtdev->device && !strcmp (identifier, nm_device_get_ip_iface (nmtdev->device))) { -- nmtconn = nmtdev->conns->data; -- goto found; -+ if (!conn && nmtdev->device) { -+ iface = nm_device_get_ip_iface (nmtdev->device); -+ if (iface && !strcmp (identifier, iface)) { -+ nmtconn = nmtdev->conns->data; -+ goto found; -+ } - } - } - --- -2.9.4 - diff --git a/0017-libnm-fix-reject-vlan-id-4095-rh1456911.patch b/0017-libnm-fix-reject-vlan-id-4095-rh1456911.patch deleted file mode 100644 index baf5ced..0000000 --- a/0017-libnm-fix-reject-vlan-id-4095-rh1456911.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 2522c3be75c94d6285c6b514f404edea20f4807e Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Tue, 30 May 2017 18:12:23 +0200 -Subject: [PATCH 1/1] libnm: fix rejecting NMSettingVlan with id >= 4095 - -Without it, clients can wrongly create VLan settings with -ID 4095, which triggers assertions in NetworkManager. - -Fixes: 8715d61437060cacc68c156b1c8ed7bbce4b0a78 -(cherry picked from commit 159cd4836fb32f3a6ecefa6fc4dcc114892ce32a) -(cherry picked from commit 8db2ca661f739a301729bb2c63e5d00707a4f2c3) ---- - libnm-core/nm-setting-vlan.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libnm-core/nm-setting-vlan.c b/libnm-core/nm-setting-vlan.c -index de9c5c4..ab1c546 100644 ---- a/libnm-core/nm-setting-vlan.c -+++ b/libnm-core/nm-setting-vlan.c -@@ -670,6 +670,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) - _("the vlan id must be in range 0-4094 but is %u"), - priv->id); - g_prefix_error (error, "%s.%s: ", NM_SETTING_VLAN_SETTING_NAME, NM_SETTING_VLAN_ID); -+ return FALSE; - } - - if (priv->flags & ~NM_VLAN_FLAGS_ALL) { --- -2.9.4 - diff --git a/0018-periodic-connectivity-check-rh1458399.patch b/0018-periodic-connectivity-check-rh1458399.patch deleted file mode 100644 index ac3e26f..0000000 --- a/0018-periodic-connectivity-check-rh1458399.patch +++ /dev/null @@ -1,147 +0,0 @@ -From 2d4555ec97d2cb0829106cbff82753bd168e5a20 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Fri, 12 May 2017 09:37:42 +0200 -Subject: [PATCH 1/3] connectivity: avoid compiler warning for argument of - curl_easy_getinfo() - -libcurl employs some typechecking via "curl/typecheck-gcc.h". When -compling with --enable-lto, compilation fails otherwise with: - - make[2]: Entering directory '/data/src/NetworkManager' - CC src/src_libNetworkManager_la-nm-connectivity.lo - CCLD src/libNetworkManager.la - CCLD src/libNetworkManagerTest.la - CCLD src/dhcp/tests/test-dhcp-dhclient - src/nm-connectivity.c: In function 'curl_check_connectivity': - src/nm-connectivity.c:147:10: error: call to '_curl_easy_getinfo_err_string' declared with attribute warning: curl_easy_getinfo expects a pointer to char * for this info [-Werror] - eret = curl_easy_getinfo (msg->easy_handle, CURLINFO_PRIVATE, &cb_data); - ^ - lto1: all warnings being treated as errors - lto-wrapper: fatal error: /usr/bin/gcc returned 1 exit status - compilation terminated. - /usr/bin/ld: error: lto-wrapper failed - -(cherry picked from commit 7f8815a9c35c3b588b174c5e0c2568d3068726f6) -(cherry picked from commit 7f139c8ea87d0ceaa1f1d3601c846ace9054ffe5) ---- - src/nm-connectivity.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/nm-connectivity.c b/src/nm-connectivity.c -index 75bb7b6..0708d96 100644 ---- a/src/nm-connectivity.c -+++ b/src/nm-connectivity.c -@@ -144,7 +144,7 @@ curl_check_connectivity (CURLM *mhandle, CURLMcode ret) - continue; - - /* Here we have completed a session. Check easy session result. */ -- eret = curl_easy_getinfo (msg->easy_handle, CURLINFO_PRIVATE, &cb_data); -+ eret = curl_easy_getinfo (msg->easy_handle, CURLINFO_PRIVATE, (char **) &cb_data); - if (eret != CURLE_OK) { - _LOG2E ("curl cannot extract cb_data for easy handle %p, skipping msg", msg->easy_handle); - continue; --- -2.9.4 - - -From e94a36ce1c880c5a4f52ae59d18bb2b6d2bee704 Mon Sep 17 00:00:00 2001 -From: Francesco Giudici -Date: Wed, 3 May 2017 17:01:41 +0200 -Subject: [PATCH 2/3] connectivity: fix typo in error message - -(cherry picked from commit 7a2c31a54a7ee82b930b0d9ef21ea11f565c2859) -(cherry picked from commit 16187171709347611caf9b8e8c75988c15b66b12) ---- - src/nm-connectivity.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/nm-connectivity.c b/src/nm-connectivity.c -index 0708d96..b96737c 100644 ---- a/src/nm-connectivity.c -+++ b/src/nm-connectivity.c -@@ -498,7 +498,7 @@ nm_connectivity_init (NMConnectivity *self) - priv->curl_mhandle = curl_multi_init (); - - if (priv->curl_mhandle == NULL) { -- _LOGE ("cnable to init cURL, connectivity check will not work"); -+ _LOGE ("unable to init cURL, connectivity check will not work"); - return; - } - --- -2.9.4 - - -From fe45631585e93e15c552194cf4ffd82cbe513ee1 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Fri, 2 Jun 2017 19:11:11 +0200 -Subject: [PATCH 3/3] connectivity: fix scheduling periodic connectivity checks - -commit a955639 (connectivity: don't do periodic checks on interval=0) -broke scheduling connectivity checks. - -That is because the timer is on only scheduled if -nm_connectivity_check_enabled(), which in turn only returns TRUE -if curl_mhandle is set. However, nm_connectivity_init() would only -initialize curl_mhandle after update_config(), missing to schedule -the periodic task. - -https://mail.gnome.org/archives/networkmanager-list/2017-May/msg00076.html - -Fixes: a95563996f07641e9877eb1760cac24415b65070 -(cherry picked from commit f1eb1619f173a092c49dfcd1d53ec356827b6e0a) -(cherry picked from commit e984d9eb36f7838df58c0606bd00efc10730d329) ---- - src/nm-connectivity.c | 29 +++++++++++++++-------------- - 1 file changed, 15 insertions(+), 14 deletions(-) - -diff --git a/src/nm-connectivity.c b/src/nm-connectivity.c -index b96737c..6f16b28 100644 ---- a/src/nm-connectivity.c -+++ b/src/nm-connectivity.c -@@ -486,27 +486,28 @@ nm_connectivity_init (NMConnectivity *self) - NMConnectivityPrivate *priv = NM_CONNECTIVITY_GET_PRIVATE (self); - CURLcode retv; - -- priv->config = g_object_ref (nm_config_get ()); -- update_config (self, nm_config_get_data (priv->config)); -- g_signal_connect (G_OBJECT (priv->config), -- NM_CONFIG_SIGNAL_CONFIG_CHANGED, -- G_CALLBACK (config_changed_cb), -- self); -- - retv = curl_global_init (CURL_GLOBAL_ALL); - if (retv == CURLE_OK) - priv->curl_mhandle = curl_multi_init (); - -- if (priv->curl_mhandle == NULL) { -+ if (!priv->curl_mhandle) - _LOGE ("unable to init cURL, connectivity check will not work"); -- return; -+ else { -+ curl_multi_setopt (priv->curl_mhandle, CURLMOPT_SOCKETFUNCTION, multi_socket_cb); -+ curl_multi_setopt (priv->curl_mhandle, CURLMOPT_SOCKETDATA, self); -+ curl_multi_setopt (priv->curl_mhandle, CURLMOPT_TIMERFUNCTION, multi_timer_cb); -+ curl_multi_setopt (priv->curl_mhandle, CURLMOPT_TIMERDATA, self); -+ curl_multi_setopt (priv->curl_mhandle, CURLOPT_VERBOSE, 1); - } - -- curl_multi_setopt (priv->curl_mhandle, CURLMOPT_SOCKETFUNCTION, multi_socket_cb); -- curl_multi_setopt (priv->curl_mhandle, CURLMOPT_SOCKETDATA, self); -- curl_multi_setopt (priv->curl_mhandle, CURLMOPT_TIMERFUNCTION, multi_timer_cb); -- curl_multi_setopt (priv->curl_mhandle, CURLMOPT_TIMERDATA, self); -- curl_multi_setopt (priv->curl_mhandle, CURLOPT_VERBOSE, 1); -+ priv->config = g_object_ref (nm_config_get ()); -+ -+ update_config (self, nm_config_get_data (priv->config)); -+ g_signal_connect (G_OBJECT (priv->config), -+ NM_CONFIG_SIGNAL_CONFIG_CHANGED, -+ G_CALLBACK (config_changed_cb), -+ self); -+ - } - - static void --- -2.9.4 - diff --git a/0019-bond-improve-option-matching-rh1457909.patch b/0019-bond-improve-option-matching-rh1457909.patch deleted file mode 100644 index 04cda39..0000000 --- a/0019-bond-improve-option-matching-rh1457909.patch +++ /dev/null @@ -1,252 +0,0 @@ -From 8c6f8c65955d18ca9b43ad2bcd1bccf2cd85e7ed Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Mon, 5 Jun 2017 13:51:18 +0200 -Subject: [PATCH 1/2] libnm-core: remove unsupported bond options during - normalization - -In an ideal world, we should not validate connections containing -options not valid for the current bond mode. However adding such -restriction now means that during an upgrade to the new NM version -some connections that were valid before become invalid, possibly -disrupting connectivity. - -Instead, consider invalid options as a normalizable error and remove -them during normalization. - -Converting the setting to a "canonical" form without invalid options -is important for the connection matching logic, where such invalid -options can cause false mismatches. - -(cherry picked from commit f25e008e2fe655bbddbb8a66612a9d141e982049) -(cherry picked from commit ac7a5c074c72310d8328fb448824d29bbec932f3) ---- - libnm-core/nm-connection.c | 31 +++++++++++++++++++++++ - libnm-core/nm-setting-bond.c | 18 +++++++++++++ - libnm-core/tests/test-setting-bond.c | 49 ++++++++++++++++++++++++++++++++++++ - 3 files changed, 98 insertions(+) - -diff --git a/libnm-core/nm-connection.c b/libnm-core/nm-connection.c -index ecfb978..c1b7506 100644 ---- a/libnm-core/nm-connection.c -+++ b/libnm-core/nm-connection.c -@@ -913,6 +913,36 @@ _normalize_bond_mode (NMConnection *self, GHashTable *parameters) - } - - static gboolean -+_normalize_bond_options (NMConnection *self, GHashTable *parameters) -+{ -+ NMSettingBond *s_bond = nm_connection_get_setting_bond (self); -+ gboolean changed = FALSE; -+ const char *name, *mode_str; -+ NMBondMode mode; -+ guint32 num, i; -+ -+ /* Strip away unsupported options for current mode */ -+ if (s_bond) { -+ mode_str = nm_setting_bond_get_option_by_name (s_bond, NM_SETTING_BOND_OPTION_MODE); -+ mode = _nm_setting_bond_mode_from_string (mode_str); -+ if (mode == NM_BOND_MODE_UNKNOWN) -+ return FALSE; -+again: -+ num = nm_setting_bond_get_num_options (s_bond); -+ for (i = 0; i < num; i++) { -+ if ( nm_setting_bond_get_option (s_bond, i, &name, NULL) -+ && !_nm_setting_bond_option_supported (name, mode)) { -+ nm_setting_bond_remove_option (s_bond, name); -+ changed = TRUE; -+ goto again; -+ } -+ } -+ } -+ -+ return changed; -+} -+ -+static gboolean - _normalize_wireless_mac_address_randomization (NMConnection *self, GHashTable *parameters) - { - NMSettingWireless *s_wifi = nm_connection_get_setting_wireless (self); -@@ -1275,6 +1305,7 @@ nm_connection_normalize (NMConnection *connection, - was_modified |= _normalize_ethernet_link_neg (connection); - was_modified |= _normalize_infiniband_mtu (connection, parameters); - was_modified |= _normalize_bond_mode (connection, parameters); -+ was_modified |= _normalize_bond_options (connection, parameters); - was_modified |= _normalize_wireless_mac_address_randomization (connection, parameters); - was_modified |= _normalize_team_config (connection, parameters); - was_modified |= _normalize_team_port_config (connection, parameters); -diff --git a/libnm-core/nm-setting-bond.c b/libnm-core/nm-setting-bond.c -index 9a8bdc3..b62964c 100644 ---- a/libnm-core/nm-setting-bond.c -+++ b/libnm-core/nm-setting-bond.c -@@ -542,6 +542,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) - const char *arp_ip_target = NULL; - const char *lacp_rate; - const char *primary; -+ NMBondMode bond_mode; - - g_hash_table_iter_init (&iter, priv->options); - while (g_hash_table_iter_next (&iter, (gpointer) &key, (gpointer) &value)) { -@@ -776,6 +777,23 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) - return NM_SETTING_VERIFY_NORMALIZABLE; - } - -+ /* normalize unsupported options for the current mode */ -+ bond_mode = _nm_setting_bond_mode_from_string (mode_new); -+ g_hash_table_iter_init (&iter, priv->options); -+ while (g_hash_table_iter_next (&iter, (gpointer) &key, NULL)) { -+ if (nm_streq (key, "mode")) -+ continue; -+ if (!_nm_setting_bond_option_supported (key, bond_mode)) { -+ g_set_error (error, -+ NM_CONNECTION_ERROR, -+ NM_CONNECTION_ERROR_INVALID_PROPERTY, -+ _("'%s' option is not valid with mode '%s'"), -+ key, mode_new); -+ g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS); -+ return NM_SETTING_VERIFY_NORMALIZABLE; -+ } -+ } -+ - return TRUE; - } - -diff --git a/libnm-core/tests/test-setting-bond.c b/libnm-core/tests/test-setting-bond.c -index 91a8199..e6a65bb 100644 ---- a/libnm-core/tests/test-setting-bond.c -+++ b/libnm-core/tests/test-setting-bond.c -@@ -182,6 +182,54 @@ test_compare (void) - ((const char *[]){ "num_unsol_na", "4", "num_grat_arp", "4", NULL })); - } - -+static void -+test_normalize_options (const char **opts1, const char **opts2) -+{ -+ gs_unref_object NMConnection *con = NULL; -+ NMSettingBond *s_bond; -+ GError *error = NULL; -+ gboolean success; -+ const char **p; -+ int num = 0; -+ -+ create_bond_connection (&con, &s_bond); -+ -+ for (p = opts1; p[0] && p[1]; p += 2) -+ g_assert (nm_setting_bond_add_option (s_bond, p[0], p[1])); -+ -+ nmtst_assert_connection_verifies_and_normalizable (con); -+ nmtst_connection_normalize (con); -+ success = nm_setting_verify ((NMSetting *) s_bond, con, &error); -+ nmtst_assert_success (success, error); -+ -+ for (p = opts2; p[0] && p[1]; p += 2) { -+ g_assert_cmpstr (nm_setting_bond_get_option_by_name (s_bond, p[0]), ==, p[1]); -+ num++; -+ } -+ -+ g_assert_cmpint (num, ==, nm_setting_bond_get_num_options (s_bond)); -+} -+ -+static void -+test_normalize (void) -+{ -+ test_normalize_options ( -+ ((const char *[]){ "mode", "802.3ad", "ad_actor_system", "00:02:03:04:05:06", NULL }), -+ ((const char *[]){ "mode", "802.3ad", "ad_actor_system", "00:02:03:04:05:06", NULL })); -+ test_normalize_options ( -+ ((const char *[]){ "mode", "1", "miimon", "1", NULL }), -+ ((const char *[]){ "mode", "active-backup", "miimon", "1", NULL })); -+ test_normalize_options ( -+ ((const char *[]){ "mode", "balance-alb", "tlb_dynamic_lb", "1", NULL }), -+ ((const char *[]){ "mode", "balance-alb", NULL })); -+ test_normalize_options ( -+ ((const char *[]){ "mode", "balance-tlb", "tlb_dynamic_lb", "1", NULL }), -+ ((const char *[]){ "mode", "balance-tlb", "tlb_dynamic_lb", "1", NULL })); -+ test_normalize_options ( -+ ((const char *[]){ "mode", "balance-rr", "ad_actor_sys_prio", "4", "packets_per_slave", "3", NULL }), -+ ((const char *[]){ "mode", "balance-rr", "packets_per_slave", "3", NULL })); -+} -+ - #define TPATH "/libnm/settings/bond/" - - NMTST_DEFINE (); -@@ -193,6 +241,7 @@ main (int argc, char **argv) - - g_test_add_func (TPATH "verify", test_verify); - g_test_add_func (TPATH "compare", test_compare); -+ g_test_add_func (TPATH "normalize", test_normalize); - - return g_test_run (); - } --- -2.9.3 - -From 0d96d249ffe95e0232b8247e6bb9c1385a2b4940 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Mon, 5 Jun 2017 14:48:08 +0200 -Subject: [PATCH 2/2] bond: add only supported options to the generated - connection - -Upstream commit [1] changed in the kernel the default value of -tlb_dynamic_lb bond from 1 to 0 when the mode is not tlb. This is not -wrong, as the option value doesn't really matter for other modes, but -it breaks the connection matching because we read back a 0 value when -we expect a default of 1. - -Fix this in a generic way by ignoring altogether options that are not -relevant for the current bond mode, because they are removed from the -connection during normalization. - -[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8b426dc54cf4056984bab7dfa48c92ee79a46434 - -https://bugzilla.redhat.com/show_bug.cgi?id=1457909 -(cherry picked from commit 056a973a4fdb68abe8bc7bfc5f31250345d71f21) -(cherry picked from commit 61817661c899844ddb364ebd529716f574146588) ---- - src/devices/nm-device-bond.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/src/devices/nm-device-bond.c b/src/devices/nm-device-bond.c -index 3325c94..c8748fe 100644 ---- a/src/devices/nm-device-bond.c -+++ b/src/devices/nm-device-bond.c -@@ -155,6 +155,7 @@ update_connection (NMDevice *device, NMConnection *connection) - { - NMSettingBond *s_bond = nm_connection_get_setting_bond (connection); - int ifindex = nm_device_get_ifindex (device); -+ NMBondMode mode = NM_BOND_MODE_UNKNOWN; - const char **options; - - if (!s_bond) { -@@ -164,7 +165,7 @@ update_connection (NMDevice *device, NMConnection *connection) - - /* Read bond options from sysfs and update the Bond setting to match */ - options = nm_setting_bond_get_valid_options (s_bond); -- while (options && *options) { -+ for (; *options; options++) { - gs_free char *value = nm_platform_sysctl_master_get_option (nm_device_get_platform (device), ifindex, *options); - const char *defvalue = nm_setting_bond_get_option_default (s_bond, *options); - char *p; -@@ -176,6 +177,12 @@ update_connection (NMDevice *device, NMConnection *connection) - *p = '\0'; - } - -+ if (nm_streq (*options, NM_SETTING_BOND_OPTION_MODE)) -+ mode = _nm_setting_bond_mode_from_string (value); -+ -+ if (!_nm_setting_bond_option_supported (*options, mode)) -+ continue; -+ - if ( value - && value[0] - && !ignore_if_zero (*options, value) -@@ -190,7 +197,6 @@ update_connection (NMDevice *device, NMConnection *connection) - - nm_setting_bond_add_option (s_bond, *options, value); - } -- options++; - } - } - --- -2.9.3 - diff --git a/0020-device-fix-external-assume-rh1457242.patch b/0020-device-fix-external-assume-rh1457242.patch deleted file mode 100644 index 6e06e89..0000000 --- a/0020-device-fix-external-assume-rh1457242.patch +++ /dev/null @@ -1,43 +0,0 @@ -From b905393348574d8a363fe3fac4afb2fe6b03cfc0 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Thu, 1 Jun 2017 22:04:26 +0200 -Subject: [PATCH 1/1] device: mark device as sys-iface-state=external when - assuming connection - -Since commit 74dac5f (nm-manager: try assuming connections on managed devices), -and commit f4226e7 (manager: avoid generating in memory connections -during startup for managed devices), recheck_assume_connection() also -assumes connections on devices that are currently not in sys-iface-state -"external". - -That is correct, as also for fully managed devices (which are currently -in disconnected state), we want to assume external connections. However, -when doing that, we must reset the sys-iface-state to external. - -https://bugzilla.redhat.com/show_bug.cgi?id=1457242 -(cherry picked from commit 02e7476e9fd0f4248009ce8eaa7870ba05e2504e) -(cherry picked from commit fcbcd1aa870ec5aa74c5c570ea08ffc52cffa63e) ---- - src/nm-manager.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/src/nm-manager.c b/src/nm-manager.c -index 3d94ce9..283ceda 100644 ---- a/src/nm-manager.c -+++ b/src/nm-manager.c -@@ -1884,8 +1884,10 @@ recheck_assume_connection (NMManager *self, - _LOGD (LOGD_DEVICE, "(%s): will attempt to assume connection", - nm_device_get_iface (device)); - -- if (!generated) -- nm_device_sys_iface_state_set (device, NM_DEVICE_SYS_IFACE_STATE_ASSUME); -+ nm_device_sys_iface_state_set (device, -+ generated -+ ? NM_DEVICE_SYS_IFACE_STATE_EXTERNAL -+ : NM_DEVICE_SYS_IFACE_STATE_ASSUME); - - /* Move device to DISCONNECTED to activate the connection */ - if (state == NM_DEVICE_STATE_UNMANAGED) { --- -2.9.4 - diff --git a/0021-bond-crash-mode-rh1459580.patch b/0021-bond-crash-mode-rh1459580.patch deleted file mode 100644 index 513b970..0000000 --- a/0021-bond-crash-mode-rh1459580.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 27b3757b5beecc9fcd98ce3a1acbc50431c204cb Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Wed, 7 Jun 2017 18:51:41 +0200 -Subject: [PATCH 1/1] bond: check for NULL bond mode value in - update_connection() - -Don't crash if the bond mode can't be read from sysfs - for example -when the interface disappears. The generated connection will be bogus, -but at that point it doesn't matter because the in-memory connection -will be destroyed. - -Fixes: 056a973a4fdb68abe8bc7bfc5f31250345d71f21 - -https://bugzilla.redhat.com/show_bug.cgi?id=1459580 -(cherry picked from commit 5600a27c2aa1a69c1c72422937bfd4401217046e) -(cherry picked from commit a3a792dd2253085933ca03e3cb61c37a44a6d304) ---- - src/devices/nm-device-bond.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/devices/nm-device-bond.c b/src/devices/nm-device-bond.c -index c8748fe..451a4f0 100644 ---- a/src/devices/nm-device-bond.c -+++ b/src/devices/nm-device-bond.c -@@ -177,7 +177,7 @@ update_connection (NMDevice *device, NMConnection *connection) - *p = '\0'; - } - -- if (nm_streq (*options, NM_SETTING_BOND_OPTION_MODE)) -+ if (value && nm_streq (*options, NM_SETTING_BOND_OPTION_MODE)) - mode = _nm_setting_bond_mode_from_string (value); - - if (!_nm_setting_bond_option_supported (*options, mode)) --- -2.9.4 - diff --git a/0022-connectivity-ip-iface-check-rh1459932.patch b/0022-connectivity-ip-iface-check-rh1459932.patch deleted file mode 100644 index c959c89..0000000 --- a/0022-connectivity-ip-iface-check-rh1459932.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 1e8d7050a7d115faf78c1a7531195358c9919bf0 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Thu, 8 Jun 2017 00:23:05 +0200 -Subject: [PATCH 1/1] device: check connectivity on the IP interface - -curl must bind to the interface that has IP configuration, not the -underlying device. Without this commit, connectivity check fails on -certain connection types (PPPoE, WWAN). - -Fixes: 9d43869e473b47542520c807dace93a6f9520964 -(cherry picked from commit c66995ad4ddbe44cbbb4d4d56a48420be6d483cf) -(cherry picked from commit dc1c8c22cc8034fe4c257d43b3c31196e9899326) ---- - 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 f5eb71d..a804771 100644 ---- a/src/devices/nm-device.c -+++ b/src/devices/nm-device.c -@@ -1858,7 +1858,7 @@ nm_device_check_connectivity (NMDevice *self, - - /* Kick off a real connectivity check. */ - nm_connectivity_check_async (nm_connectivity_get (), -- nm_device_get_iface (self), -+ nm_device_get_ip_iface (self), - concheck_cb, - data); - return; --- -2.9.4 - diff --git a/0023-persist-nm-owned-in-device-state-rh1376199.patch b/0023-persist-nm-owned-in-device-state-rh1376199.patch deleted file mode 100644 index e5720e6..0000000 --- a/0023-persist-nm-owned-in-device-state-rh1376199.patch +++ /dev/null @@ -1,510 +0,0 @@ -From ffa247f2a2a70e9484ddb46c8dc66a1a7183ef55 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Wed, 31 May 2017 16:42:05 +0200 -Subject: [PATCH 1/5] device: rename priv->is_nm_owned to priv->nm_owned - -Only a matter of taste, but nm_device_get_is_nm_owned() sounds -strange. - -(cherry picked from commit 8cce037bf8078b7dbb8e3abc45f84ae6f7e9299c) -(cherry picked from commit 84273a35162aaef50c9b9a4f1b565326989d370a) ---- - src/devices/nm-device.c | 14 +++++++------- - src/devices/nm-device.h | 2 +- - src/nm-manager.c | 2 +- - 3 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c -index f5eb71d..746117d 100644 ---- a/src/devices/nm-device.c -+++ b/src/devices/nm-device.c -@@ -262,7 +262,7 @@ typedef struct _NMDevicePrivate { - - NMUtilsStableType current_stable_id_type:3; - -- bool is_nm_owned:1; /* whether the device is a device owned and created by NM */ -+ bool nm_owned:1; /* whether the device is a device owned and created by NM */ - - GHashTable * available_connections; - char * hw_addr; -@@ -2069,7 +2069,7 @@ nm_device_master_release_one_slave (NMDevice *self, NMDevice *slave, gboolean co - static gboolean - can_unmanaged_external_down (NMDevice *self) - { -- return !NM_DEVICE_GET_PRIVATE (self)->is_nm_owned -+ return !NM_DEVICE_GET_PRIVATE (self)->nm_owned - && nm_device_is_software (self); - } - -@@ -2809,9 +2809,9 @@ nm_device_create_and_realize (NMDevice *self, - const NMPlatformLink *plink = NULL; - - /* Must be set before device is realized */ -- priv->is_nm_owned = !nm_platform_link_get_by_ifname (nm_device_get_platform (self), priv->iface); -+ priv->nm_owned = !nm_platform_link_get_by_ifname (nm_device_get_platform (self), priv->iface); - -- _LOGD (LOGD_DEVICE, "create (is %snm-owned)", priv->is_nm_owned ? "" : "not "); -+ _LOGD (LOGD_DEVICE, "create (is %snm-owned)", priv->nm_owned ? "" : "not "); - - /* Create any resources the device needs */ - if (NM_DEVICE_GET_CLASS (self)->create_and_realize) { -@@ -8682,9 +8682,9 @@ _update_ip4_address (NMDevice *self) - } - - gboolean --nm_device_get_is_nm_owned (NMDevice *self) -+nm_device_is_nm_owned (NMDevice *self) - { -- return NM_DEVICE_GET_PRIVATE (self)->is_nm_owned; -+ return NM_DEVICE_GET_PRIVATE (self)->nm_owned; - } - - /* -@@ -8745,7 +8745,7 @@ delete_on_deactivate_check_and_schedule (NMDevice *self, int ifindex) - - if (ifindex <= 0) - return; -- if (!priv->is_nm_owned) -+ if (!priv->nm_owned) - return; - if (priv->queued_act_request) - return; -diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h -index 5e6abb4..27f5018 100644 ---- a/src/devices/nm-device.h -+++ b/src/devices/nm-device.h -@@ -605,7 +605,7 @@ void nm_device_set_unmanaged_by_user_settings (NMDevice *self); - void nm_device_set_unmanaged_by_user_udev (NMDevice *self); - void nm_device_set_unmanaged_by_quitting (NMDevice *device); - --gboolean nm_device_get_is_nm_owned (NMDevice *device); -+gboolean nm_device_is_nm_owned (NMDevice *device); - - gboolean nm_device_has_capability (NMDevice *self, NMDeviceCapabilities caps); - -diff --git a/src/nm-manager.c b/src/nm-manager.c -index 283ceda..56852f6 100644 ---- a/src/nm-manager.c -+++ b/src/nm-manager.c -@@ -1858,7 +1858,7 @@ recheck_assume_connection (NMManager *self, - g_return_val_if_fail (NM_IS_MANAGER (self), FALSE); - g_return_val_if_fail (NM_IS_DEVICE (device), FALSE); - -- if (nm_device_get_is_nm_owned (device)) -+ if (nm_device_is_nm_owned (device)) - return FALSE; - - if (!nm_device_get_managed (device, FALSE)) --- -2.9.4 - - -From 1ee731fc9890001fe5f6ac4884c9f5b8bf047024 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Tue, 30 May 2017 13:36:56 +0200 -Subject: [PATCH 2/5] config: allow persisting the device nm-owned state - -(cherry picked from commit 3fbbbb62f0b18a1efdc25ee0c01625ae8da65826) -(cherry picked from commit a42f3b92b7ef922c491c07a8ab0f24b1cf12b223) ---- - src/nm-config.c | 28 +++++++++++++++++++++++++--- - src/nm-config.h | 7 ++++++- - src/nm-manager.c | 3 ++- - 3 files changed, 33 insertions(+), 5 deletions(-) - -diff --git a/src/nm-config.c b/src/nm-config.c -index 54ccf9a..91c21de 100644 ---- a/src/nm-config.c -+++ b/src/nm-config.c -@@ -1872,6 +1872,7 @@ _nm_config_state_set (NMConfig *self, - #define DEVICE_RUN_STATE_KEYFILE_KEY_DEVICE_MANAGED "managed" - #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" -+#define DEVICE_RUN_STATE_KEYFILE_KEY_DEVICE_NM_OWNED "nm-owned" - - NM_UTILS_LOOKUP_STR_DEFINE_STATIC (_device_state_managed_type_to_str, NMConfigDeviceStateManagedType, - NM_UTILS_LOOKUP_DEFAULT_NM_ASSERT ("unknown"), -@@ -1889,6 +1890,7 @@ _config_device_state_data_new (int ifindex, GKeyFile *kf) - gs_free char *perm_hw_addr_fake = NULL; - gsize connection_uuid_len; - gsize perm_hw_addr_fake_len; -+ gint nm_owned = -1; - char *p; - - nm_assert (ifindex > 0); -@@ -1924,6 +1926,11 @@ _config_device_state_data_new (int ifindex, GKeyFile *kf) - g_free (perm_hw_addr_fake); - perm_hw_addr_fake = normalized; - } -+ -+ nm_owned = nm_config_keyfile_get_boolean (kf, -+ DEVICE_RUN_STATE_KEYFILE_GROUP_DEVICE, -+ DEVICE_RUN_STATE_KEYFILE_KEY_DEVICE_NM_OWNED, -+ -1); - } - - connection_uuid_len = connection_uuid ? strlen (connection_uuid) + 1 : 0; -@@ -1937,6 +1944,7 @@ _config_device_state_data_new (int ifindex, GKeyFile *kf) - device_state->managed = managed_type; - device_state->connection_uuid = NULL; - device_state->perm_hw_addr_fake = NULL; -+ device_state->nm_owned = nm_owned; - - p = (char *) (&device_state[1]); - if (connection_uuid) { -@@ -1966,6 +1974,7 @@ nm_config_device_state_load (int ifindex) - NMConfigDeviceStateData *device_state; - char path[NM_STRLEN (NM_CONFIG_DEVICE_STATE_DIR) + 60]; - gs_unref_keyfile GKeyFile *kf = NULL; -+ const char *nm_owned_str; - - g_return_val_if_fail (ifindex > 0, NULL); - -@@ -1976,13 +1985,18 @@ nm_config_device_state_load (int ifindex) - g_clear_pointer (&kf, g_key_file_unref); - - device_state = _config_device_state_data_new (ifindex, kf); -+ nm_owned_str = device_state->nm_owned == TRUE ? -+ ", nm-owned=1" : -+ (device_state->nm_owned == FALSE ? ", nm-owned=0" : ""); -+ - -- _LOGT ("device-state: %s #%d (%s); managed=%s%s%s%s%s%s%s", -+ _LOGT ("device-state: %s #%d (%s); managed=%s%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, "", "")); -+ NM_PRINT_FMT_QUOTED (device_state->perm_hw_addr_fake, ", perm-hw-addr-fake=", device_state->perm_hw_addr_fake, "", ""), -+ nm_owned_str); - - return device_state; - } -@@ -1991,7 +2005,8 @@ gboolean - nm_config_device_state_write (int ifindex, - NMConfigDeviceStateManagedType managed, - const char *perm_hw_addr_fake, -- const char *connection_uuid) -+ const char *connection_uuid, -+ gint nm_owned) - { - char path[NM_STRLEN (NM_CONFIG_DEVICE_STATE_DIR) + 60]; - GError *local = NULL; -@@ -2026,6 +2041,13 @@ nm_config_device_state_write (int ifindex, - DEVICE_RUN_STATE_KEYFILE_KEY_DEVICE_CONNECTION_UUID, - connection_uuid); - } -+ if (nm_owned >= 0) { -+ g_key_file_set_boolean (kf, -+ DEVICE_RUN_STATE_KEYFILE_GROUP_DEVICE, -+ DEVICE_RUN_STATE_KEYFILE_KEY_DEVICE_NM_OWNED, -+ nm_owned); -+ } -+ - - if (!g_key_file_save_to_file (kf, path, &local)) { - _LOGW ("device-state: write #%d (%s) failed: %s", ifindex, path, local->message); -diff --git a/src/nm-config.h b/src/nm-config.h -index ae695fc..c5ff7c6 100644 ---- a/src/nm-config.h -+++ b/src/nm-config.h -@@ -205,13 +205,18 @@ struct _NMConfigDeviceStateData { - const char *connection_uuid; - - const char *perm_hw_addr_fake; -+ -+ /* whether the device was nm-owned (0/1) or -1 for -+ * non-software devices. */ -+ gint nm_owned; - }; - - NMConfigDeviceStateData *nm_config_device_state_load (int ifindex); - gboolean nm_config_device_state_write (int ifindex, - NMConfigDeviceStateManagedType managed, - const char *perm_hw_addr_fake, -- const char *connection_uuid); -+ const char *connection_uuid, -+ gint nm_owned); - void nm_config_device_state_prune_unseen (GHashTable *seen_ifindexes); - - /*****************************************************************************/ -diff --git a/src/nm-manager.c b/src/nm-manager.c -index 56852f6..dc52115 100644 ---- a/src/nm-manager.c -+++ b/src/nm-manager.c -@@ -5048,7 +5048,8 @@ nm_manager_write_device_state (NMManager *self) - if (nm_config_device_state_write (ifindex, - managed_type, - perm_hw_addr_fake, -- uuid)) -+ uuid, -+ -1)) - g_hash_table_add (seen_ifindexes, GINT_TO_POINTER (ifindex)); - } - --- -2.9.4 - - -From cf3d67882676ccba5089fd523ccf6337f66e6c3f Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Wed, 31 May 2017 16:58:21 +0200 -Subject: [PATCH 3/5] manager: restore the previous persistent nm-owned state - of devices - -After a daemon restart, any software device is considered !nm-owned, -even if it was created by NM. Therefore, a device stays around even if -the connection which created it gets deactivated or deleted. - -Fix this by remembering the previous nm-owned state in the device -state file. - -https://bugzilla.redhat.com/show_bug.cgi?id=1376199 -(cherry picked from commit cf9ba271e664ffd93f6ba6294ebc5f7e341a9a78) -(cherry picked from commit 333ed6ee2a30b0d40a2ac0d59e3fd2e9aaf3bf00) ---- - src/devices/nm-device.c | 13 +++++++++++++ - src/nm-manager.c | 5 ++++- - 2 files changed, 17 insertions(+), 1 deletion(-) - -diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c -index 746117d..fe6e955 100644 ---- a/src/devices/nm-device.c -+++ b/src/devices/nm-device.c -@@ -3011,6 +3011,19 @@ realize_start_setup (NMDevice *self, - - _add_capabilities (self, capabilities); - -+ /* Update nm-owned flag according to state file */ -+ if ( !priv->nm_owned -+ && priv->ifindex > 0 -+ && nm_device_is_software (self)) { -+ gs_free NMConfigDeviceStateData *dev_state = NULL; -+ -+ dev_state = nm_config_device_state_load (priv->ifindex); -+ if (dev_state && dev_state->nm_owned == TRUE) { -+ priv->nm_owned = TRUE; -+ _LOGD (LOGD_DEVICE, "set nm-owned from state file"); -+ } -+ } -+ - if (!priv->udi) { - /* Use a placeholder UDI until we get a real one */ - priv->udi = g_strdup_printf ("/virtual/device/placeholder/%d", id++); -diff --git a/src/nm-manager.c b/src/nm-manager.c -index dc52115..97752c4 100644 ---- a/src/nm-manager.c -+++ b/src/nm-manager.c -@@ -5006,6 +5006,7 @@ nm_manager_write_device_state (NMManager *self) - const GSList *devices; - NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); - gs_unref_hashtable GHashTable *seen_ifindexes = NULL; -+ gint nm_owned; - - seen_ifindexes = g_hash_table_new (NULL, NULL); - -@@ -5045,11 +5046,13 @@ nm_manager_write_device_state (NMManager *self) - if (perm_hw_addr_fake && !perm_hw_addr_is_fake) - perm_hw_addr_fake = NULL; - -+ nm_owned = nm_device_is_software (device) ? nm_device_is_nm_owned (device) : -1; -+ - if (nm_config_device_state_write (ifindex, - managed_type, - perm_hw_addr_fake, - uuid, -- -1)) -+ nm_owned)) - g_hash_table_add (seen_ifindexes, GINT_TO_POINTER (ifindex)); - } - --- -2.9.4 - - -From 02b5487b3d3827b3ba6fcda7234f3f7a1976b2d4 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Wed, 7 Jun 2017 22:11:50 +0200 -Subject: [PATCH 4/5] device: only set nm-owned from statefile during initial - setup - -The state file should only be read initially when NM starts, that is: -during NMManager's platform_query_devices(). - -At all later points, for example when a software device gets destroyed -and re-realized, the state file is clearly no longer relevant. - -Hence, pass the set-nm-owned flag from NMManager to realize_start_setup(). - -This is very much the same as with the NM_UNMANAGED_FLAG_USER_EXPLICT flag, -which we also read from the state-file. - -(cherry picked from commit d83848be9dfd0edb5f318b81854b371133d84f6e) -(cherry picked from commit 8e25de8ab360fc973d7222685f107b81dd872dc1) ---- - src/devices/nm-device.c | 22 +++++++++++----------- - src/devices/nm-device.h | 1 + - src/nm-manager.c | 3 +++ - 3 files changed, 15 insertions(+), 11 deletions(-) - -diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c -index fe6e955..1aea8cb 100644 ---- a/src/devices/nm-device.c -+++ b/src/devices/nm-device.c -@@ -527,6 +527,7 @@ static gboolean dhcp6_start (NMDevice *self, gboolean wait_for_ll); - static void nm_device_start_ip_check (NMDevice *self); - static void realize_start_setup (NMDevice *self, - const NMPlatformLink *plink, -+ gboolean set_nm_owned, - NMUnmanFlagOp unmanaged_user_explicit); - static void _commit_mtu (NMDevice *self, const NMIP4Config *config); - static void dhcp_schedule_restart (NMDevice *self, int family, const char *reason); -@@ -2740,6 +2741,7 @@ link_type_compatible (NMDevice *self, - * nm_device_realize_start(): - * @self: the #NMDevice - * @plink: an existing platform link or %NULL -+ * @set_nm_owned: for software device, if TRUE set nm-owned. - * @unmanaged_user_explicit: the user-explicit unmanaged flag to apply - * on the device initially. - * @out_compatible: %TRUE on return if @self is compatible with @plink -@@ -2757,6 +2759,7 @@ link_type_compatible (NMDevice *self, - gboolean - nm_device_realize_start (NMDevice *self, - const NMPlatformLink *plink, -+ gboolean set_nm_owned, - NMUnmanFlagOp unmanaged_user_explicit, - gboolean *out_compatible, - GError **error) -@@ -2781,7 +2784,7 @@ nm_device_realize_start (NMDevice *self, - plink_copy = *plink; - plink = &plink_copy; - } -- realize_start_setup (self, plink, unmanaged_user_explicit); -+ realize_start_setup (self, plink, set_nm_owned, unmanaged_user_explicit); - - return TRUE; - } -@@ -2821,7 +2824,7 @@ nm_device_create_and_realize (NMDevice *self, - plink = &plink_copy; - } - -- realize_start_setup (self, plink, NM_UNMAN_FLAG_OP_FORGET); -+ realize_start_setup (self, plink, FALSE, NM_UNMAN_FLAG_OP_FORGET); - nm_device_realize_finish (self, plink); - - if (nm_device_get_managed (self, FALSE)) { -@@ -2917,6 +2920,8 @@ realize_start_notify (NMDevice *self, - * realize_start_setup(): - * @self: the #NMDevice - * @plink: the #NMPlatformLink if backed by a kernel netdevice -+ * @set_nm_owned: if TRUE and device is a software-device, set nm-owned. -+ * TRUE. - * @unmanaged_user_explicit: the user-explict unmanaged flag to set. - * - * Update the device from backing resource properties (like hardware -@@ -2928,6 +2933,7 @@ realize_start_notify (NMDevice *self, - static void - realize_start_setup (NMDevice *self, - const NMPlatformLink *plink, -+ gboolean set_nm_owned, - NMUnmanFlagOp unmanaged_user_explicit) - { - NMDevicePrivate *priv; -@@ -3011,17 +3017,11 @@ realize_start_setup (NMDevice *self, - - _add_capabilities (self, capabilities); - -- /* Update nm-owned flag according to state file */ - if ( !priv->nm_owned -- && priv->ifindex > 0 -+ && set_nm_owned - && nm_device_is_software (self)) { -- gs_free NMConfigDeviceStateData *dev_state = NULL; -- -- dev_state = nm_config_device_state_load (priv->ifindex); -- if (dev_state && dev_state->nm_owned == TRUE) { -- priv->nm_owned = TRUE; -- _LOGD (LOGD_DEVICE, "set nm-owned from state file"); -- } -+ priv->nm_owned = TRUE; -+ _LOGD (LOGD_DEVICE, "set nm-owned from state file"); - } - - if (!priv->udi) { -diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h -index 27f5018..74cc230 100644 ---- a/src/devices/nm-device.h -+++ b/src/devices/nm-device.h -@@ -611,6 +611,7 @@ gboolean nm_device_has_capability (NMDevice *self, NMDeviceCapabilities caps); - - gboolean nm_device_realize_start (NMDevice *device, - const NMPlatformLink *plink, -+ gboolean set_nm_owned, - NMUnmanFlagOp unmanaged_user_explicit, - gboolean *out_compatible, - GError **error); -diff --git a/src/nm-manager.c b/src/nm-manager.c -index 97752c4..b603b09 100644 ---- a/src/nm-manager.c -+++ b/src/nm-manager.c -@@ -2215,6 +2215,7 @@ factory_device_added_cb (NMDeviceFactory *factory, - - if (nm_device_realize_start (device, - NULL, -+ FALSE, - NM_UNMAN_FLAG_OP_FORGET, - NULL, - &error)) { -@@ -2293,6 +2294,7 @@ platform_link_added (NMManager *self, - return; - } else if (nm_device_realize_start (candidate, - plink, -+ FALSE, - NM_UNMAN_FLAG_OP_FORGET, - &compatible, - &error)) { -@@ -2364,6 +2366,7 @@ platform_link_added (NMManager *self, - - if (nm_device_realize_start (device, - plink, -+ dev_state ? (dev_state->nm_owned == 1) : FALSE, - unmanaged_user_explicit, - NULL, - &error)) { --- -2.9.4 - - -From ba9657314afa3a0eab63281db83fbf38ba3fac2c Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Wed, 7 Jun 2017 22:22:14 +0200 -Subject: [PATCH 5/5] core: allow assuming connections on "nm-owned" software - devices - -Especially now we load the nm-owned flag from run-state. We very much want to -assume connections on such devices. - -(cherry picked from commit 6a7b51f79bf93889665f9f6eb1ebbd4920535e24) -(cherry picked from commit 122be86c58b39b661b1cf466d5616d6f0006744e) ---- - src/nm-manager.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/src/nm-manager.c b/src/nm-manager.c -index b603b09..1daf633 100644 ---- a/src/nm-manager.c -+++ b/src/nm-manager.c -@@ -1858,9 +1858,6 @@ recheck_assume_connection (NMManager *self, - g_return_val_if_fail (NM_IS_MANAGER (self), FALSE); - g_return_val_if_fail (NM_IS_DEVICE (device), FALSE); - -- if (nm_device_is_nm_owned (device)) -- return FALSE; -- - if (!nm_device_get_managed (device, FALSE)) - return FALSE; - --- -2.9.4 - diff --git a/0024-fix-delayed-assume-master-rh1452062.patch b/0024-fix-delayed-assume-master-rh1452062.patch deleted file mode 100644 index cb58bb5..0000000 --- a/0024-fix-delayed-assume-master-rh1452062.patch +++ /dev/null @@ -1,536 +0,0 @@ -From 72e544c7eca495d0857d0710cc77161cd3b145d0 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Wed, 7 Jun 2017 17:34:47 +0200 -Subject: [PATCH 1/1] manager: fix preserving assume state during activation - -Originally 850c977 "device: track system interface state in NMDevice", -intended that a connection can only be assumed initially when seeing -a device for the first time. Assuming a connection later was to be -prevented by setting device's sys-iface-state to MANAGED. - -That changed too much in behavior, because we used to assume external -connections also when they are activated later on. So this was attempted -to get fixed by - - acf1067 nm-manager: try assuming connections on managed devices - - b6b7d90 manager: avoid generating in memory connections during startup for managed devices - -It's probably just wrong to prevent assuming connections based on the -sys-iface-state. So drop the check for sys-iface-state from -recheck_assume_connection(). Now, we can assume anytime on managed, -disconnected interfaces, like previously. -Btw, note that priv->startup is totally wrong to check there, because -priv->startup has the sole purpose of tracking startup-complete property. -Startup, as far as NMManager is concerned, is platform_query_devices(). - -However, the problem is that we only assume connections (contrary to -doing external activation) when we have a connection-uuid from the state -file or with guess-assume during startup. - -When assuming a master device, it can fail with - - (nm-bond): ignoring generated connection (IPv6LL-only and not in master-slave relationship) - -thus, for internal reason the device cannot be assumed yet. - -Fix that by attatching the assume-state to the device, so that on multiple -recheck_assume_connection() calls we still try to assume. Whenever we try -to assume the connection and it fails due to external reasons (like, the connection -no longer matching), we clear the assume state, so that we only try as -long as there are internal reasons why assuming fails. - -https://bugzilla.redhat.com/show_bug.cgi?id=1452062 -(cherry picked from commit 729de7d7f09c3ad813477b7a822155b4b95dc682) -(cherry picked from commit 06db38b91d627f897b5bdd0de4a06f7b8a220902) ---- - src/devices/nm-device.c | 86 ++++++++++++++++++++++++++++++++++++++++++--- - src/devices/nm-device.h | 15 +++++++- - src/nm-manager.c | 93 +++++++++++++++++++++++++------------------------ - 3 files changed, 144 insertions(+), 50 deletions(-) - -diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c -index 1aea8cb..404dcf7 100644 ---- a/src/devices/nm-device.c -+++ b/src/devices/nm-device.c -@@ -264,6 +264,9 @@ typedef struct _NMDevicePrivate { - - bool nm_owned:1; /* whether the device is a device owned and created by NM */ - -+ bool assume_state_guess_assume:1; -+ char * assume_state_connection_uuid; -+ - GHashTable * available_connections; - char * hw_addr; - char * hw_addr_perm; -@@ -527,6 +530,8 @@ static gboolean dhcp6_start (NMDevice *self, gboolean wait_for_ll); - static void nm_device_start_ip_check (NMDevice *self); - static void realize_start_setup (NMDevice *self, - const NMPlatformLink *plink, -+ gboolean assume_state_guess_assume, -+ const char *assume_state_connection_uuid, - gboolean set_nm_owned, - NMUnmanFlagOp unmanaged_user_explicit); - static void _commit_mtu (NMDevice *self, const NMIP4Config *config); -@@ -711,6 +716,52 @@ nm_device_sys_iface_state_set (NMDevice *self, - - /*****************************************************************************/ - -+void -+nm_device_assume_state_get (NMDevice *self, -+ gboolean *out_assume_state_guess_assume, -+ const char **out_assume_state_connection_uuid) -+{ -+ NMDevicePrivate *priv; -+ -+ g_return_if_fail (NM_IS_DEVICE (self)); -+ -+ priv = NM_DEVICE_GET_PRIVATE (self); -+ NM_SET_OUT (out_assume_state_guess_assume, priv->assume_state_guess_assume); -+ NM_SET_OUT (out_assume_state_connection_uuid, priv->assume_state_connection_uuid); -+} -+ -+static void -+_assume_state_set (NMDevice *self, -+ gboolean assume_state_guess_assume, -+ const char *assume_state_connection_uuid) -+{ -+ NMDevicePrivate *priv; -+ -+ nm_assert (NM_IS_DEVICE (self)); -+ -+ priv = NM_DEVICE_GET_PRIVATE (self); -+ if ( priv->assume_state_guess_assume == !!assume_state_guess_assume -+ && nm_streq0 (priv->assume_state_connection_uuid, assume_state_connection_uuid)) -+ return; -+ -+ _LOGD (LOGD_DEVICE, "assume-state: set guess-assume=%c, connection=%s%s%s", -+ assume_state_guess_assume ? '1' : '0', -+ NM_PRINT_FMT_QUOTE_STRING (assume_state_connection_uuid)); -+ priv->assume_state_guess_assume = assume_state_guess_assume; -+ g_free (priv->assume_state_connection_uuid); -+ priv->assume_state_connection_uuid = g_strdup (assume_state_connection_uuid); -+} -+ -+void -+nm_device_assume_state_reset (NMDevice *self) -+{ -+ g_return_if_fail (NM_IS_DEVICE (self)); -+ -+ _assume_state_set (self, FALSE, NULL); -+} -+ -+/*****************************************************************************/ -+ - static void - init_ip4_config_dns_priority (NMDevice *self, NMIP4Config *config) - { -@@ -2741,6 +2792,8 @@ link_type_compatible (NMDevice *self, - * nm_device_realize_start(): - * @self: the #NMDevice - * @plink: an existing platform link or %NULL -+ * @assume_state_guess_assume: set the guess_assume state. -+ * @assume_state_connection_uuid: set the connection uuid to assume. - * @set_nm_owned: for software device, if TRUE set nm-owned. - * @unmanaged_user_explicit: the user-explicit unmanaged flag to apply - * on the device initially. -@@ -2759,6 +2812,8 @@ link_type_compatible (NMDevice *self, - gboolean - nm_device_realize_start (NMDevice *self, - const NMPlatformLink *plink, -+ gboolean assume_state_guess_assume, -+ const char *assume_state_connection_uuid, - gboolean set_nm_owned, - NMUnmanFlagOp unmanaged_user_explicit, - gboolean *out_compatible, -@@ -2784,8 +2839,11 @@ nm_device_realize_start (NMDevice *self, - plink_copy = *plink; - plink = &plink_copy; - } -- realize_start_setup (self, plink, set_nm_owned, unmanaged_user_explicit); -- -+ realize_start_setup (self, plink, -+ assume_state_guess_assume, -+ assume_state_connection_uuid, -+ set_nm_owned, -+ unmanaged_user_explicit); - return TRUE; - } - -@@ -2824,7 +2882,10 @@ nm_device_create_and_realize (NMDevice *self, - plink = &plink_copy; - } - -- realize_start_setup (self, plink, FALSE, NM_UNMAN_FLAG_OP_FORGET); -+ realize_start_setup (self, plink, -+ FALSE, /* assume_state_guess_assume */ -+ NULL, /* assume_state_connection_uuid */ -+ FALSE, NM_UNMAN_FLAG_OP_FORGET); - nm_device_realize_finish (self, plink); - - if (nm_device_get_managed (self, FALSE)) { -@@ -2920,6 +2981,8 @@ realize_start_notify (NMDevice *self, - * realize_start_setup(): - * @self: the #NMDevice - * @plink: the #NMPlatformLink if backed by a kernel netdevice -+ * @assume_state_guess_assume: set the guess_assume state. -+ * @assume_state_connection_uuid: set the connection uuid to assume. - * @set_nm_owned: if TRUE and device is a software-device, set nm-owned. - * TRUE. - * @unmanaged_user_explicit: the user-explict unmanaged flag to set. -@@ -2933,6 +2996,8 @@ realize_start_notify (NMDevice *self, - static void - realize_start_setup (NMDevice *self, - const NMPlatformLink *plink, -+ gboolean assume_state_guess_assume, -+ const char *assume_state_connection_uuid, - gboolean set_nm_owned, - NMUnmanFlagOp unmanaged_user_explicit) - { -@@ -2972,6 +3037,8 @@ realize_start_setup (NMDevice *self, - _notify (self, PROP_MTU); - } - -+ _assume_state_set (self, assume_state_guess_assume, assume_state_connection_uuid); -+ - nm_device_sys_iface_state_set (self, NM_DEVICE_SYS_IFACE_STATE_EXTERNAL); - - if (plink) { -@@ -3193,6 +3260,8 @@ nm_device_unrealize (NMDevice *self, gboolean remove_resources, GError **error) - - _LOGD (LOGD_DEVICE, "unrealize (ifindex %d)", ifindex > 0 ? ifindex : 0); - -+ nm_device_assume_state_reset (self); -+ - if (remove_resources) { - if (NM_DEVICE_GET_CLASS (self)->unrealize) { - if (!NM_DEVICE_GET_CLASS (self)->unrealize (self, error)) -@@ -4042,7 +4111,7 @@ nm_device_master_update_slave_connection (NMDevice *self, - } - - NMConnection * --nm_device_generate_connection (NMDevice *self, NMDevice *master) -+nm_device_generate_connection (NMDevice *self, NMDevice *master, gboolean *out_maybe_later) - { - NMDeviceClass *klass = NM_DEVICE_GET_CLASS (self); - NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); -@@ -4056,6 +4125,8 @@ nm_device_generate_connection (NMDevice *self, NMDevice *master) - GError *error = NULL; - const NMPlatformLink *pllink; - -+ NM_SET_OUT (out_maybe_later, FALSE); -+ - /* If update_connection() is not implemented, just fail. */ - if (!klass->update_connection) - return NULL; -@@ -4131,6 +4202,7 @@ nm_device_generate_connection (NMDevice *self, NMDevice *master) - && !nm_setting_connection_get_master (NM_SETTING_CONNECTION (s_con)) - && !priv->slaves) { - _LOGD (LOGD_DEVICE, "ignoring generated connection (no IP and not in master-slave relationship)"); -+ NM_SET_OUT (out_maybe_later, TRUE); - g_object_unref (connection); - connection = NULL; - } -@@ -4145,6 +4217,7 @@ nm_device_generate_connection (NMDevice *self, NMDevice *master) - && !priv->slaves - && !nm_config_data_get_assume_ipv6ll_only (NM_CONFIG_GET_DATA, self)) { - _LOGD (LOGD_DEVICE, "ignoring generated connection (IPv6LL-only and not in master-slave relationship)"); -+ NM_SET_OUT (out_maybe_later, TRUE); - g_object_unref (connection); - connection = NULL; - } -@@ -12504,6 +12577,9 @@ _set_state_full (NMDevice *self, - NM_DEVICE_SYS_IFACE_STATE_ASSUME)) - nm_device_sys_iface_state_set (self, NM_DEVICE_SYS_IFACE_STATE_MANAGED); - -+ if (state > NM_DEVICE_STATE_DISCONNECTED) -+ nm_device_assume_state_reset (self); -+ - if (state <= NM_DEVICE_STATE_UNAVAILABLE) { - if (available_connections_del_all (self)) - _notify (self, PROP_AVAILABLE_CONNECTIONS); -@@ -13778,6 +13854,8 @@ dispose (GObject *object) - - nm_clear_g_cancellable (&priv->deactivating_cancellable); - -+ nm_device_assume_state_reset (self); -+ - _parent_set_ifindex (self, 0, FALSE); - - platform = nm_device_get_platform (self); -diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h -index 74cc230..01e3938 100644 ---- a/src/devices/nm-device.h -+++ b/src/devices/nm-device.h -@@ -487,7 +487,9 @@ void nm_device_removed (NMDevice *self, gboolean unconf - gboolean nm_device_is_available (NMDevice *dev, NMDeviceCheckDevAvailableFlags flags); - gboolean nm_device_has_carrier (NMDevice *dev); - --NMConnection * nm_device_generate_connection (NMDevice *self, NMDevice *master); -+NMConnection * nm_device_generate_connection (NMDevice *self, -+ NMDevice *master, -+ gboolean *out_maybe_later); - - gboolean nm_device_master_update_slave_connection (NMDevice *master, - NMDevice *slave, -@@ -609,8 +611,19 @@ gboolean nm_device_is_nm_owned (NMDevice *device); - - gboolean nm_device_has_capability (NMDevice *self, NMDeviceCapabilities caps); - -+/*****************************************************************************/ -+ -+void nm_device_assume_state_get (NMDevice *self, -+ gboolean *out_assume_state_guess_assume, -+ const char **out_assume_state_connection_uuid); -+void nm_device_assume_state_reset (NMDevice *self); -+ -+/*****************************************************************************/ -+ - gboolean nm_device_realize_start (NMDevice *device, - const NMPlatformLink *plink, -+ gboolean assume_state_guess_assume, -+ const char *assume_state_connection_uuid, - gboolean set_nm_owned, - NMUnmanFlagOp unmanaged_user_explicit, - gboolean *out_compatible, -diff --git a/src/nm-manager.c b/src/nm-manager.c -index 1daf633..9a7b123 100644 ---- a/src/nm-manager.c -+++ b/src/nm-manager.c -@@ -1691,11 +1691,6 @@ done: - * get_existing_connection: - * @manager: #NMManager instance - * @device: #NMDevice instance -- * @guess_assume: whether to employ a heuristic to search for a matching -- * connection to assume. -- * @assume_connection_uuid: if present, try to assume a connection with this -- * UUID. If no uuid is given or no matching connection is found, we -- * only do external activation. - * @out_generated: (allow-none): return TRUE, if the connection was generated. - * - * Returns: a #NMSettingsConnection to be assumed by the device, or %NULL if -@@ -1704,8 +1699,6 @@ done: - static NMSettingsConnection * - get_existing_connection (NMManager *self, - NMDevice *device, -- gboolean guess_assume, -- const char *assume_connection_uuid, - gboolean *out_generated) - { - NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); -@@ -1716,6 +1709,9 @@ get_existing_connection (NMManager *self, - int ifindex = nm_device_get_ifindex (device); - NMSettingsConnection *matched; - NMSettingsConnection *connection_checked = NULL; -+ gboolean assume_state_guess_assume = FALSE; -+ const char *assume_state_connection_uuid = NULL; -+ gboolean maybe_later; - - if (out_generated) - *out_generated = FALSE; -@@ -1746,9 +1742,16 @@ get_existing_connection (NMManager *self, - * update_connection() implemented, otherwise nm_device_generate_connection() - * returns NULL. - */ -- connection = nm_device_generate_connection (device, master); -- if (!connection) -+ connection = nm_device_generate_connection (device, master, &maybe_later); -+ if (!connection) { -+ if (!maybe_later) -+ nm_device_assume_state_reset (device); - return NULL; -+ } -+ -+ nm_device_assume_state_get (device, -+ &assume_state_guess_assume, -+ &assume_state_connection_uuid); - - /* Now we need to compare the generated connection to each configured - * connection. The comparison function is the heart of the connection -@@ -1759,8 +1762,8 @@ get_existing_connection (NMManager *self, - * When no configured connection matches the generated connection, we keep - * the generated connection instead. - */ -- if ( assume_connection_uuid -- && (connection_checked = nm_settings_get_connection_by_uuid (priv->settings, assume_connection_uuid)) -+ if ( assume_state_connection_uuid -+ && (connection_checked = nm_settings_get_connection_by_uuid (priv->settings, assume_state_connection_uuid)) - && !active_connection_find_first (self, connection_checked, NULL, - NM_ACTIVE_CONNECTION_STATE_DEACTIVATING) - && nm_device_check_connection_compatible (device, NM_CONNECTION (connection_checked))) { -@@ -1778,7 +1781,7 @@ get_existing_connection (NMManager *self, - } else - matched = NULL; - -- if (!matched && guess_assume) { -+ if (!matched && assume_state_guess_assume) { - gs_free NMSettingsConnection **connections = NULL; - guint len, i, j; - -@@ -1812,9 +1815,10 @@ get_existing_connection (NMManager *self, - nm_device_get_iface (device), - nm_settings_connection_get_id (matched), - nm_settings_connection_get_uuid (matched), -- assume_connection_uuid && nm_streq (assume_connection_uuid, nm_settings_connection_get_uuid (matched)) -+ assume_state_connection_uuid && nm_streq (assume_state_connection_uuid, nm_settings_connection_get_uuid (matched)) - ? " (indicated)" : " (guessed)"); - g_object_unref (connection); -+ nm_device_assume_state_reset (device); - return matched; - } - -@@ -1822,6 +1826,8 @@ get_existing_connection (NMManager *self, - nm_device_get_iface (device), - nm_connection_get_id (connection)); - -+ nm_device_assume_state_reset (device); -+ - added = nm_settings_add_connection (priv->settings, connection, FALSE, &error); - if (added) { - nm_settings_connection_set_flags (NM_SETTINGS_CONNECTION (added), -@@ -1844,34 +1850,28 @@ get_existing_connection (NMManager *self, - - static gboolean - recheck_assume_connection (NMManager *self, -- NMDevice *device, -- gboolean guess_assume, -- const char *assume_connection_uuid) -+ NMDevice *device) - { - NMSettingsConnection *connection; - gboolean was_unmanaged = FALSE; - gboolean generated = FALSE; - NMDeviceState state; -- NMDeviceSysIfaceState if_state; -- NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); - - g_return_val_if_fail (NM_IS_MANAGER (self), FALSE); - g_return_val_if_fail (NM_IS_DEVICE (device), FALSE); - -- if (!nm_device_get_managed (device, FALSE)) -+ if (!nm_device_get_managed (device, FALSE)) { -+ nm_device_assume_state_reset (device); - return FALSE; -+ } - - state = nm_device_get_state (device); -- if (state > NM_DEVICE_STATE_DISCONNECTED) -- return FALSE; -- -- if_state = nm_device_sys_iface_state_get (device); -- if (!priv->startup && (if_state == NM_DEVICE_SYS_IFACE_STATE_MANAGED)) -- nm_assert (!guess_assume && (assume_connection_uuid == NULL)); -- else if (if_state != NM_DEVICE_SYS_IFACE_STATE_EXTERNAL) -+ if (state > NM_DEVICE_STATE_DISCONNECTED) { -+ nm_device_assume_state_reset (device); - return FALSE; -+ } - -- connection = get_existing_connection (self, device, guess_assume, assume_connection_uuid, &generated); -+ connection = get_existing_connection (self, device, &generated); - if (!connection) { - _LOGD (LOGD_DEVICE, "(%s): can't assume; no connection", - nm_device_get_iface (device)); -@@ -1951,9 +1951,9 @@ recheck_assume_connection (NMManager *self, - } - - static void --recheck_assume_connection_cb (NMDevice *device, gpointer user_data) -+recheck_assume_connection_cb (NMManager *self, NMDevice *device) - { -- recheck_assume_connection (user_data, device, FALSE, NULL); -+ recheck_assume_connection (self, device); - } - - static void -@@ -2046,19 +2046,19 @@ device_connectivity_changed (NMDevice *device, - static void - _device_realize_finish (NMManager *self, - NMDevice *device, -- const NMPlatformLink *plink, -- gboolean guess_assume, -- const char *connection_uuid_to_assume) -+ const NMPlatformLink *plink) - { - g_return_if_fail (NM_IS_MANAGER (self)); - g_return_if_fail (NM_IS_DEVICE (device)); - - nm_device_realize_finish (device, plink); - -- if (!nm_device_get_managed (device, FALSE)) -+ if (!nm_device_get_managed (device, FALSE)) { -+ nm_device_assume_state_reset (device); - return; -+ } - -- if (recheck_assume_connection (self, device, guess_assume, connection_uuid_to_assume)) -+ if (recheck_assume_connection (self, device)) - return; - - /* if we failed to assume a connection for the managed device, but the device -@@ -2128,9 +2128,9 @@ add_device (NMManager *self, NMDevice *device, GError **error) - G_CALLBACK (device_removed_cb), - self); - -- g_signal_connect (device, NM_DEVICE_RECHECK_ASSUME, -- G_CALLBACK (recheck_assume_connection_cb), -- self); -+ g_signal_connect_data (device, NM_DEVICE_RECHECK_ASSUME, -+ G_CALLBACK (recheck_assume_connection_cb), -+ self, NULL, G_CONNECT_SWAPPED); - - g_signal_connect (device, "notify::" NM_DEVICE_IP_IFACE, - G_CALLBACK (device_ip_iface_changed), -@@ -2212,12 +2212,14 @@ factory_device_added_cb (NMDeviceFactory *factory, - - if (nm_device_realize_start (device, - NULL, -- FALSE, -+ FALSE, /* assume_state_guess_assume */ -+ NULL, /* assume_state_connection_uuid */ -+ FALSE, /* set_nm_owned */ - NM_UNMAN_FLAG_OP_FORGET, - NULL, - &error)) { - add_device (self, device, NULL); -- _device_realize_finish (self, device, NULL, FALSE, NULL); -+ _device_realize_finish (self, device, NULL); - } else { - _LOGW (LOGD_DEVICE, "(%s): failed to realize device: %s", - nm_device_get_iface (device), error->message); -@@ -2291,12 +2293,13 @@ platform_link_added (NMManager *self, - return; - } else if (nm_device_realize_start (candidate, - plink, -- FALSE, -+ FALSE, /* assume_state_guess_assume */ -+ NULL, /* assume_state_connection_uuid */ -+ FALSE, /* set_nm_owned */ - NM_UNMAN_FLAG_OP_FORGET, - &compatible, - &error)) { -- /* Success */ -- _device_realize_finish (self, candidate, plink, FALSE, NULL); -+ _device_realize_finish (self, candidate, plink); - return; - } - -@@ -2363,14 +2366,14 @@ platform_link_added (NMManager *self, - - if (nm_device_realize_start (device, - plink, -+ guess_assume, -+ dev_state ? dev_state->connection_uuid : NULL, - dev_state ? (dev_state->nm_owned == 1) : FALSE, - unmanaged_user_explicit, - NULL, - &error)) { - add_device (self, device, NULL); -- _device_realize_finish (self, device, plink, -- guess_assume, -- dev_state ? dev_state->connection_uuid : NULL); -+ _device_realize_finish (self, device, plink); - } else { - _LOGW (LOGD_DEVICE, "%s: failed to realize device: %s", - plink->name, error->message); --- -2.9.4 - diff --git a/0025-improve-logging-assume-rh1452062.patch b/0025-improve-logging-assume-rh1452062.patch deleted file mode 100644 index eb9b523..0000000 --- a/0025-improve-logging-assume-rh1452062.patch +++ /dev/null @@ -1,1173 +0,0 @@ -From bc8c001312ba87cb4069b5a1785bb8fef607f079 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Wed, 7 Jun 2017 12:18:21 +0200 -Subject: [PATCH 01/10] device: rework device's _NMLOG() logging macro - -- if the interface-name is NULL, print [null], to distinguish - it from (ifname). -- evaluate the ifname only once. - -(cherry picked from commit f10b95880666fe611fb2d0c27d49bfe3988ec9ec) -(cherry picked from commit 60ce882419201f75ac762e559854c85926263fe1) ---- - src/devices/nm-device-logging.h | 22 ++++++++++++++++------ - 1 file changed, 16 insertions(+), 6 deletions(-) - -diff --git a/src/devices/nm-device-logging.h b/src/devices/nm-device-logging.h -index 419a4a5..5f95a91 100644 ---- a/src/devices/nm-device-logging.h -+++ b/src/devices/nm-device-logging.h -@@ -34,11 +34,21 @@ _nm_device_log_self_to_device (t *self) \ - #undef _NMLOG_ENABLED - #define _NMLOG_ENABLED(level, domain) ( nm_logging_enabled ((level), (domain)) ) - #define _NMLOG(level, domain, ...) \ -- nm_log_obj ((level), (domain), \ -- (self) ? nm_device_get_iface (_nm_device_log_self_to_device (self)) : NULL, \ -- NULL, (self), "device", \ -- "(%s): " _NM_UTILS_MACRO_FIRST(__VA_ARGS__), \ -- (self) ? (nm_device_get_iface (_nm_device_log_self_to_device (self)) ?: "(null)") : "(none)" \ -- _NM_UTILS_MACRO_REST(__VA_ARGS__)) -+ G_STMT_START { \ -+ const NMLogLevel _level = (level); \ -+ const NMLogDomain _domain = (domain); \ -+ \ -+ if (nm_logging_enabled (_level, _domain)) { \ -+ typeof (*self) *const _self = (self); \ -+ const char *const _ifname = _self ? nm_device_get_iface (_nm_device_log_self_to_device (_self)) : NULL; \ -+ \ -+ nm_log_obj (_level, _domain, \ -+ _ifname, NULL, \ -+ _self, "device", \ -+ "%s%s%s: " _NM_UTILS_MACRO_FIRST(__VA_ARGS__), \ -+ NM_PRINT_FMT_QUOTED (_ifname, "(", _ifname, ")", "[null]") \ -+ _NM_UTILS_MACRO_REST(__VA_ARGS__)); \ -+ } \ -+ } G_STMT_END - - #endif /* __NETWORKMANAGER_DEVICE_LOGGING_H__ */ --- -2.9.4 - - -From 5449347dcb049ed7f7d5a9ee022dcf2b2d676412 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Wed, 7 Jun 2017 17:22:16 +0200 -Subject: [PATCH 02/10] device: expose nm_device_state_to_str() function for - NMDeviceState - -(cherry picked from commit 4b15df26561d5cf3890c9f8e1ec0266547d1cb7a) -(cherry picked from commit e0b7a44062ac870dc884021704f915b21caeaa52) ---- - src/devices/nm-device.c | 28 ++++++++++++++-------------- - src/devices/nm-device.h | 3 +++ - 2 files changed, 17 insertions(+), 14 deletions(-) - -diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c -index 404dcf7..fdf88c9 100644 ---- a/src/devices/nm-device.c -+++ b/src/devices/nm-device.c -@@ -557,8 +557,8 @@ NM_UTILS_LOOKUP_STR_DEFINE_STATIC (queued_state_to_string, NMDeviceState, - NM_UTILS_LOOKUP_STR_ITEM (NM_DEVICE_STATE_FAILED, NM_PENDING_ACTIONPREFIX_QUEUED_STATE_CHANGE "failed"), - ); - --static const char * --state_to_string (NMDeviceState state) -+const char * -+nm_device_state_to_str (NMDeviceState state) - { - return queued_state_to_string (state) + NM_STRLEN (NM_PENDING_ACTIONPREFIX_QUEUED_STATE_CHANGE); - } -@@ -3423,9 +3423,9 @@ slave_state_changed (NMDevice *slave, - _LOGD (LOGD_DEVICE, "slave %s state change %d (%s) -> %d (%s)", - nm_device_get_iface (slave), - slave_old_state, -- state_to_string (slave_old_state), -+ nm_device_state_to_str (slave_old_state), - slave_new_state, -- state_to_string (slave_new_state)); -+ nm_device_state_to_str (slave_new_state)); - - /* Don't try to enslave slaves until the master is ready */ - if (priv->state < NM_DEVICE_STATE_CONFIG) -@@ -4434,7 +4434,7 @@ recheck_available (gpointer user_data) - _LOGD (LOGD_DEVICE, "is %savailable, %s %s", - now_available ? "" : "not ", - new_state == NM_DEVICE_STATE_UNAVAILABLE ? "no change required for" : "will transition to", -- state_to_string (new_state == NM_DEVICE_STATE_UNAVAILABLE ? state : new_state)); -+ nm_device_state_to_str (new_state == NM_DEVICE_STATE_UNAVAILABLE ? state : new_state)); - - priv->recheck_available.available_reason = NM_DEVICE_STATE_REASON_NONE; - priv->recheck_available.unavailable_reason = NM_DEVICE_STATE_REASON_NONE; -@@ -12536,8 +12536,8 @@ _set_state_full (NMDevice *self, - && ( state != NM_DEVICE_STATE_UNAVAILABLE - || !priv->firmware_missing)) { - _LOGD (LOGD_DEVICE, "state change: %s -> %s (reason '%s') [%d %d %d]%s", -- state_to_string (old_state), -- state_to_string (state), -+ nm_device_state_to_str (old_state), -+ nm_device_state_to_str (state), - reason_to_string (reason), - old_state, - state, -@@ -12547,8 +12547,8 @@ _set_state_full (NMDevice *self, - } - - _LOGI (LOGD_DEVICE, "state change: %s -> %s (reason '%s') [%d %d %d]", -- state_to_string (old_state), -- state_to_string (state), -+ nm_device_state_to_str (old_state), -+ nm_device_state_to_str (state), - reason_to_string (reason), - old_state, - state, -@@ -12872,7 +12872,7 @@ queued_state_set (gpointer user_data) - nm_assert (priv->queued_state.id); - - _LOGD (LOGD_DEVICE, "queue-state[%s, reason:%s, id:%u]: %s", -- state_to_string (priv->queued_state.state), -+ nm_device_state_to_str (priv->queued_state.state), - reason_to_string (priv->queued_state.reason), - priv->queued_state.id, - "change state"); -@@ -12903,7 +12903,7 @@ nm_device_queue_state (NMDevice *self, - - if (priv->queued_state.id && priv->queued_state.state == state) { - _LOGD (LOGD_DEVICE, "queue-state[%s, reason:%s, id:%u]: %s%s%s%s", -- state_to_string (priv->queued_state.state), -+ nm_device_state_to_str (priv->queued_state.state), - reason_to_string (priv->queued_state.reason), - priv->queued_state.id, - "ignore queuing same state change", -@@ -12919,7 +12919,7 @@ nm_device_queue_state (NMDevice *self, - /* We should only ever have one delayed state transition at a time */ - if (priv->queued_state.id) { - _LOGW (LOGD_DEVICE, "queue-state[%s, reason:%s, id:%u]: %s", -- state_to_string (priv->queued_state.state), -+ nm_device_state_to_str (priv->queued_state.state), - reason_to_string (priv->queued_state.reason), - priv->queued_state.id, - "replace previously queued state change"); -@@ -12932,7 +12932,7 @@ nm_device_queue_state (NMDevice *self, - priv->queued_state.id = g_idle_add (queued_state_set, self); - - _LOGD (LOGD_DEVICE, "queue-state[%s, reason:%s, id:%u]: %s", -- state_to_string (state), -+ nm_device_state_to_str (state), - reason_to_string (reason), - priv->queued_state.id, - "queue state change"); -@@ -12947,7 +12947,7 @@ queued_state_clear (NMDevice *self) - return; - - _LOGD (LOGD_DEVICE, "queue-state[%s, reason:%s, id:%u]: %s", -- state_to_string (priv->queued_state.state), -+ nm_device_state_to_str (priv->queued_state.state), - reason_to_string (priv->queued_state.reason), - priv->queued_state.id, - "clear queued state change"); -diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h -index 01e3938..edbb0aa 100644 ---- a/src/devices/nm-device.h -+++ b/src/devices/nm-device.h -@@ -722,4 +722,7 @@ void nm_device_check_connectivity (NMDevice *self, - gpointer user_data); - NMConnectivityState nm_device_get_connectivity_state (NMDevice *self); - -+ -+const char *nm_device_state_to_str (NMDeviceState state); -+ - #endif /* __NETWORKMANAGER_DEVICE_H__ */ --- -2.9.4 - - -From c1fdd7063b9be81cbac1e256c0cca7ee8c6b4486 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Wed, 7 Jun 2017 12:47:27 +0200 -Subject: [PATCH 03/10] logging: add LOG3 macros - -(cherry picked from commit 2ae891b5923afc2d4f2853f213d26538092b1c39) -(cherry picked from commit c5812a5fb9bee418e2d2c4f4ef4225d5cde86e87) ---- - src/nm-logging.h | 31 +++++++++++++++++++++++++++++++ - 1 file changed, 31 insertions(+) - -diff --git a/src/nm-logging.h b/src/nm-logging.h -index ff1fac7..91a4141 100644 ---- a/src/nm-logging.h -+++ b/src/nm-logging.h -@@ -306,6 +306,37 @@ gboolean nm_logging_syslog_enabled (void); - #define _LOG2t_err(errsv, ...) G_STMT_START { if (FALSE) { _NMLOG2_err (errsv, LOGL_TRACE, __VA_ARGS__); } } G_STMT_END - #endif - -+#define _NMLOG3_ENABLED(level) ( nm_logging_enabled ((level), (_NMLOG3_DOMAIN)) ) -+ -+#define _LOG3T(...) _NMLOG3 (LOGL_TRACE, __VA_ARGS__) -+#define _LOG3D(...) _NMLOG3 (LOGL_DEBUG, __VA_ARGS__) -+#define _LOG3I(...) _NMLOG3 (LOGL_INFO , __VA_ARGS__) -+#define _LOG3W(...) _NMLOG3 (LOGL_WARN , __VA_ARGS__) -+#define _LOG3E(...) _NMLOG3 (LOGL_ERR , __VA_ARGS__) -+ -+#define _LOG3T_ENABLED(...) _NMLOG3_ENABLED (LOGL_TRACE, ##__VA_ARGS__) -+#define _LOG3D_ENABLED(...) _NMLOG3_ENABLED (LOGL_DEBUG, ##__VA_ARGS__) -+#define _LOG3I_ENABLED(...) _NMLOG3_ENABLED (LOGL_INFO , ##__VA_ARGS__) -+#define _LOG3W_ENABLED(...) _NMLOG3_ENABLED (LOGL_WARN , ##__VA_ARGS__) -+#define _LOG3E_ENABLED(...) _NMLOG3_ENABLED (LOGL_ERR , ##__VA_ARGS__) -+ -+#define _LOG3T_err(errsv, ...) _NMLOG3_err (errsv, LOGL_TRACE, __VA_ARGS__) -+#define _LOG3D_err(errsv, ...) _NMLOG3_err (errsv, LOGL_DEBUG, __VA_ARGS__) -+#define _LOG3I_err(errsv, ...) _NMLOG3_err (errsv, LOGL_INFO , __VA_ARGS__) -+#define _LOG3W_err(errsv, ...) _NMLOG3_err (errsv, LOGL_WARN , __VA_ARGS__) -+#define _LOG3E_err(errsv, ...) _NMLOG3_err (errsv, LOGL_ERR , __VA_ARGS__) -+ -+#ifdef NM_MORE_LOGGING -+#define _LOG3t_ENABLED(...) _NMLOG3_ENABLED (LOGL_TRACE, ##__VA_ARGS__) -+#define _LOG3t(...) _NMLOG3 (LOGL_TRACE, __VA_ARGS__) -+#define _LOG3t_err(errsv, ...) _NMLOG3_err (errsv, LOGL_TRACE, __VA_ARGS__) -+#else -+/* still call the logging macros to get compile time checks, but they will be optimized out. */ -+#define _LOG3t_ENABLED(...) ( FALSE && (_NMLOG3_ENABLED (LOGL_TRACE, ##__VA_ARGS__)) ) -+#define _LOG3t(...) G_STMT_START { if (FALSE) { _NMLOG3 (LOGL_TRACE, __VA_ARGS__); } } G_STMT_END -+#define _LOG3t_err(errsv, ...) G_STMT_START { if (FALSE) { _NMLOG3_err (errsv, LOGL_TRACE, __VA_ARGS__); } } G_STMT_END -+#endif -+ - extern void (*_nm_logging_clear_platform_logging_cache) (void); - - /*****************************************************************************/ --- -2.9.4 - - -From 34397427cc2b8351f7068c911d085f946ed420bd Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Wed, 7 Jun 2017 12:46:10 +0200 -Subject: [PATCH 04/10] manager: add logging macro _NMLOG2() for logging device - messages - -It unifies the way how we print the logging prefix, but also it -passes the ifname down for structured logging. - -(cherry picked from commit 1f6078bcf5af88095d42ea2a2be002578cd3e76e) -(cherry picked from commit 22bf75162d96a2f6aa7084ba05d4eed21e9ca5e6) ---- - src/devices/nm-device-logging.h | 2 +- - src/devices/nm-device.h | 9 ++++ - src/nm-manager.c | 97 ++++++++++++++++++++++------------------- - 3 files changed, 63 insertions(+), 45 deletions(-) - -diff --git a/src/devices/nm-device-logging.h b/src/devices/nm-device-logging.h -index 5f95a91..f0c7e59 100644 ---- a/src/devices/nm-device-logging.h -+++ b/src/devices/nm-device-logging.h -@@ -40,7 +40,7 @@ _nm_device_log_self_to_device (t *self) \ - \ - if (nm_logging_enabled (_level, _domain)) { \ - typeof (*self) *const _self = (self); \ -- const char *const _ifname = _self ? nm_device_get_iface (_nm_device_log_self_to_device (_self)) : NULL; \ -+ const char *const _ifname = _nm_device_get_iface (_nm_device_log_self_to_device (_self)); \ - \ - nm_log_obj (_level, _domain, \ - _ifname, NULL, \ -diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h -index edbb0aa..7229fb9 100644 ---- a/src/devices/nm-device.h -+++ b/src/devices/nm-device.h -@@ -421,6 +421,15 @@ NMPlatform *nm_device_get_platform (NMDevice *self); - - const char * nm_device_get_udi (NMDevice *dev); - const char * nm_device_get_iface (NMDevice *dev); -+ -+static inline const char * -+_nm_device_get_iface (NMDevice *device) -+{ -+ /* like nm_device_get_iface(), but gracefully accept NULL without -+ * asserting. */ -+ return device ? nm_device_get_iface (device) : NULL; -+} -+ - int nm_device_get_ifindex (NMDevice *dev); - gboolean nm_device_is_software (NMDevice *dev); - gboolean nm_device_is_real (NMDevice *dev); -diff --git a/src/nm-manager.c b/src/nm-manager.c -index 9a7b123..098d00d 100644 ---- a/src/nm-manager.c -+++ b/src/nm-manager.c -@@ -222,19 +222,41 @@ NM_DEFINE_SINGLETON_INSTANCE (NMManager); - #define _NMLOG_PREFIX_NAME "manager" - #define _NMLOG(level, domain, ...) \ - G_STMT_START { \ -- const NMLogLevel __level = (level); \ -- const NMLogDomain __domain = (domain); \ -+ const NMLogLevel _level = (level); \ -+ const NMLogDomain _domain = (domain); \ - \ -- if (nm_logging_enabled (__level, __domain)) { \ -- const NMManager *const __self = (self); \ -- char __sbuf[32]; \ -+ if (nm_logging_enabled (_level, _domain)) { \ -+ const NMManager *const _self = (self); \ -+ char _sbuf[32]; \ - \ -- _nm_log (__level, __domain, 0, NULL, NULL, \ -+ _nm_log (_level, _domain, 0, NULL, NULL, \ - "%s%s: " _NM_UTILS_MACRO_FIRST (__VA_ARGS__), \ - _NMLOG_PREFIX_NAME, \ -- (__self && __self != singleton_instance) \ -- ? nm_sprintf_buf (__sbuf, "[%p]", __self) \ -- : "" \ -+ ((_self && _self != singleton_instance) \ -+ ? nm_sprintf_buf (_sbuf, "[%p]", _self) \ -+ : "") \ -+ _NM_UTILS_MACRO_REST (__VA_ARGS__)); \ -+ } \ -+ } G_STMT_END -+ -+#define _NMLOG2(level, domain, device, ...) \ -+ G_STMT_START { \ -+ const NMLogLevel _level = (level); \ -+ const NMLogDomain _domain = (domain); \ -+ \ -+ if (nm_logging_enabled (_level, _domain)) { \ -+ const NMManager *const _self = (self); \ -+ const char *const _ifname = _nm_device_get_iface (device); \ -+ char _sbuf[32]; \ -+ \ -+ _nm_log (_level, _domain, 0, \ -+ _ifname, NULL, \ -+ "%s%s: %s%s%s" _NM_UTILS_MACRO_FIRST (__VA_ARGS__), \ -+ _NMLOG_PREFIX_NAME, \ -+ ((_self && _self != singleton_instance) \ -+ ? nm_sprintf_buf (_sbuf, "[%p]", _self) \ -+ : ""), \ -+ NM_PRINT_FMT_QUOTED (_ifname, "(", _ifname, "): ", "") \ - _NM_UTILS_MACRO_REST (__VA_ARGS__)); \ - } \ - } G_STMT_END -@@ -983,8 +1005,8 @@ remove_device (NMManager *self, - NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); - gboolean unmanage = FALSE; - -- _LOGD (LOGD_DEVICE, "(%s): removing device (allow_unmanage %d, managed %d)", -- nm_device_get_iface (device), allow_unmanage, nm_device_get_managed (device, FALSE)); -+ _LOG2D (LOGD_DEVICE, device, "removing device (allow_unmanage %d, managed %d)", -+ allow_unmanage, nm_device_get_managed (device, FALSE)); - - if (allow_unmanage && nm_device_get_managed (device, FALSE)) { - -@@ -1481,9 +1503,7 @@ manager_update_radio_enabled (NMManager *self, - NMDevice *device = NM_DEVICE (iter->data); - - if (nm_device_get_rfkill_type (device) == rstate->rtype) { -- _LOGD (LOGD_RFKILL, "(%s): setting radio %s", -- nm_device_get_iface (device), -- enabled ? "enabled" : "disabled"); -+ _LOG2D (LOGD_RFKILL, device, "setting radio %s", enabled ? "enabled" : "disabled"); - nm_device_set_enabled (device, enabled); - } - } -@@ -1724,13 +1744,13 @@ get_existing_connection (NMManager *self, - if (master_ifindex) { - master = nm_manager_get_device_by_ifindex (self, master_ifindex); - if (!master) { -- _LOGD (LOGD_DEVICE, "(%s): cannot generate connection for slave before its master (%s/%d)", -- nm_device_get_iface (device), nm_platform_link_get_name (NM_PLATFORM_GET, master_ifindex), master_ifindex); -+ _LOG2D (LOGD_DEVICE, device, "cannot generate connection for slave before its master (%s/%d)", -+ nm_platform_link_get_name (NM_PLATFORM_GET, master_ifindex), master_ifindex); - return NULL; - } - if (!nm_device_get_act_request (master)) { -- _LOGD (LOGD_DEVICE, "(%s): cannot generate connection for slave before master %s activates", -- nm_device_get_iface (device), nm_device_get_iface (master)); -+ _LOG2D (LOGD_DEVICE, device, "cannot generate connection for slave before master %s activates", -+ nm_device_get_iface (master)); - return NULL; - } - } -@@ -1811,20 +1831,18 @@ get_existing_connection (NMManager *self, - } - - if (matched) { -- _LOGI (LOGD_DEVICE, "(%s): found matching connection '%s' (%s)%s", -- nm_device_get_iface (device), -- nm_settings_connection_get_id (matched), -- nm_settings_connection_get_uuid (matched), -- assume_state_connection_uuid && nm_streq (assume_state_connection_uuid, nm_settings_connection_get_uuid (matched)) -- ? " (indicated)" : " (guessed)"); -+ _LOG2I (LOGD_DEVICE, device, "found matching connection '%s' (%s)%s", -+ nm_settings_connection_get_id (matched), -+ nm_settings_connection_get_uuid (matched), -+ assume_state_connection_uuid && nm_streq (assume_state_connection_uuid, nm_settings_connection_get_uuid (matched)) -+ ? " (indicated)" : " (guessed)"); - g_object_unref (connection); - nm_device_assume_state_reset (device); - return matched; - } - -- _LOGD (LOGD_DEVICE, "(%s): generated connection '%s'", -- nm_device_get_iface (device), -- nm_connection_get_id (connection)); -+ _LOG2D (LOGD_DEVICE, device, "generated connection '%s'", -+ nm_connection_get_id (connection)); - - nm_device_assume_state_reset (device); - -@@ -1837,8 +1855,7 @@ get_existing_connection (NMManager *self, - if (out_generated) - *out_generated = TRUE; - } else { -- _LOGW (LOGD_SETTINGS, "(%s) Couldn't save generated connection '%s': %s", -- nm_device_get_iface (device), -+ _LOG2W (LOGD_SETTINGS, device, "Couldn't save generated connection '%s': %s", - nm_connection_get_id (connection), - error->message); - g_clear_error (&error); -@@ -1873,13 +1890,11 @@ recheck_assume_connection (NMManager *self, - - connection = get_existing_connection (self, device, &generated); - if (!connection) { -- _LOGD (LOGD_DEVICE, "(%s): can't assume; no connection", -- nm_device_get_iface (device)); -+ _LOG2D (LOGD_DEVICE, device, "can't assume; no connection"); - return FALSE; - } - -- _LOGD (LOGD_DEVICE, "(%s): will attempt to assume connection", -- nm_device_get_iface (device)); -+ _LOG2D (LOGD_DEVICE, device, "will attempt to assume connection"); - - nm_device_sys_iface_state_set (device, - generated -@@ -1926,9 +1941,7 @@ recheck_assume_connection (NMManager *self, - } - - if (generated) { -- _LOGD (LOGD_DEVICE, "(%s): connection assumption failed. Deleting generated connection", -- nm_device_get_iface (device)); -- -+ _LOG2D (LOGD_DEVICE, device, "connection assumption failed. Deleting generated connection"); - nm_settings_connection_delete (connection, NULL, NULL); - } else { - if (nm_device_sys_iface_state_get (device) == NM_DEVICE_SYS_IFACE_STATE_ASSUME) -@@ -2182,7 +2195,7 @@ add_device (NMManager *self, NMDevice *device, GError **error) - manager_sleeping (self)); - - dbus_path = nm_exported_object_export (NM_EXPORTED_OBJECT (device)); -- _LOGI (LOGD_DEVICE, "(%s): new %s device (%s)", iface, type_desc, dbus_path); -+ _LOG2I (LOGD_DEVICE, device, "new %s device (%s)", type_desc, dbus_path); - - nm_settings_device_added (priv->settings, device); - g_signal_emit (self, signals[INTERNAL_DEVICE_ADDED], 0, device); -@@ -2221,8 +2234,7 @@ factory_device_added_cb (NMDeviceFactory *factory, - add_device (self, device, NULL); - _device_realize_finish (self, device, NULL); - } else { -- _LOGW (LOGD_DEVICE, "(%s): failed to realize device: %s", -- nm_device_get_iface (device), error->message); -+ _LOG2W (LOGD_DEVICE, device, "failed to realize device: %s", error->message); - g_error_free (error); - } - } -@@ -2414,9 +2426,7 @@ _platform_link_cb_idle (PlatformLinkCbData *data) - nm_device_sys_iface_state_set (device, NM_DEVICE_SYS_IFACE_STATE_REMOVED); - /* Our software devices stick around until their connection is removed */ - if (!nm_device_unrealize (device, FALSE, &error)) { -- _LOGW (LOGD_DEVICE, "(%s): failed to unrealize: %s", -- nm_device_get_iface (device), -- error->message); -+ _LOG2W (LOGD_DEVICE, device, "failed to unrealize: %s", error->message); - g_clear_error (&error); - remove_device (self, device, FALSE, TRUE); - } -@@ -5172,8 +5182,7 @@ handle_firmware_changed (gpointer user_data) - - if ( nm_device_get_firmware_missing (candidate) - && (state == NM_DEVICE_STATE_UNAVAILABLE)) { -- _LOGI (LOGD_CORE, "(%s): firmware may now be available", -- nm_device_get_iface (candidate)); -+ _LOG2I (LOGD_CORE, candidate, "firmware may now be available"); - - /* Re-set unavailable state to try bringing the device up again */ - nm_device_state_changed (candidate, --- -2.9.4 - - -From da914ee814f86d87eda5676fa7a1cbf5bcbf264e Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Wed, 7 Jun 2017 12:46:10 +0200 -Subject: [PATCH 05/10] manager: add logging macro _NMLOG3() for logging - connection messages - -It unifies the way how we print the logging prefix, but also it -passes the con_uuid down for structured logging. - -(cherry picked from commit 6962f14d4a74c192a81604b7de40a94d13530dc6) -(cherry picked from commit 36b99ccf5f430f0e70478e5bae314e7893850cde) ---- - libnm-core/nm-core-internal.h | 18 ++++++++++++++++ - src/nm-manager.c | 50 +++++++++++++++++++++++++++++++------------ - 2 files changed, 54 insertions(+), 14 deletions(-) - -diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h -index ac292bf..91967ce 100644 ---- a/libnm-core/nm-core-internal.h -+++ b/libnm-core/nm-core-internal.h -@@ -343,6 +343,24 @@ _nm_setting_bond_get_option_type (NMSettingBond *setting, const char *name); - - /*****************************************************************************/ - -+/* nm_connection_get_uuid() asserts against NULL, which is the right thing to -+ * do in order to catch bugs. However, sometimes that behavior is inconvenient. -+ * Just try or return NULL. */ -+ -+static inline const char * -+_nm_connection_get_id (NMConnection *connection) -+{ -+ return connection ? nm_connection_get_id (connection) : NULL; -+} -+ -+static inline const char * -+_nm_connection_get_uuid (NMConnection *connection) -+{ -+ return connection ? nm_connection_get_uuid (connection) : NULL; -+} -+ -+/*****************************************************************************/ -+ - typedef enum { - NM_BOND_MODE_UNKNOWN = 0, - NM_BOND_MODE_ROUNDROBIN, -diff --git a/src/nm-manager.c b/src/nm-manager.c -index 098d00d..da94aac 100644 ---- a/src/nm-manager.c -+++ b/src/nm-manager.c -@@ -261,6 +261,29 @@ NM_DEFINE_SINGLETON_INSTANCE (NMManager); - } \ - } G_STMT_END - -+#define _NMLOG3(level, domain, connection, ...) \ -+ G_STMT_START { \ -+ const NMLogLevel _level = (level); \ -+ const NMLogDomain _domain = (domain); \ -+ \ -+ if (nm_logging_enabled (_level, _domain)) { \ -+ const NMManager *const _self = (self); \ -+ NMConnection *const _connection = (connection); \ -+ const char *const _con_id = _nm_connection_get_id (_connection); \ -+ char _sbuf[32]; \ -+ \ -+ _nm_log (_level, _domain, 0, \ -+ NULL, _nm_connection_get_uuid (_connection), \ -+ "%s%s: %s%s%s" _NM_UTILS_MACRO_FIRST (__VA_ARGS__), \ -+ _NMLOG_PREFIX_NAME, \ -+ ((_self && _self != singleton_instance) \ -+ ? nm_sprintf_buf (_sbuf, "[%p]", _self) \ -+ : ""), \ -+ NM_PRINT_FMT_QUOTED (_con_id, "(", _con_id, ") ", "") \ -+ _NM_UTILS_MACRO_REST (__VA_ARGS__)); \ -+ } \ -+ } G_STMT_END -+ - /*****************************************************************************/ - - static NM_CACHED_QUARK_FCN ("autoconnect-root", autoconnect_root_quark) -@@ -1260,8 +1283,8 @@ system_create_virtual_device (NMManager *self, NMConnection *connection) - - iface = nm_manager_get_connection_iface (self, connection, &parent, &error); - if (!iface) { -- _LOGD (LOGD_DEVICE, "(%s) can't get a name of a virtual device: %s", -- nm_connection_get_id (connection), error->message); -+ _LOG3D (LOGD_DEVICE, connection, "can't get a name of a virtual device: %s", -+ error->message); - g_error_free (error); - return NULL; - } -@@ -1272,8 +1295,8 @@ system_create_virtual_device (NMManager *self, NMConnection *connection) - - if (nm_device_check_connection_compatible (candidate, connection)) { - if (nm_device_is_real (candidate)) { -- _LOGD (LOGD_DEVICE, "(%s) already created virtual interface name %s", -- nm_connection_get_id (connection), iface); -+ _LOG3D (LOGD_DEVICE, connection, "already created virtual interface name %s", -+ iface); - return NULL; - } - -@@ -1287,27 +1310,26 @@ system_create_virtual_device (NMManager *self, NMConnection *connection) - - factory = nm_device_factory_manager_find_factory_for_connection (connection); - if (!factory) { -- _LOGE (LOGD_DEVICE, "(%s:%s) NetworkManager plugin for '%s' unavailable", -- nm_connection_get_id (connection), iface, -+ _LOG3E (LOGD_DEVICE, connection, "(%s) NetworkManager plugin for '%s' unavailable", -+ iface, - nm_connection_get_connection_type (connection)); - return NULL; - } - - device = nm_device_factory_create_device (factory, iface, NULL, connection, NULL, &error); - if (!device) { -- _LOGW (LOGD_DEVICE, "(%s) factory can't create the device: %s", -- nm_connection_get_id (connection), error->message); -+ _LOG3W (LOGD_DEVICE, connection, "factory can't create the device: %s", -+ error->message); - g_error_free (error); - return NULL; - } - -- _LOGD (LOGD_DEVICE, "(%s) create virtual device %s", -- nm_connection_get_id (connection), -+ _LOG3D (LOGD_DEVICE, connection, "create virtual device %s", - nm_device_get_iface (device)); - - if (!add_device (self, device, &error)) { -- _LOGW (LOGD_DEVICE, "(%s) can't register the device with manager: %s", -- nm_connection_get_id (connection), error->message); -+ _LOG3W (LOGD_DEVICE, connection, "can't register the device with manager: %s", -+ error->message); - g_error_free (error); - g_object_unref (device); - return NULL; -@@ -1335,8 +1357,8 @@ system_create_virtual_device (NMManager *self, NMConnection *connection) - - /* Create any backing resources the device needs */ - if (!nm_device_create_and_realize (device, connection, parent, &error)) { -- _LOGW (LOGD_DEVICE, "(%s) couldn't create the device: %s", -- nm_connection_get_id (connection), error->message); -+ _LOG3W (LOGD_DEVICE, connection, "couldn't create the device: %s", -+ error->message); - g_error_free (error); - remove_device (self, device, FALSE, TRUE); - return NULL; --- -2.9.4 - - -From b4dc736b2b6c60324461e128b9f57364d127cc6a Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Wed, 7 Jun 2017 13:13:55 +0200 -Subject: [PATCH 06/10] manager: add "rfkill" prefix to related logging - messages - -(cherry picked from commit dd53c879d2395de667fefb9bd8fc1125b85a7977) -(cherry picked from commit 01fd9df6e589ef623a069cb6c46230ba77ad6b0a) ---- - src/nm-manager.c | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -diff --git a/src/nm-manager.c b/src/nm-manager.c -index da94aac..d7437e6 100644 ---- a/src/nm-manager.c -+++ b/src/nm-manager.c -@@ -1525,7 +1525,7 @@ manager_update_radio_enabled (NMManager *self, - NMDevice *device = NM_DEVICE (iter->data); - - if (nm_device_get_rfkill_type (device) == rstate->rtype) { -- _LOG2D (LOGD_RFKILL, device, "setting radio %s", enabled ? "enabled" : "disabled"); -+ _LOG2D (LOGD_RFKILL, device, "rfkill: setting radio %s", enabled ? "enabled" : "disabled"); - nm_device_set_enabled (device, enabled); - } - } -@@ -1570,14 +1570,14 @@ manager_rfkill_update_one_type (NMManager *self, - - /* Print out all states affecting device enablement */ - if (rstate->desc) { -- _LOGD (LOGD_RFKILL, "%s hw-enabled %d sw-enabled %d", -+ _LOGD (LOGD_RFKILL, "rfkill: %s hw-enabled %d sw-enabled %d", - rstate->desc, rstate->hw_enabled, rstate->sw_enabled); - } - - /* Log new killswitch state */ - new_rfkilled = rstate->hw_enabled && rstate->sw_enabled; - if (old_rfkilled != new_rfkilled) { -- _LOGI (LOGD_RFKILL, "%s now %s by radio killswitch", -+ _LOGI (LOGD_RFKILL, "rfkill: %s now %s by radio killswitch", - rstate->desc, - new_rfkilled ? "enabled" : "disabled"); - } -@@ -4531,7 +4531,7 @@ do_sleep_wake (NMManager *self, gboolean sleeping_changed) - gboolean enabled = radio_enabled_for_rstate (rstate, TRUE); - - if (rstate->desc) { -- _LOGD (LOGD_RFKILL, "%s %s devices (hw_enabled %d, sw_enabled %d, user_enabled %d)", -+ _LOGD (LOGD_RFKILL, "rfkill: %s %s devices (hw_enabled %d, sw_enabled %d, user_enabled %d)", - enabled ? "enabling" : "disabling", - rstate->desc, rstate->hw_enabled, rstate->sw_enabled, rstate->user_enabled); - } -@@ -5128,7 +5128,7 @@ nm_manager_start (NMManager *self, GError **error) - update_rstate_from_rfkill (priv->rfkill_mgr, rstate); - - if (rstate->desc) { -- _LOGI (LOGD_RFKILL, "%s %s by radio killswitch; %s by state file", -+ _LOGI (LOGD_RFKILL, "rfkill: %s %s by radio killswitch; %s by state file", - rstate->desc, - (rstate->hw_enabled && rstate->sw_enabled) ? "enabled" : "disabled", - rstate->user_enabled ? "enabled" : "disabled"); -@@ -5836,12 +5836,12 @@ rfkill_change (NMManager *self, const char *desc, RfKillType rtype, gboolean ena - fd = open ("/dev/rfkill", O_RDWR | O_CLOEXEC); - if (fd < 0) { - if (errno == EACCES) -- _LOGW (LOGD_RFKILL, "(%s): failed to open killswitch device", desc); -+ _LOGW (LOGD_RFKILL, "rfkill: (%s): failed to open killswitch device", desc); - return; - } - - if (fcntl (fd, F_SETFL, O_NONBLOCK) < 0) { -- _LOGW (LOGD_RFKILL, "(%s): failed to set killswitch device for " -+ _LOGW (LOGD_RFKILL, "rfkill: (%s): failed to set killswitch device for " - "non-blocking operation", desc); - close (fd); - return; -@@ -5863,14 +5863,14 @@ rfkill_change (NMManager *self, const char *desc, RfKillType rtype, gboolean ena - - len = write (fd, &event, sizeof (event)); - if (len < 0) { -- _LOGW (LOGD_RFKILL, "(%s): failed to change WiFi killswitch state: (%d) %s", -+ _LOGW (LOGD_RFKILL, "rfkill: (%s): failed to change WiFi killswitch state: (%d) %s", - desc, errno, g_strerror (errno)); - } else if (len == sizeof (event)) { -- _LOGI (LOGD_RFKILL, "%s hardware radio set %s", -+ _LOGI (LOGD_RFKILL, "rfkill: %s hardware radio set %s", - desc, enabled ? "enabled" : "disabled"); - } else { - /* Failed to write full structure */ -- _LOGW (LOGD_RFKILL, "(%s): failed to change WiFi killswitch state", desc); -+ _LOGW (LOGD_RFKILL, "rfkill: (%s): failed to change WiFi killswitch state", desc); - } - - close (fd); -@@ -5889,7 +5889,7 @@ manager_radio_user_toggled (NMManager *self, - return; - - if (rstate->desc) { -- _LOGD (LOGD_RFKILL, "(%s): setting radio %s by user", -+ _LOGD (LOGD_RFKILL, "rfkill: (%s): setting radio %s by user", - rstate->desc, - enabled ? "enabled" : "disabled"); - } --- -2.9.4 - - -From cf805b925c93cae145e354afd0cc05844ec3cd62 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Wed, 7 Jun 2017 13:30:08 +0200 -Subject: [PATCH 07/10] manager: add more logging to - recheck_assume_connection() - -and give all lines a logging prefix. - -(cherry picked from commit 94534e032788e69690c2affcd09d1f306ffa3840) -(cherry picked from commit 7e2d64a8b23e4606f15fc66ebf953d5effb16ac3) ---- - src/nm-manager.c | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - -diff --git a/src/nm-manager.c b/src/nm-manager.c -index d7437e6..3c190eb 100644 ---- a/src/nm-manager.c -+++ b/src/nm-manager.c -@@ -1901,22 +1901,27 @@ recheck_assume_connection (NMManager *self, - - if (!nm_device_get_managed (device, FALSE)) { - nm_device_assume_state_reset (device); -+ _LOG2D (LOGD_DEVICE, device, "assume: don't assume because %s", "not managed"); - return FALSE; - } - - state = nm_device_get_state (device); - if (state > NM_DEVICE_STATE_DISCONNECTED) { - nm_device_assume_state_reset (device); -+ _LOG2D (LOGD_DEVICE, device, "assume: don't assume due to device state %s", -+ nm_device_state_to_str (state)); - return FALSE; - } - - connection = get_existing_connection (self, device, &generated); - if (!connection) { -- _LOG2D (LOGD_DEVICE, device, "can't assume; no connection"); -+ _LOG2D (LOGD_DEVICE, device, "assume: don't assume because %s", "no connection was generated"); - return FALSE; - } - -- _LOG2D (LOGD_DEVICE, device, "will attempt to assume connection"); -+ _LOG2D (LOGD_DEVICE, device, "assume: will attempt to assume %sconnection %s", -+ generated ? "generated " : "", -+ nm_connection_get_uuid (NM_CONNECTION (connection))); - - nm_device_sys_iface_state_set (device, - generated -@@ -1951,7 +1956,7 @@ recheck_assume_connection (NMManager *self, - &error); - - if (!active) { -- _LOGW (LOGD_DEVICE, "assumed connection %s failed to activate: %s", -+ _LOGW (LOGD_DEVICE, "assume: assumed connection %s failed to activate: %s", - nm_connection_get_path (NM_CONNECTION (connection)), - error->message); - g_error_free (error); -@@ -1963,7 +1968,7 @@ recheck_assume_connection (NMManager *self, - } - - if (generated) { -- _LOG2D (LOGD_DEVICE, device, "connection assumption failed. Deleting generated connection"); -+ _LOG2D (LOGD_DEVICE, device, "assume: deleting generated connection after assuming failed"); - nm_settings_connection_delete (connection, NULL, NULL); - } else { - if (nm_device_sys_iface_state_get (device) == NM_DEVICE_SYS_IFACE_STATE_ASSUME) --- -2.9.4 - - -From 7efa2f15760e2ae7e550ad11f0bb49e66748334b Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Wed, 7 Jun 2017 13:44:07 +0200 -Subject: [PATCH 08/10] device: remove logging for emitting RECHECK_ASSUME - signal - -The device's RECHECK_ASSUME signal has only NMManager as subscriber -and it immediately calls recheck_assume_connection(). - -With the previous commit, recheck_assume_connection() always logs -a debug message, so we don't need this duplicate message anymore. - -(cherry picked from commit cc47a6a8b2c16b0ea1df95384b794a2e8d47cfeb) -(cherry picked from commit c254277f409f629fe0b728e9a2f87c418181762d) ---- - src/devices/nm-device.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c -index fdf88c9..36ba9f9 100644 ---- a/src/devices/nm-device.c -+++ b/src/devices/nm-device.c -@@ -4392,10 +4392,9 @@ nm_device_emit_recheck_assume (gpointer user_data) - priv = NM_DEVICE_GET_PRIVATE (self); - - priv->recheck_assume_id = 0; -- if (!nm_device_get_act_request (self)) { -- _LOGD (LOGD_DEVICE, "emit RECHECK_ASSUME signal"); -+ if (!nm_device_get_act_request (self)) - g_signal_emit (self, signals[RECHECK_ASSUME], 0); -- } -+ - return G_SOURCE_REMOVE; - } - --- -2.9.4 - - -From cb7d9f5ed5ccae171712d3cdc109978bb34f5607 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Wed, 7 Jun 2017 16:41:06 +0200 -Subject: [PATCH 09/10] manager: cleanup logging message during - recheck_assume_connection()/get_existing_connection() - -recheck_assume_connection() calls get_existing_connection(). We want *one* logging -message telling what's happening. Let get_existing_connection() log "assume:" -messages and remove duplicate messages from recheck_assume_connection(). - -(cherry picked from commit 962f8f42d9d04eeb794d931ccaad775ca05233e2) -(cherry picked from commit 70b4684d7e975e2ce120e11c27b8d3f7ac2e0cc2) ---- - src/nm-manager.c | 52 ++++++++++++++++++++++++---------------------------- - 1 file changed, 24 insertions(+), 28 deletions(-) - -diff --git a/src/nm-manager.c b/src/nm-manager.c -index 3c190eb..fa220f1 100644 ---- a/src/nm-manager.c -+++ b/src/nm-manager.c -@@ -1744,7 +1744,7 @@ get_existing_connection (NMManager *self, - gboolean *out_generated) - { - NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); -- NMConnection *connection = NULL; -+ gs_unref_object NMConnection *connection = NULL; - NMSettingsConnection *added = NULL; - GError *error = NULL; - NMDevice *master = NULL; -@@ -1766,13 +1766,15 @@ get_existing_connection (NMManager *self, - if (master_ifindex) { - master = nm_manager_get_device_by_ifindex (self, master_ifindex); - if (!master) { -- _LOG2D (LOGD_DEVICE, device, "cannot generate connection for slave before its master (%s/%d)", -- nm_platform_link_get_name (NM_PLATFORM_GET, master_ifindex), master_ifindex); -+ _LOG2D (LOGD_DEVICE, device, "assume: don't assume because " -+ "cannot generate connection for slave before its master (%s/%d)", -+ nm_platform_link_get_name (NM_PLATFORM_GET, master_ifindex), master_ifindex); - return NULL; - } - if (!nm_device_get_act_request (master)) { -- _LOG2D (LOGD_DEVICE, device, "cannot generate connection for slave before master %s activates", -- nm_device_get_iface (master)); -+ _LOG2D (LOGD_DEVICE, device, "assume: don't assume because " -+ "cannot generate connection for slave before master %s activates", -+ nm_device_get_iface (master)); - return NULL; - } - } -@@ -1788,6 +1790,7 @@ get_existing_connection (NMManager *self, - if (!connection) { - if (!maybe_later) - nm_device_assume_state_reset (device); -+ _LOG2D (LOGD_DEVICE, device, "assume: don't assume due to failure to generate connection"); - return NULL; - } - -@@ -1853,38 +1856,36 @@ get_existing_connection (NMManager *self, - } - - if (matched) { -- _LOG2I (LOGD_DEVICE, device, "found matching connection '%s' (%s)%s", -+ _LOG2I (LOGD_DEVICE, device, "assume: will attempt to assume matching connection '%s' (%s)%s", - nm_settings_connection_get_id (matched), - nm_settings_connection_get_uuid (matched), - assume_state_connection_uuid && nm_streq (assume_state_connection_uuid, nm_settings_connection_get_uuid (matched)) - ? " (indicated)" : " (guessed)"); -- g_object_unref (connection); - nm_device_assume_state_reset (device); - return matched; - } - -- _LOG2D (LOGD_DEVICE, device, "generated connection '%s'", -- nm_connection_get_id (connection)); -+ _LOG2D (LOGD_DEVICE, device, "assume: generated connection '%s' (%s)", -+ nm_connection_get_id (connection), -+ nm_connection_get_uuid (connection)); - - nm_device_assume_state_reset (device); - - added = nm_settings_add_connection (priv->settings, connection, FALSE, &error); -- if (added) { -- nm_settings_connection_set_flags (NM_SETTINGS_CONNECTION (added), -- NM_SETTINGS_CONNECTION_FLAGS_NM_GENERATED | -- NM_SETTINGS_CONNECTION_FLAGS_VOLATILE, -- TRUE); -- if (out_generated) -- *out_generated = TRUE; -- } else { -- _LOG2W (LOGD_SETTINGS, device, "Couldn't save generated connection '%s': %s", -+ if (!added) { -+ _LOG2W (LOGD_SETTINGS, device, "assume: failure to save generated connection '%s': %s", - nm_connection_get_id (connection), - error->message); -- g_clear_error (&error); -+ g_error_free (error); -+ return NULL; - } -- g_object_unref (connection); - -- return added ? added : NULL; -+ nm_settings_connection_set_flags (NM_SETTINGS_CONNECTION (added), -+ NM_SETTINGS_CONNECTION_FLAGS_NM_GENERATED | -+ NM_SETTINGS_CONNECTION_FLAGS_VOLATILE, -+ TRUE); -+ NM_SET_OUT (out_generated, TRUE); -+ return added; - } - - static gboolean -@@ -1914,14 +1915,9 @@ recheck_assume_connection (NMManager *self, - } - - connection = get_existing_connection (self, device, &generated); -- if (!connection) { -- _LOG2D (LOGD_DEVICE, device, "assume: don't assume because %s", "no connection was generated"); -+ /* log no reason. get_existing_connection() already does it. */ -+ if (!connection) - return FALSE; -- } -- -- _LOG2D (LOGD_DEVICE, device, "assume: will attempt to assume %sconnection %s", -- generated ? "generated " : "", -- nm_connection_get_uuid (NM_CONNECTION (connection))); - - nm_device_sys_iface_state_set (device, - generated --- -2.9.4 - - -From a0ded04b454b32dfa6a0d3bb357e950941a65684 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Wed, 7 Jun 2017 17:04:33 +0200 -Subject: [PATCH 10/10] device: suppress logging and return error reason from - nm_device_generate_connection() - -Don't log in a function that basically just inspects state, without -mutating it. Instead, pass the reason why a connection could not be -generated to the caller so that we have one sensible log message. - -(cherry picked from commit 0c26ffd638b1db490ae72b105feb697b61fc43cb) -(cherry picked from commit 78ff06c539b36521a82d4d65b573678a1f91b531) ---- - src/devices/nm-device.c | 56 +++++++++++++++++++++++++++---------------------- - src/devices/nm-device.h | 3 ++- - src/nm-manager.c | 6 ++++-- - 3 files changed, 37 insertions(+), 28 deletions(-) - -diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c -index 36ba9f9..246a18f 100644 ---- a/src/devices/nm-device.c -+++ b/src/devices/nm-device.c -@@ -4111,29 +4111,37 @@ nm_device_master_update_slave_connection (NMDevice *self, - } - - NMConnection * --nm_device_generate_connection (NMDevice *self, NMDevice *master, gboolean *out_maybe_later) -+nm_device_generate_connection (NMDevice *self, -+ NMDevice *master, -+ gboolean *out_maybe_later, -+ GError **error) - { - NMDeviceClass *klass = NM_DEVICE_GET_CLASS (self); - NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); - const char *ifname = nm_device_get_iface (self); -- NMConnection *connection; -+ gs_unref_object NMConnection *connection = NULL; - NMSetting *s_con; - NMSetting *s_ip4; - NMSetting *s_ip6; - char uuid[37]; - const char *ip4_method, *ip6_method; -- GError *error = NULL; -+ GError *local = NULL; - const NMPlatformLink *pllink; - - NM_SET_OUT (out_maybe_later, FALSE); - - /* If update_connection() is not implemented, just fail. */ -- if (!klass->update_connection) -+ if (!klass->update_connection) { -+ g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED, -+ "device class %s does not support generating a connection", -+ G_OBJECT_TYPE_NAME (self)); - return NULL; -+ } - - /* Return NULL if device is unconfigured. */ - if (!device_has_config (self)) { -- _LOGD (LOGD_DEVICE, "device has no existing configuration"); -+ g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED, -+ "device has no existing configuration"); - return NULL; - } - -@@ -4156,12 +4164,11 @@ nm_device_generate_connection (NMDevice *self, NMDevice *master, gboolean *out_m - if (!nm_device_master_update_slave_connection (master, - self, - connection, -- &error)) -- { -- _LOGE (LOGD_DEVICE, "master device '%s' failed to update slave connection: %s", -- nm_device_get_iface (master), error->message); -- g_error_free (error); -- g_object_unref (connection); -+ &local)) { -+ g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED, -+ "master device '%s' failed to update slave connection: %s", -+ nm_device_get_iface (master), local->message); -+ g_error_free (local); - return NULL; - } - } else { -@@ -4174,7 +4181,6 @@ nm_device_generate_connection (NMDevice *self, NMDevice *master, gboolean *out_m - - pllink = nm_platform_link_get (nm_device_get_platform (self), priv->ifindex); - if (pllink && pllink->inet6_token.id) { -- _LOGD (LOGD_IP6, "IPv6 tokenized identifier present"); - g_object_set (s_ip6, - NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE, NM_IN6_ADDR_GEN_MODE_EUI64, - NM_SETTING_IP6_CONFIG_TOKEN, nm_utils_inet6_interface_identifier_to_token (pllink->inet6_token, NULL), -@@ -4184,11 +4190,11 @@ nm_device_generate_connection (NMDevice *self, NMDevice *master, gboolean *out_m - - klass->update_connection (self, connection); - -- /* Check the connection in case of update_connection() bug. */ -- if (!nm_connection_verify (connection, &error)) { -- _LOGE (LOGD_DEVICE, "Generated connection does not verify: %s", error->message); -- g_clear_error (&error); -- g_object_unref (connection); -+ if (!nm_connection_verify (connection, &local)) { -+ g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED, -+ "generated connection does not verify: %s", -+ local->message); -+ g_error_free (local); - return NULL; - } - -@@ -4201,28 +4207,28 @@ nm_device_generate_connection (NMDevice *self, NMDevice *master, gboolean *out_m - && g_strcmp0 (ip6_method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) == 0 - && !nm_setting_connection_get_master (NM_SETTING_CONNECTION (s_con)) - && !priv->slaves) { -- _LOGD (LOGD_DEVICE, "ignoring generated connection (no IP and not in master-slave relationship)"); - NM_SET_OUT (out_maybe_later, TRUE); -- g_object_unref (connection); -- connection = NULL; -+ g_set_error_literal (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED, -+ "ignoring generated connection (no IP and not in master-slave relationship)"); -+ return NULL; - } - - /* Ignore any IPv6LL-only, not master connections without slaves, - * unless they are in the assume-ipv6ll-only list. - */ -- if ( connection -- && g_strcmp0 (ip4_method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED) == 0 -+ if ( g_strcmp0 (ip4_method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED) == 0 - && g_strcmp0 (ip6_method, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL) == 0 - && !nm_setting_connection_get_master (NM_SETTING_CONNECTION (s_con)) - && !priv->slaves - && !nm_config_data_get_assume_ipv6ll_only (NM_CONFIG_GET_DATA, self)) { - _LOGD (LOGD_DEVICE, "ignoring generated connection (IPv6LL-only and not in master-slave relationship)"); - NM_SET_OUT (out_maybe_later, TRUE); -- g_object_unref (connection); -- connection = NULL; -+ g_set_error_literal (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED, -+ "ignoring generated connection (IPv6LL-only and not in master-slave relationship)"); -+ return NULL; - } - -- return connection; -+ return g_steal_pointer (&connection); - } - - gboolean -diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h -index 7229fb9..50d9b97 100644 ---- a/src/devices/nm-device.h -+++ b/src/devices/nm-device.h -@@ -498,7 +498,8 @@ gboolean nm_device_has_carrier (NMDevice *dev); - - NMConnection * nm_device_generate_connection (NMDevice *self, - NMDevice *master, -- gboolean *out_maybe_later); -+ gboolean *out_maybe_later, -+ GError **error); - - gboolean nm_device_master_update_slave_connection (NMDevice *master, - NMDevice *slave, -diff --git a/src/nm-manager.c b/src/nm-manager.c -index fa220f1..abcd0ee 100644 ---- a/src/nm-manager.c -+++ b/src/nm-manager.c -@@ -1786,11 +1786,13 @@ get_existing_connection (NMManager *self, - * update_connection() implemented, otherwise nm_device_generate_connection() - * returns NULL. - */ -- connection = nm_device_generate_connection (device, master, &maybe_later); -+ connection = nm_device_generate_connection (device, master, &maybe_later, &error); - if (!connection) { - if (!maybe_later) - nm_device_assume_state_reset (device); -- _LOG2D (LOGD_DEVICE, device, "assume: don't assume due to failure to generate connection"); -+ _LOG2D (LOGD_DEVICE, device, "assume: cannot generate connection: %s", -+ error->message); -+ g_error_free (error); - return NULL; - } - --- -2.9.4 - diff --git a/0026-apply-route-penality-only-with-defroute-rh1459604.patch b/0026-apply-route-penality-only-with-defroute-rh1459604.patch deleted file mode 100644 index fcda129..0000000 --- a/0026-apply-route-penality-only-with-defroute-rh1459604.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 5b1e11d056015e70431f4add8a5efd203d14775f Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Thu, 8 Jun 2017 00:26:00 +0200 -Subject: [PATCH] device: apply route metric penality only when the default - route exists - -It's useless (and in some cases also harmful) to commit the -configuration to update the default route metric when the device has -no default route. Also, don't commit configuration for externally -activated devices. - -https://bugzilla.redhat.com/show_bug.cgi?id=1459604 -(cherry picked from commit aa099906f93264bda3ae34fca4dfbdde5455b2bb) -(cherry picked from commit 6a4774b1a8fdc346e0a2d2a3d2ec43054190fdc5) ---- - src/devices/nm-device.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c -index 6c93a95..e60995d 100644 ---- a/src/devices/nm-device.c -+++ b/src/devices/nm-device.c -@@ -1827,10 +1827,13 @@ update_connectivity_state (NMDevice *self, NMConnectivityState state) - priv->connectivity_state = state; - _notify (self, PROP_CONNECTIVITY); - -- if (nm_device_get_state (self) == NM_DEVICE_STATE_ACTIVATED) { -- if (!ip4_config_merge_and_apply (self, NULL, TRUE)) -+ if ( priv->state == NM_DEVICE_STATE_ACTIVATED -+ && !nm_device_sys_iface_state_is_external (self)) { -+ if ( priv->default_route.v4_has -+ && !ip4_config_merge_and_apply (self, NULL, TRUE)) - _LOGW (LOGD_IP4, "Failed to update IPv4 default route metric"); -- if (!ip6_config_merge_and_apply (self, TRUE)) -+ if ( priv->default_route.v6_has -+ && !ip6_config_merge_and_apply (self, TRUE)) - _LOGW (LOGD_IP6, "Failed to update IPv6 default route metric"); - } - } --- -2.9.3 - diff --git a/0027-cli-fix-interface-overview-rh1460219.patch b/0027-cli-fix-interface-overview-rh1460219.patch deleted file mode 100644 index bfa80a5..0000000 --- a/0027-cli-fix-interface-overview-rh1460219.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 8850e02a3d3b6442c7b0f5e658892e167a74f81d Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Fri, 9 Jun 2017 15:18:20 +0200 -Subject: [PATCH 1/2] cli: fix output of iface in overview output - -Fixes: f14845cc200e21ed3aafadc2f9456cb0e2791f56 - -https://bugzilla.redhat.com/show_bug.cgi?id=1460219 -(cherry picked from commit 126b0874f19fa3647c0343d73dfdb48d6154bc08) -(cherry picked from commit be4e1000e8c88753e9ca0fee38c15712e5c1dd16) ---- - clients/cli/general.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/clients/cli/general.c b/clients/cli/general.c -index 12e76ef..4406c84 100644 ---- a/clients/cli/general.c -+++ b/clients/cli/general.c -@@ -1139,7 +1139,7 @@ device_overview (NmCli *nmc, NMDevice *device) - if ( nm_device_get_ip_iface (device) - && g_strcmp0 (nm_device_get_ip_iface (device), nm_device_get_iface (device)) - && g_strcmp0 (nm_device_get_ip_iface (device), "")) -- g_string_append_printf (outbuf, "%s %s,", _("iface"), nm_device_get_ip_iface (device)); -+ g_string_append_printf (outbuf, "%s %s, ", _("iface"), nm_device_get_ip_iface (device)); - - if (nm_device_get_physical_port_id (device)) - g_string_append_printf (outbuf, "%s %s, ", _("port"), nm_device_get_physical_port_id (device)); --- -2.9.3 - -From d37fefb8b9ee7c6beacf8ea49acbcad83453553d Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Fri, 9 Jun 2017 15:23:44 +0200 -Subject: [PATCH 2/2] cli: minor refactoring of if-condition in device_overview - -Note that nm_device_get_ip_iface() never returns an emptry string "". - -(cherry picked from commit ee5fdcbfb50ec19b82715440e1c45f3c8e6ee5ea) -(cherry picked from commit c9c0a138294819d1c987d420918fa10d18e9a353) ---- - clients/cli/general.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/clients/cli/general.c b/clients/cli/general.c -index 4406c84..68fab6e 100644 ---- a/clients/cli/general.c -+++ b/clients/cli/general.c -@@ -1136,9 +1136,9 @@ device_overview (NmCli *nmc, NMDevice *device) - else - g_string_append_printf (outbuf, "%s, ", _("hw")); - -- if ( nm_device_get_ip_iface (device) -- && g_strcmp0 (nm_device_get_ip_iface (device), nm_device_get_iface (device)) -- && g_strcmp0 (nm_device_get_ip_iface (device), "")) -+ if (!NM_IN_STRSET (nm_device_get_ip_iface (device), -+ NULL, -+ nm_device_get_iface (device))) - g_string_append_printf (outbuf, "%s %s, ", _("iface"), nm_device_get_ip_iface (device)); - - if (nm_device_get_physical_port_id (device)) --- -2.9.3 - diff --git a/0028-ppp-unexport-ppp-manager-on-dispose.patch b/0028-ppp-unexport-ppp-manager-on-dispose.patch deleted file mode 100644 index 36f48eb..0000000 --- a/0028-ppp-unexport-ppp-manager-on-dispose.patch +++ /dev/null @@ -1,526 +0,0 @@ -From 6f9227609de574d1e69154d30025429a78aea4a9 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Wed, 7 Jun 2017 16:09:18 +0200 -Subject: [PATCH 1/8] ppp: cast int argument for variadic - g_signal_emit(NM_PPP_MANAGER_STATE_CHANGE) call - -(cherry picked from commit 7b5251b35c23a625959aac9a1ff617a955b3daa3) -(cherry picked from commit 2aa4239cba745c67c6b4fa165c5c366d51c961a9) ---- - src/ppp/nm-ppp-manager.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/ppp/nm-ppp-manager.c b/src/ppp/nm-ppp-manager.c -index c7836a8..37d7a46 100644 ---- a/src/ppp/nm-ppp-manager.c -+++ b/src/ppp/nm-ppp-manager.c -@@ -365,7 +365,7 @@ impl_ppp_manager_set_state (NMPPPManager *manager, - GDBusMethodInvocation *context, - guint32 state) - { -- g_signal_emit (manager, signals[STATE_CHANGED], 0, state); -+ g_signal_emit (manager, signals[STATE_CHANGED], 0, (guint) state); - - g_dbus_method_invocation_return_value (context, NULL); - } -@@ -692,7 +692,7 @@ ppp_watch_cb (GPid pid, gint status, gpointer user_data) - _LOGD ("pppd pid %d cleaned up", priv->pid); - priv->pid = 0; - priv->ppp_watch_id = 0; -- g_signal_emit (manager, signals[STATE_CHANGED], 0, NM_PPP_STATUS_DEAD); -+ g_signal_emit (manager, signals[STATE_CHANGED], 0, (guint) NM_PPP_STATUS_DEAD); - } - - static gboolean -@@ -704,7 +704,7 @@ pppd_timed_out (gpointer data) - _ppp_cleanup (manager); - _ppp_kill (manager); - -- g_signal_emit (manager, signals[STATE_CHANGED], 0, NM_PPP_STATUS_DEAD); -+ g_signal_emit (manager, signals[STATE_CHANGED], 0, (guint) NM_PPP_STATUS_DEAD); - - return FALSE; - } --- -2.9.3 - -From 7d485d2b0eec62a4b8345e261c958b9e15423220 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Wed, 7 Jun 2017 16:28:18 +0200 -Subject: [PATCH 2/8] ppp: unexport NMPPPManager instance on dispose() - -Let's explicitly unexports on dispose(). Probably that already -happened, because NMExportedObject asserts that it is unexported -during !quitting. - -During quitting, we probably don't tear down the manager. - -Anyway, we should always unexport. - -(cherry picked from commit f07dca941dc327e11c4252688020d5fd0b9b3567) -(cherry picked from commit 5e656b5872e6399d6536e3fb043ca9c63e298774) ---- - src/ppp/nm-ppp-manager.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/ppp/nm-ppp-manager.c b/src/ppp/nm-ppp-manager.c -index 37d7a46..fd0b991 100644 ---- a/src/ppp/nm-ppp-manager.c -+++ b/src/ppp/nm-ppp-manager.c -@@ -1234,8 +1234,12 @@ static void - dispose (GObject *object) - { - NMPPPManager *self = (NMPPPManager *) object; -+ NMExportedObject *exported = NM_EXPORTED_OBJECT (self); - NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (self); - -+ if (nm_exported_object_is_exported (exported)) -+ nm_exported_object_unexport (exported); -+ - _ppp_cleanup (self); - _ppp_kill (self); - --- -2.9.3 - -From ca9bd14f512a060df129da9d490591886ce22ef7 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Fri, 9 Jun 2017 13:57:47 +0200 -Subject: [PATCH 3/8] ppp: inline and drop trivial function - remove_timeout_handler() - -(cherry picked from commit 0f16649ba27942e12c550449cc1669355118890f) -(cherry picked from commit 620adbcc7b2eb630299b9c0595b48e4823ccecde) ---- - src/ppp/nm-ppp-manager.c | 12 ++---------- - 1 file changed, 2 insertions(+), 10 deletions(-) - -diff --git a/src/ppp/nm-ppp-manager.c b/src/ppp/nm-ppp-manager.c -index fd0b991..efaf73a 100644 ---- a/src/ppp/nm-ppp-manager.c -+++ b/src/ppp/nm-ppp-manager.c -@@ -179,14 +179,6 @@ monitor_stats (NMPPPManager *manager) - /*****************************************************************************/ - - static void --remove_timeout_handler (NMPPPManager *manager) --{ -- NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (manager); -- -- nm_clear_g_source (&priv->ppp_timeout_handler); --} -- --static void - cancel_get_secrets (NMPPPManager *self) - { - NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (self); -@@ -415,7 +407,7 @@ impl_ppp_manager_set_ip4_config (NMPPPManager *manager, - - _LOGI ("(IPv4 Config Get) reply received."); - -- remove_timeout_handler (manager); -+ nm_clear_g_source (&priv->ppp_timeout_handler); - - config = nm_ip4_config_new (nm_platform_link_get_ifindex (NM_PLATFORM_GET, priv->ip_iface)); - -@@ -511,7 +503,7 @@ impl_ppp_manager_set_ip6_config (NMPPPManager *manager, - - _LOGI ("(IPv6 Config Get) reply received."); - -- remove_timeout_handler (manager); -+ nm_clear_g_source (&priv->ppp_timeout_handler); - - config = nm_ip6_config_new (nm_platform_link_get_ifindex (NM_PLATFORM_GET, priv->ip_iface)); - --- -2.9.3 - -From 848af80037e21e9cc6bf9459f39f10ad314217eb Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Fri, 9 Jun 2017 14:00:14 +0200 -Subject: [PATCH 4/8] ppp/trivial: fix whitespace - -(cherry picked from commit 5c5fbe0a9f90c53215c70cc7a76ea011560172b8) -(cherry picked from commit 105ef99cbf7f503f05826430df0f8acf1d1f3af9) ---- - src/ppp/nm-ppp-manager.c | 76 ++++++++++++++++++++++++------------------------ - 1 file changed, 38 insertions(+), 38 deletions(-) - -diff --git a/src/ppp/nm-ppp-manager.c b/src/ppp/nm-ppp-manager.c -index efaf73a..558082f 100644 ---- a/src/ppp/nm-ppp-manager.c -+++ b/src/ppp/nm-ppp-manager.c -@@ -595,64 +595,64 @@ ppp_exit_code (guint pppd_exit_status, GPid pid) - const char *msg; - - switch (pppd_exit_status) { -- case 1: -- msg = "Fatal pppd error"; -+ case 1: -+ msg = "Fatal pppd error"; - break; -- case 2: -- msg = "pppd options error"; -+ case 2: -+ msg = "pppd options error"; - break; -- case 3: -- msg = "No root priv error"; -+ case 3: -+ msg = "No root priv error"; - break; -- case 4: -- msg = "No ppp module error"; -+ case 4: -+ msg = "No ppp module error"; - break; -- case 5: -- msg = "pppd received a signal"; -+ case 5: -+ msg = "pppd received a signal"; - break; -- case 6: -- msg = "Serial port lock failed"; -+ case 6: -+ msg = "Serial port lock failed"; - break; -- case 7: -- msg = "Serial port open failed"; -+ case 7: -+ msg = "Serial port open failed"; - break; -- case 8: -- msg = "Connect script failed"; -+ case 8: -+ msg = "Connect script failed"; - break; -- case 9: -- msg = "Pty program error"; -+ case 9: -+ msg = "Pty program error"; - break; -- case 10: -- msg = "PPP negotiation failed"; -+ case 10: -+ msg = "PPP negotiation failed"; - break; -- case 11: -- msg = "Peer didn't authenticatie itself"; -+ case 11: -+ msg = "Peer didn't authenticatie itself"; - break; -- case 12: -- msg = "Link idle: Idle Seconds reached."; -+ case 12: -+ msg = "Link idle: Idle Seconds reached."; - break; -- case 13: -- msg = "Connect time limit reached."; -+ case 13: -+ msg = "Connect time limit reached."; - break; -- case 14: -+ case 14: - msg = "Callback negotiated, call should come back."; - break; -- case 15: -- msg = "Lack of LCP echo responses"; -+ case 15: -+ msg = "Lack of LCP echo responses"; - break; -- case 16: -- msg = "A modem hung up the phone"; -+ case 16: -+ msg = "A modem hung up the phone"; - break; -- case 17: -- msg = "Loopback detected"; -+ case 17: -+ msg = "Loopback detected"; - break; -- case 18: -- msg = "The init script failed"; -+ case 18: -+ msg = "The init script failed"; - break; -- case 19: -+ case 19: - msg = "Authentication error.\n" -- "We failed to authenticate ourselves to the peer.\n" -- "Maybe bad account or password?"; -+ "We failed to authenticate ourselves to the peer.\n" -+ "Maybe bad account or password?"; - break; - default: - msg = "Unknown error"; --- -2.9.3 - -From e2f6a3d1900949971adc1d44eb7c78465c11fb17 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Fri, 9 Jun 2017 14:12:58 +0200 -Subject: [PATCH 5/8] ppp: refactor ppp_exit_code() to split out error to - string conversion - -ppp_exit_code() does too much or too little. Either it should log -about all reasons why pppd exited, including signals, or it should -just do the status to string conversion. Split it. - -(cherry picked from commit 3f64910b5249a8535deffddd0fd574c25b28dcea) -(cherry picked from commit ccda61b6fc0eb90a32ea2a4bc360c82406a26331) ---- - src/ppp/nm-ppp-manager.c | 89 ++++++++++++++---------------------------------- - 1 file changed, 26 insertions(+), 63 deletions(-) - -diff --git a/src/ppp/nm-ppp-manager.c b/src/ppp/nm-ppp-manager.c -index 558082f..d9044a4 100644 ---- a/src/ppp/nm-ppp-manager.c -+++ b/src/ppp/nm-ppp-manager.c -@@ -589,74 +589,37 @@ nm_cmd_line_add_int (NMCmdLine *cmd, int i) - - /*****************************************************************************/ - -+NM_UTILS_LOOKUP_STR_DEFINE_STATIC (pppd_exit_code_to_str, int, -+ NM_UTILS_LOOKUP_DEFAULT ("Unknown error"), -+ NM_UTILS_LOOKUP_STR_ITEM ( 1, "Fatal pppd error"); -+ NM_UTILS_LOOKUP_STR_ITEM ( 2, "pppd options error"), -+ NM_UTILS_LOOKUP_STR_ITEM ( 3, "No root priv error"), -+ NM_UTILS_LOOKUP_STR_ITEM ( 4, "No ppp module error"), -+ NM_UTILS_LOOKUP_STR_ITEM ( 5, "pppd received a signal"), -+ NM_UTILS_LOOKUP_STR_ITEM ( 6, "Serial port lock failed"), -+ NM_UTILS_LOOKUP_STR_ITEM ( 7, "Serial port open failed"), -+ NM_UTILS_LOOKUP_STR_ITEM ( 8, "Connect script failed"), -+ NM_UTILS_LOOKUP_STR_ITEM ( 9, "Pty program error"), -+ NM_UTILS_LOOKUP_STR_ITEM (10, "PPP negotiation failed"), -+ NM_UTILS_LOOKUP_STR_ITEM (11, "Peer didn't authenticatie itself"), -+ NM_UTILS_LOOKUP_STR_ITEM (12, "Link idle: Idle Seconds reached."), -+ NM_UTILS_LOOKUP_STR_ITEM (13, "Connect time limit reached."), -+ NM_UTILS_LOOKUP_STR_ITEM (14, "Callback negotiated, call should come back."), -+ NM_UTILS_LOOKUP_STR_ITEM (15, "Lack of LCP echo responses"), -+ NM_UTILS_LOOKUP_STR_ITEM (16, "A modem hung up the phone"), -+ NM_UTILS_LOOKUP_STR_ITEM (17, "Loopback detected"), -+ NM_UTILS_LOOKUP_STR_ITEM (18, "The init script failed"), -+ NM_UTILS_LOOKUP_STR_ITEM (19, "Authentication error.\n" -+ "We failed to authenticate ourselves to the peer.\n" -+ "Maybe bad account or password?"), -+); -+ - static void - ppp_exit_code (guint pppd_exit_status, GPid pid) - { - const char *msg; - -- switch (pppd_exit_status) { -- case 1: -- msg = "Fatal pppd error"; -- break; -- case 2: -- msg = "pppd options error"; -- break; -- case 3: -- msg = "No root priv error"; -- break; -- case 4: -- msg = "No ppp module error"; -- break; -- case 5: -- msg = "pppd received a signal"; -- break; -- case 6: -- msg = "Serial port lock failed"; -- break; -- case 7: -- msg = "Serial port open failed"; -- break; -- case 8: -- msg = "Connect script failed"; -- break; -- case 9: -- msg = "Pty program error"; -- break; -- case 10: -- msg = "PPP negotiation failed"; -- break; -- case 11: -- msg = "Peer didn't authenticatie itself"; -- break; -- case 12: -- msg = "Link idle: Idle Seconds reached."; -- break; -- case 13: -- msg = "Connect time limit reached."; -- break; -- case 14: -- msg = "Callback negotiated, call should come back."; -- break; -- case 15: -- msg = "Lack of LCP echo responses"; -- break; -- case 16: -- msg = "A modem hung up the phone"; -- break; -- case 17: -- msg = "Loopback detected"; -- break; -- case 18: -- msg = "The init script failed"; -- break; -- case 19: -- msg = "Authentication error.\n" -- "We failed to authenticate ourselves to the peer.\n" -- "Maybe bad account or password?"; -- break; -- default: -- msg = "Unknown error"; -- } -+ msg = pppd_exit_code_to_str (pppd_exit_status); - - _LOGW ("pppd pid %d exited with error: %s", pid, msg); - } --- -2.9.3 - -From b2b6bf1cecc61d82590041aadee52cb9e95064b2 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Fri, 9 Jun 2017 14:13:36 +0200 -Subject: [PATCH 6/8] ppp: don't log newlines - -(cherry picked from commit a814b96ebf02fa88f1a431d0a7459723a3af670d) -(cherry picked from commit 38b5d356de300f717df9c262c4fbf7ea0053aee6) ---- - src/ppp/nm-ppp-manager.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/ppp/nm-ppp-manager.c b/src/ppp/nm-ppp-manager.c -index d9044a4..93660ef 100644 ---- a/src/ppp/nm-ppp-manager.c -+++ b/src/ppp/nm-ppp-manager.c -@@ -609,8 +609,8 @@ NM_UTILS_LOOKUP_STR_DEFINE_STATIC (pppd_exit_code_to_str, int, - NM_UTILS_LOOKUP_STR_ITEM (16, "A modem hung up the phone"), - NM_UTILS_LOOKUP_STR_ITEM (17, "Loopback detected"), - NM_UTILS_LOOKUP_STR_ITEM (18, "The init script failed"), -- NM_UTILS_LOOKUP_STR_ITEM (19, "Authentication error.\n" -- "We failed to authenticate ourselves to the peer.\n" -+ NM_UTILS_LOOKUP_STR_ITEM (19, "Authentication error. " -+ "We failed to authenticate ourselves to the peer. " - "Maybe bad account or password?"), - ); - --- -2.9.3 - -From 13d2ba85f0ea1835cd5b18fe2844d49d0a1f5592 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Fri, 9 Jun 2017 14:19:05 +0200 -Subject: [PATCH 7/8] ppp: cleanup logging pppd exit reason in ppp_watch_cb - -- don't use assert but be more graceful with g_return_if_fail(). -- in case of failure, don't log a debug message after the warning. - One message is sufficient, drop "pppd pid %d cleaned up". -- print GPid type as long long. -- increase log level to warning. pppd dying unexpectedly warrants a - warning. - -(cherry picked from commit 250e7239511f4c8de6831e3c16d8d5f6fac383dc) -(cherry picked from commit b87327a5fea4e80a33849b8ff9735c4b61b9434d) ---- - src/ppp/nm-ppp-manager.c | 36 ++++++++++++++++-------------------- - 1 file changed, 16 insertions(+), 20 deletions(-) - -diff --git a/src/ppp/nm-ppp-manager.c b/src/ppp/nm-ppp-manager.c -index 93660ef..575bf11 100644 ---- a/src/ppp/nm-ppp-manager.c -+++ b/src/ppp/nm-ppp-manager.c -@@ -615,36 +615,32 @@ NM_UTILS_LOOKUP_STR_DEFINE_STATIC (pppd_exit_code_to_str, int, - ); - - static void --ppp_exit_code (guint pppd_exit_status, GPid pid) --{ -- const char *msg; -- -- msg = pppd_exit_code_to_str (pppd_exit_status); -- -- _LOGW ("pppd pid %d exited with error: %s", pid, msg); --} -- --static void --ppp_watch_cb (GPid pid, gint status, gpointer user_data) -+ppp_watch_cb (GPid pid, int status, gpointer user_data) - { - NMPPPManager *manager = NM_PPP_MANAGER (user_data); - NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (manager); -- guint err; -+ int err; -+ const long long lpid = (long long) pid; - -- g_assert (pid == priv->pid); -+ g_return_if_fail (pid == priv->pid); - - if (WIFEXITED (status)) { - err = WEXITSTATUS (status); -- if (err != 0) -- ppp_exit_code (err, priv->pid); -+ if (err) { -+ _LOGW ("pppd pid %lld exited with error %d: %s", -+ lpid, err, -+ pppd_exit_code_to_str (err)); -+ } else -+ _LOGD ("pppd pid %lld exited with success", lpid); - } else if (WIFSTOPPED (status)) { -- _LOGI ("pppd pid %d stopped unexpectedly with signal %d", priv->pid, WSTOPSIG (status)); -+ _LOGW ("pppd pid %lld stopped unexpectedly with signal %d", -+ lpid, WSTOPSIG (status)); - } else if (WIFSIGNALED (status)) { -- _LOGI ("pppd pid %d died with signal %d", priv->pid, WTERMSIG (status)); -+ _LOGW ("pppd pid %lld died with signal %d", -+ lpid, WTERMSIG (status)); - } else -- _LOGI ("pppd pid %d died from an unknown cause", priv->pid); -+ _LOGW ("pppd pid %lld died from an unknown cause", lpid); - -- _LOGD ("pppd pid %d cleaned up", priv->pid); - priv->pid = 0; - priv->ppp_watch_id = 0; - g_signal_emit (manager, signals[STATE_CHANGED], 0, (guint) NM_PPP_STATUS_DEAD); -@@ -971,7 +967,7 @@ _ppp_manager_start (NMPPPManager *manager, - goto out; - } - -- _LOGI ("pppd started with pid %d", priv->pid); -+ _LOGI ("pppd started with pid %lld", (long long) priv->pid); - - priv->ppp_watch_id = g_child_watch_add (priv->pid, (GChildWatchFunc) ppp_watch_cb, manager); - priv->ppp_timeout_handler = g_timeout_add_seconds (timeout_secs, pppd_timed_out, manager); --- -2.9.3 - -From baf5a6b24119671bb8a0edea2fc4830750c16305 Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Fri, 9 Jun 2017 15:11:24 +0200 -Subject: [PATCH 8/8] ppp: fix cancelling timeout when pppd process exits - -Otherwise, we get pppd_timed_out() later, which will -emit a DEAD state change at unexpected times. - -(cherry picked from commit b9af32b056ae7c93b33644b8a24641a86bf66e2c) -(cherry picked from commit 1b954fe09b3b968aa883bba1027f47487ac4808e) ---- - src/ppp/nm-ppp-manager.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/ppp/nm-ppp-manager.c b/src/ppp/nm-ppp-manager.c -index 575bf11..6343df8 100644 ---- a/src/ppp/nm-ppp-manager.c -+++ b/src/ppp/nm-ppp-manager.c -@@ -643,6 +643,7 @@ ppp_watch_cb (GPid pid, int status, gpointer user_data) - - priv->pid = 0; - priv->ppp_watch_id = 0; -+ _ppp_cleanup (manager); - g_signal_emit (manager, signals[STATE_CHANGED], 0, (guint) NM_PPP_STATUS_DEAD); - } - --- -2.9.3 - diff --git a/0029-cli-wifi-spurious-output.patch b/0029-cli-wifi-spurious-output.patch deleted file mode 100644 index 69db5f5..0000000 --- a/0029-cli-wifi-spurious-output.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 7e13e49f15a43f54391380c76f7074bdaa300d03 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Sun, 11 Jun 2017 22:31:43 +0200 -Subject: [PATCH] cli: remove spurious device names from output - -When running one of: - - nmcli device wifi list ifname wlan0 - nmcli device wifi connect ... ifname wlan0 - -nmcli wrongly adds the device name to the output. - -Do the completion only when requested. - -Fixes: 8679793f6b711847d3209ab3cfbd95ab4a2e2488 -Fixes: 1a0dfd31c4af5f3e42b4fc8363a2065d8c5a325b -(cherry picked from commit d2b4332b36686dd5d7382d996743f0ffa1a0fdda) -(cherry picked from commit 73e664e3b15e47b20dcdc92d4cde7f8492069f17) ---- - clients/cli/devices.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/clients/cli/devices.c b/clients/cli/devices.c -index 387edef..50983de 100644 ---- a/clients/cli/devices.c -+++ b/clients/cli/devices.c -@@ -2653,7 +2653,8 @@ do_device_wifi_list (NmCli *nmc, int argc, char **argv) - return NMC_RESULT_ERROR_USER_INPUT; - } - ifname = *argv; -- complete_device (devices, ifname, TRUE); -+ if (argc == 1 && nmc->complete) -+ complete_device (devices, ifname, TRUE); - } else if (strcmp (*argv, "bssid") == 0 || strcmp (*argv, "hwaddr") == 0) { - /* hwaddr is deprecated and will be removed later */ - argc--; -@@ -2900,7 +2901,8 @@ do_device_wifi_connect_network (NmCli *nmc, int argc, char **argv) - goto finish; - } - ifname = *argv; -- complete_device (devices, ifname, TRUE); -+ if (argc == 1 && nmc->complete) -+ complete_device (devices, ifname, TRUE); - } else if (strcmp (*argv, "bssid") == 0) { - argc--; - argv++; --- -2.9.3 - diff --git a/0030-device-mtu-preserve-rh1460760.patch b/0030-device-mtu-preserve-rh1460760.patch deleted file mode 100644 index e09ba79..0000000 --- a/0030-device-mtu-preserve-rh1460760.patch +++ /dev/null @@ -1,135 +0,0 @@ -From a222f7e0554fe8057a6d9c6749acbd066798fa9d Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Tue, 13 Jun 2017 12:26:51 +0200 -Subject: [PATCH 1/1] device: don't set MTU of device unless explicitly - configured - -Since commit 2b51d3967 "device: merge branch 'th/device-mtu-bgo777251'", -we always set the MTU for certain device types during activation. Even -if the MTU is neither specified via the connection nor other means, like -DHCP. - -Revert that change. On activation, if nothing explicitly configures the -MTU, leave it unchanged. This is like what we do with ethernet's -cloned-mac-address, which has a default value "preserve". -So, as last resort the default value for MTU is now 0 (don't change), -instead of depending on the device type. - -Note that you also can override the default value in global -configuration via NetworkManager.conf. - -This behavior makes sense, because whenever NM actively resets the MTU, -it remembers the previous value and restores it when deactivating -the connection. That wasn't implemented before 2b51d3967, and the -MTU would depend on which connection was previously active. That -is no longer an issue as the MTU gets reset when deactivating. - -https://bugzilla.redhat.com/show_bug.cgi?id=1460760 -(cherry picked from commit 4ca3002b86948847711cd5b1937008baef3c30da) -(cherry picked from commit 588841f2e086774420a7ff4452d87e45ffae578a) ---- - man/NetworkManager.conf.xml | 2 +- - src/devices/nm-device-infiniband.c | 2 +- - src/devices/nm-device-ip-tunnel.c | 2 +- - src/devices/nm-device-private.h | 4 ---- - src/devices/nm-device-vlan.c | 2 +- - src/devices/nm-device.c | 2 +- - src/devices/wifi/nm-device-wifi.c | 2 +- - 7 files changed, 6 insertions(+), 10 deletions(-) - -diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml -index 5e76c0ace..71c62cc15 100644 ---- a/man/NetworkManager.conf.xml -+++ b/man/NetworkManager.conf.xml -@@ -655,7 +655,7 @@ ipv6.ip6-privacy=0 - - - ethernet.mtu -- If configured explicitly to 0, the MTU is not reconfigured during device activation unless it is required due to IPv6 constraints. If left unspecified, a DHCP/IPv6 SLAAC provided value is used or a default of 1500. -+ If configured explicitly to 0, the MTU is not reconfigured during device activation unless it is required due to IPv6 constraints. If left unspecified, a DHCP/IPv6 SLAAC provided value is used or the MTU is not reconfigured during activation. - - - ethernet.wake-on-lan -diff --git a/src/devices/nm-device-infiniband.c b/src/devices/nm-device-infiniband.c -index f7875d099..7e0412703 100644 ---- a/src/devices/nm-device-infiniband.c -+++ b/src/devices/nm-device-infiniband.c -@@ -139,7 +139,7 @@ get_configured_mtu (NMDevice *device, gboolean *out_is_user_config) - } - } - *out_is_user_config = (mtu != 0); -- return mtu ?: NM_DEVICE_DEFAULT_MTU_INFINIBAND; -+ return mtu; - } - - static gboolean -diff --git a/src/devices/nm-device-ip-tunnel.c b/src/devices/nm-device-ip-tunnel.c -index 53b7cf4e5..2f505ef4c 100644 ---- a/src/devices/nm-device-ip-tunnel.c -+++ b/src/devices/nm-device-ip-tunnel.c -@@ -767,7 +767,7 @@ get_configured_mtu (NMDevice *self, gboolean *out_is_user_config) - } - } - *out_is_user_config = (mtu != 0); -- return mtu ?: NM_DEVICE_DEFAULT_MTU_WIRED; -+ return mtu; - } - - static NMDeviceCapabilities -diff --git a/src/devices/nm-device-private.h b/src/devices/nm-device-private.h -index a4067f9c2..9eccafdc6 100644 ---- a/src/devices/nm-device-private.h -+++ b/src/devices/nm-device-private.h -@@ -116,10 +116,6 @@ gboolean nm_device_ipv6_sysctl_set (NMDevice *self, const char *property, const - - /*****************************************************************************/ - --#define NM_DEVICE_DEFAULT_MTU_WIRED ((guint32) 1500) --#define NM_DEVICE_DEFAULT_MTU_WIRELESS ((guint32) 1500) --#define NM_DEVICE_DEFAULT_MTU_INFINIBAND ((guint32) 0) -- - gint64 nm_device_get_configured_mtu_from_connection_default (NMDevice *self, - const char *property_name); - -diff --git a/src/devices/nm-device-vlan.c b/src/devices/nm-device-vlan.c -index 06db64465..a74da8f22 100644 ---- a/src/devices/nm-device-vlan.c -+++ b/src/devices/nm-device-vlan.c -@@ -586,7 +586,7 @@ get_configured_mtu (NMDevice *self, gboolean *out_is_user_config) - if (ifindex > 0) - mtu = nm_platform_link_get_mtu (nm_device_get_platform (NM_DEVICE (self)), ifindex); - -- return mtu ?: NM_DEVICE_DEFAULT_MTU_WIRED; -+ return mtu; - } - - /*****************************************************************************/ -diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c -index e60995d57..e37b24bff 100644 ---- a/src/devices/nm-device.c -+++ b/src/devices/nm-device.c -@@ -7150,7 +7150,7 @@ nm_device_get_configured_mtu_for_wired (NMDevice *self, gboolean *out_is_user_co - } - - *out_is_user_config = FALSE; -- return NM_DEVICE_DEFAULT_MTU_WIRED; -+ return 0; - } - - /*****************************************************************************/ -diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c -index 7359be96e..20692ed9e 100644 ---- a/src/devices/wifi/nm-device-wifi.c -+++ b/src/devices/wifi/nm-device-wifi.c -@@ -2742,7 +2742,7 @@ get_configured_mtu (NMDevice *device, gboolean *out_is_user_config) - } - } - *out_is_user_config = (mtu != 0); -- return mtu ?: NM_DEVICE_DEFAULT_MTU_WIRELESS; -+ return mtu; - } - - static gboolean --- -2.13.0 - diff --git a/0031-don-t-remove-ext-ipv4-addresses-rh1459813.patch b/0031-don-t-remove-ext-ipv4-addresses-rh1459813.patch deleted file mode 100644 index e145e89..0000000 --- a/0031-don-t-remove-ext-ipv4-addresses-rh1459813.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 59aa2a26b4a712131b38e155d3c1d70a74183636 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Tue, 13 Jun 2017 14:44:22 +0200 -Subject: [PATCH] core: sort addresses in captured IPv4 configuration - -When IPv4 addresses are synchronized to platform, the order of IPv4 -addresses matters because the first address is considered the primary -one. Thus, nm_ip4_config_capture() should put the primary address as -first, otherwise during synchronization addresses will be removed and -added back with a different primary/secondary role. - -https://bugzilla.redhat.com/show_bug.cgi?id=1459813 -(cherry picked from commit b6fa87a4c07c968614d123750be47a74de62f04d) -(cherry picked from commit 9819ffe7d42f08bb082ae2d9e125a7dd3bfe6420) ---- - src/nm-ip4-config.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/src/nm-ip4-config.c b/src/nm-ip4-config.c -index 20532e8..ae6af9c 100644 ---- a/src/nm-ip4-config.c -+++ b/src/nm-ip4-config.c -@@ -248,6 +248,16 @@ notify_addresses (NMIP4Config *self) - _notify (self, PROP_ADDRESSES); - } - -+static gint -+sort_captured_addresses (gconstpointer a, gconstpointer b) -+{ -+ const NMPlatformIP4Address *addr_a = a, *addr_b = b; -+ -+ /* Primary addresses first */ -+ return NM_FLAGS_HAS (addr_a->n_ifa_flags, IFA_F_SECONDARY) - -+ NM_FLAGS_HAS (addr_b->n_ifa_flags, IFA_F_SECONDARY); -+} -+ - NMIP4Config * - nm_ip4_config_capture (NMPlatform *platform, int ifindex, gboolean capture_resolv_conf) - { -@@ -269,6 +279,8 @@ nm_ip4_config_capture (NMPlatform *platform, int ifindex, gboolean capture_resol - g_array_unref (priv->routes); - - priv->addresses = nm_platform_ip4_address_get_all (platform, ifindex); -+ g_array_sort (priv->addresses, sort_captured_addresses); -+ - priv->routes = nm_platform_ip4_route_get_all (platform, ifindex, NM_PLATFORM_GET_ROUTE_FLAGS_WITH_DEFAULT | NM_PLATFORM_GET_ROUTE_FLAGS_WITH_NON_DEFAULT); - - /* Extract gateway from default route */ --- -2.9.3 - diff --git a/NetworkManager.spec b/NetworkManager.spec index ecae27f..d8b8bcd 100644 --- a/NetworkManager.spec +++ b/NetworkManager.spec @@ -7,9 +7,9 @@ %global glib2_version %(pkg-config --modversion glib-2.0 2>/dev/null || echo bad) %global epoch_version 1 -%global rpm_version 1.8.0 -%global real_version 1.8.0 -%global release_version 6 +%global rpm_version 1.8.2 +%global real_version 1.8.2 +%global release_version 1 %global snapshot %{nil} %global git_sha %{nil} @@ -82,36 +82,7 @@ Source1: NetworkManager.conf Source2: 00-server.conf Source3: 20-connectivity-fedora.conf -Patch2: 0002-utils-fix-maybe-uninitialized-in-nm-udev-utils.c.patch -Patch3: 0003-fix-device-run-state-unknown-rh1440171.patch -Patch4: 0004-proxy-crash-rh1450459.patch -Patch5: 0005-device-fix-wait-carrier-rh1450444.patch -Patch6: 0006-dhcp-don-t-add-route-to-DHCP4-server-rh1448987.patch -Patch7: 0007-device-update-ext-conf-before-commit-rh1449873.patch -Patch8: 0008-utf8safe-fixes-rh1443114.patch -Patch9: 0009-ifcfg-rh-fix-null-next-hop.patch -Patch10: 0010-bluetooth-nap-crash-rh1454385.patch -Patch11: 0011-device-release-removed-slaves-rh1448907.patch -Patch12: 0012-config-slaves-order-rh1452585.patch -Patch13: 0013-nmcli-fix-8021x-password-raw-rh1456362.patch -Patch14: 0014-translations-rh1382625.patch -Patch15: 0015-ifcfg-rh-legacy-netmask-rh1445414.patch -Patch16: 0016-tui-connect-crash-rh1456826.patch -Patch17: 0017-libnm-fix-reject-vlan-id-4095-rh1456911.patch -Patch18: 0018-periodic-connectivity-check-rh1458399.patch -Patch19: 0019-bond-improve-option-matching-rh1457909.patch -Patch20: 0020-device-fix-external-assume-rh1457242.patch -Patch21: 0021-bond-crash-mode-rh1459580.patch -Patch22: 0022-connectivity-ip-iface-check-rh1459932.patch -Patch23: 0023-persist-nm-owned-in-device-state-rh1376199.patch -Patch24: 0024-fix-delayed-assume-master-rh1452062.patch -Patch25: 0025-improve-logging-assume-rh1452062.patch -Patch26: 0026-apply-route-penality-only-with-defroute-rh1459604.patch -Patch27: 0027-cli-fix-interface-overview-rh1460219.patch -Patch28: 0028-ppp-unexport-ppp-manager-on-dispose.patch -Patch29: 0029-cli-wifi-spurious-output.patch -Patch30: 0030-device-mtu-preserve-rh1460760.patch -Patch31: 0031-don-t-remove-ext-ipv4-addresses-rh1459813.patch +#Patch1: Requires(post): systemd Requires(preun): systemd @@ -366,36 +337,7 @@ by nm-connection-editor and nm-applet in a non-graphical environment. %prep %setup -q -n NetworkManager-%{real_version} -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 -%patch20 -p1 -%patch21 -p1 -%patch22 -p1 -%patch23 -p1 -%patch24 -p1 -%patch25 -p1 -%patch26 -p1 -%patch27 -p1 -%patch28 -p1 -%patch29 -p1 -%patch30 -p1 -%patch31 -p1 +#%patch1 -p1 %build %if %{with regen_docs} @@ -708,6 +650,9 @@ fi %endif %changelog +* Mon Jul 17 2017 Beniamino Galvani - 1:1.8.2-1 +- Update to 1.8.2 release + * Thu Jun 22 2017 Lubomir Rintel - 1:1.8.0-6 - device: don't change MTU unless explicitly configured (rh #1460760) - core: don't remove external IPv4 addresses (rh #1459813) diff --git a/sources b/sources index 017e698..9917a82 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (NetworkManager-1.8.0.tar.xz) = 1f261a9bbba1013ec7ac88672f2ebdfdb9447874eb711ccfa7383534f003f37aabbcddb51aa868e14cec1d76c33d33a99d681a3858ea6239112fe6fce81a9c6c +SHA512 (NetworkManager-1.8.2.tar.xz) = 7bebea66d8f494c052313224e9d5b1b4cf665482f07ee5d93defc3543f32296545a2d1097ab1fff27dbebb58e07a4bc47fbc0101163db92953ae66ac9b95524d