Update to 1.8.2 release
This commit is contained in:
parent
a2ab3fed9e
commit
8ca68d8c30
1
.gitignore
vendored
1
.gitignore
vendored
@ -338,3 +338,4 @@ network-manager-applet-0.8.1.tar.bz2
|
|||||||
/NetworkManager-1.7.91.tar.xz
|
/NetworkManager-1.7.91.tar.xz
|
||||||
/NetworkManager-1.7.92.tar.xz
|
/NetworkManager-1.7.92.tar.xz
|
||||||
/NetworkManager-1.8.0.tar.xz
|
/NetworkManager-1.8.0.tar.xz
|
||||||
|
/NetworkManager-1.8.2.tar.xz
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
From 1ea56b82121d3f024859da41337cf2406e7f2e61 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Haller <thaller@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,140 +0,0 @@
|
|||||||
From f2d099c8c534ee426dbc31a3a61fcf27c18b92d8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Haller <thaller@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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 <mbiebl@debian.org>
|
|
||||||
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
|
|
||||||
|
|
@ -1,65 +0,0 @@
|
|||||||
From 4bf6a4dd5b73fcea36fcfa4a97091665b233bc15 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Haller <thaller@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,586 +0,0 @@
|
|||||||
From fde61a81ee3ff70c85aed230bcfda79f2fb70ea8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Haller <thaller@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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 <trace>.
|
|
||||||
|
|
||||||
(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 <thaller@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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 <DOWN;broadcast,multicast> mtu ...
|
|
||||||
...
|
|
||||||
device[0x7f90c29c64d0] (eth0): bringing up device
|
|
||||||
...
|
|
||||||
platform: signal: link changed: 2: eth0 <UP,LOWER_UP;broadcast,multicast,up,running,lowerup> 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
|
|
||||||
|
|
@ -1,85 +0,0 @@
|
|||||||
From bed605f5bd8524779b3cf3d3e02baf06a76f4054 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,165 +0,0 @@
|
|||||||
From b870115d83ddb2f7091e7b5e1f65b64261c53557 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
||||||
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 <bgalvani@redhat.com>
|
|
||||||
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=<optimized out>) 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 <bgalvani@redhat.com>
|
|
||||||
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=<optimized out>) 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=<optimized out>, argv=<optimized out>) 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
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,140 +0,0 @@
|
|||||||
From a3d2153b90f3f56f1548d01be674a0ab5e82e6b7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
|||||||
From 7851f1c5958599bfe38beac806cec1f42f1ba114 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
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 <lkundrak@v3.sk>
|
|
||||||
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
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
|||||||
From 74b53f2f40e8656be5599a1fcd23f737dcf18bc3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,225 +0,0 @@
|
|||||||
From 5231db02204ce3c45e2415eedbd915fa56445401 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
||||||
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=*
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
+ <varlistentry>
|
|
||||||
+ <term><varname>slaves-order</varname></term>
|
|
||||||
+ <listitem>
|
|
||||||
+ <para>
|
|
||||||
+ This key specifies in which order slave connections are
|
|
||||||
+ auto-activated on boot or when the master activates
|
|
||||||
+ them. Allowed values are <literal>name</literal> (order
|
|
||||||
+ connection by interface name, the default), or
|
|
||||||
+ <literal>index</literal> (order slaves by their kernel
|
|
||||||
+ index).
|
|
||||||
+ </para>
|
|
||||||
+ </listitem>
|
|
||||||
+ </varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
@ -1,121 +0,0 @@
|
|||||||
From c10c09d54b7e38dae1c73be0c5b3c7e01ac57315 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,721 +0,0 @@
|
|||||||
From 3757404ab4d14fcd6e61b367c37308ef1e3dbc3a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Haller <thaller@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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 <name>, 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 <thaller@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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<n>, PREFIX<n>, GATEWAY<n> for current IP addresses
|
|
||||||
* without labels. Unset obsolete NETMASK<n>.
|
|
||||||
@@ -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<n..255>, 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
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
|||||||
From c710b2bf095e9301066d33a13e8a406f0d134b2f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Arnaud Lefebvre <a.lefebvre@outlook.fr>
|
|
||||||
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
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
|||||||
From 2522c3be75c94d6285c6b514f404edea20f4807e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Haller <thaller@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,147 +0,0 @@
|
|||||||
From 2d4555ec97d2cb0829106cbff82753bd168e5a20 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Haller <thaller@redhat.com>
|
|
||||||
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 <fgiudici@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,252 +0,0 @@
|
|||||||
From 8c6f8c65955d18ca9b43ad2bcd1bccf2cd85e7ed Mon Sep 17 00:00:00 2001
|
|
||||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
||||||
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 <bgalvani@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
|||||||
From b905393348574d8a363fe3fac4afb2fe6b03cfc0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Haller <thaller@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
|||||||
From 27b3757b5beecc9fcd98ce3a1acbc50431c204cb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
From 1e8d7050a7d115faf78c1a7531195358c9919bf0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,510 +0,0 @@
|
|||||||
From ffa247f2a2a70e9484ddb46c8dc66a1a7183ef55 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
||||||
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 <bgalvani@redhat.com>
|
|
||||||
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 <bgalvani@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,536 +0,0 @@
|
|||||||
From 72e544c7eca495d0857d0710cc77161cd3b145d0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Haller <thaller@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,42 +0,0 @@
|
|||||||
From 5b1e11d056015e70431f4add8a5efd203d14775f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
|||||||
From 8850e02a3d3b6442c7b0f5e658892e167a74f81d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Haller <thaller@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,526 +0,0 @@
|
|||||||
From 6f9227609de574d1e69154d30025429a78aea4a9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Haller <thaller@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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 <thaller@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
From 7e13e49f15a43f54391380c76f7074bdaa300d03 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,135 +0,0 @@
|
|||||||
From a222f7e0554fe8057a6d9c6749acbd066798fa9d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Haller <thaller@redhat.com>
|
|
||||||
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
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><varname>ethernet.mtu</varname></term>
|
|
||||||
- <listitem><para>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.</para></listitem>
|
|
||||||
+ <listitem><para>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.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><varname>ethernet.wake-on-lan</varname></term>
|
|
||||||
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
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
|||||||
From 59aa2a26b4a712131b38e155d3c1d70a74183636 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -7,9 +7,9 @@
|
|||||||
%global glib2_version %(pkg-config --modversion glib-2.0 2>/dev/null || echo bad)
|
%global glib2_version %(pkg-config --modversion glib-2.0 2>/dev/null || echo bad)
|
||||||
|
|
||||||
%global epoch_version 1
|
%global epoch_version 1
|
||||||
%global rpm_version 1.8.0
|
%global rpm_version 1.8.2
|
||||||
%global real_version 1.8.0
|
%global real_version 1.8.2
|
||||||
%global release_version 6
|
%global release_version 1
|
||||||
%global snapshot %{nil}
|
%global snapshot %{nil}
|
||||||
%global git_sha %{nil}
|
%global git_sha %{nil}
|
||||||
|
|
||||||
@ -82,36 +82,7 @@ Source1: NetworkManager.conf
|
|||||||
Source2: 00-server.conf
|
Source2: 00-server.conf
|
||||||
Source3: 20-connectivity-fedora.conf
|
Source3: 20-connectivity-fedora.conf
|
||||||
|
|
||||||
Patch2: 0002-utils-fix-maybe-uninitialized-in-nm-udev-utils.c.patch
|
#Patch1:
|
||||||
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
|
|
||||||
|
|
||||||
Requires(post): systemd
|
Requires(post): systemd
|
||||||
Requires(preun): systemd
|
Requires(preun): systemd
|
||||||
@ -366,36 +337,7 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n NetworkManager-%{real_version}
|
%setup -q -n NetworkManager-%{real_version}
|
||||||
|
|
||||||
%patch2 -p1
|
#%patch1 -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
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{with regen_docs}
|
%if %{with regen_docs}
|
||||||
@ -708,6 +650,9 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 17 2017 Beniamino Galvani <bgalvani@redhat.com> - 1:1.8.2-1
|
||||||
|
- Update to 1.8.2 release
|
||||||
|
|
||||||
* Thu Jun 22 2017 Lubomir Rintel <lkundrak@v3.sk> - 1:1.8.0-6
|
* Thu Jun 22 2017 Lubomir Rintel <lkundrak@v3.sk> - 1:1.8.0-6
|
||||||
- device: don't change MTU unless explicitly configured (rh #1460760)
|
- device: don't change MTU unless explicitly configured (rh #1460760)
|
||||||
- core: don't remove external IPv4 addresses (rh #1459813)
|
- core: don't remove external IPv4 addresses (rh #1459813)
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (NetworkManager-1.8.0.tar.xz) = 1f261a9bbba1013ec7ac88672f2ebdfdb9447874eb711ccfa7383534f003f37aabbcddb51aa868e14cec1d76c33d33a99d681a3858ea6239112fe6fce81a9c6c
|
SHA512 (NetworkManager-1.8.2.tar.xz) = 7bebea66d8f494c052313224e9d5b1b4cf665482f07ee5d93defc3543f32296545a2d1097ab1fff27dbebb58e07a4bc47fbc0101163db92953ae66ac9b95524d
|
||||||
|
Loading…
Reference in New Issue
Block a user