Update to 1.10.2 release
This commit is contained in:
parent
2b734c644d
commit
2f601f9c53
1
.gitignore
vendored
1
.gitignore
vendored
@ -340,3 +340,4 @@ network-manager-applet-0.8.1.tar.bz2
|
||||
/NetworkManager-1.8.0.tar.xz
|
||||
/NetworkManager-1.8.2.tar.xz
|
||||
/NetworkManager-1.8.4.tar.xz
|
||||
/NetworkManager-1.10.2.tar.xz
|
||||
|
@ -1,34 +0,0 @@
|
||||
From 69f05c50c5b6ef960a8dcc5790bba4a916180a71 Mon Sep 17 00:00:00 2001
|
||||
From: Iain Lane <iain@orangesquash.org.uk>
|
||||
Date: Wed, 20 Sep 2017 15:01:41 +0100
|
||||
Subject: [PATCH 1/3] manager: Disconnect from signals on the proxy when we're
|
||||
disposed
|
||||
|
||||
We're calling a callback on a proxy after it has been disposed. We
|
||||
should make sure to disconnect from it when we go away.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=787897
|
||||
(cherry picked from commit 91fa202379b417f146c9b14be7b9b08d2dc83a78)
|
||||
(cherry picked from commit 297862b0e9a6b08e506a9976f2e464f68ba398d2)
|
||||
---
|
||||
libnm/nm-manager.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libnm/nm-manager.c b/libnm/nm-manager.c
|
||||
index d3df73375..294b9de18 100644
|
||||
--- a/libnm/nm-manager.c
|
||||
+++ b/libnm/nm-manager.c
|
||||
@@ -192,8 +192,8 @@ init_dbus (NMObject *object)
|
||||
property_info);
|
||||
|
||||
/* Permissions */
|
||||
- g_signal_connect (priv->proxy, "check-permissions",
|
||||
- G_CALLBACK (manager_recheck_permissions), object);
|
||||
+ g_signal_connect_object (priv->proxy, "check-permissions",
|
||||
+ G_CALLBACK (manager_recheck_permissions), object, 0);
|
||||
}
|
||||
|
||||
static NMClientPermission
|
||||
--
|
||||
2.13.6
|
||||
|
@ -1,78 +0,0 @@
|
||||
From b4f7cca1a3ee02d86ceec4fcea51a9ed349248b6 Mon Sep 17 00:00:00 2001
|
||||
From: Iain Lane <iain@orangesquash.org.uk>
|
||||
Date: Fri, 22 Sep 2017 11:48:05 +0100
|
||||
Subject: [PATCH 2/3] {vpn,remote}-connection: disconnect signal handlers when
|
||||
disposed
|
||||
|
||||
GNOME Settings 3.26 is crashing every time a VPN connection changed its
|
||||
state. After some digging, a debug message was put on dispose, and this
|
||||
issue was found:
|
||||
|
||||
libnm-Message: Object 0x55555633c070 disposed
|
||||
libnm-Message: Object 0x55555633c730 disposed
|
||||
libnm-Message: Object 0x55555633eae0 disposed
|
||||
libnm-Message: Object 0x555556340a80 disposed
|
||||
|
||||
Thread 1 "gnome-control-c" received signal SIGSEGV, Segmentation fault.
|
||||
g_type_check_instance_cast (type_instance=type_instance@entry=0x55555633c070, iface_type=93825006537856) at /.../glib/gobject/gtype.c:4057
|
||||
4057 node = lookup_type_node_I (type_instance->g_class->g_type);
|
||||
(gdb) bt
|
||||
|
||||
NetworkManager is calling callbacks on disposed objects, which leads to
|
||||
crashes in clients (e.g. GNOME Settings).
|
||||
|
||||
Fix this issue by disconnecting signal handlers when the objects are
|
||||
disposed.
|
||||
|
||||
Patch originally by Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=787893
|
||||
(cherry picked from commit b18896f77048399e7a8b6ddd4fa0961e603836fa)
|
||||
(cherry picked from commit b363a6cfad5996b5436b6f7c1d9337068fcb4c99)
|
||||
---
|
||||
libnm/nm-remote-connection.c | 6 +++---
|
||||
libnm/nm-vpn-connection.c | 4 ++--
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/libnm/nm-remote-connection.c b/libnm/nm-remote-connection.c
|
||||
index 0f7ea58ef..5cd42555f 100644
|
||||
--- a/libnm/nm-remote-connection.c
|
||||
+++ b/libnm/nm-remote-connection.c
|
||||
@@ -641,7 +641,7 @@ init_sync (GInitable *initable, GCancellable *cancellable, GError **error)
|
||||
GVariant *settings;
|
||||
|
||||
priv->proxy = NMDBUS_SETTINGS_CONNECTION (_nm_object_get_proxy (NM_OBJECT (initable), NM_DBUS_INTERFACE_SETTINGS_CONNECTION));
|
||||
- g_signal_connect (priv->proxy, "updated", G_CALLBACK (updated_cb), initable);
|
||||
+ g_signal_connect_object (priv->proxy, "updated", G_CALLBACK (updated_cb), initable, 0);
|
||||
|
||||
if (nmdbus_settings_connection_call_get_settings_sync (priv->proxy,
|
||||
&settings,
|
||||
@@ -730,8 +730,8 @@ init_async (GAsyncInitable *initable, int io_priority,
|
||||
priv->proxy = NMDBUS_SETTINGS_CONNECTION (_nm_object_get_proxy (NM_OBJECT (initable),
|
||||
NM_DBUS_INTERFACE_SETTINGS_CONNECTION));
|
||||
|
||||
- g_signal_connect (priv->proxy, "updated",
|
||||
- G_CALLBACK (updated_cb), initable);
|
||||
+ g_signal_connect_object (priv->proxy, "updated",
|
||||
+ G_CALLBACK (updated_cb), initable, 0);
|
||||
|
||||
nmdbus_settings_connection_call_get_settings (NM_REMOTE_CONNECTION_GET_PRIVATE (init_data->initable)->proxy,
|
||||
init_data->cancellable,
|
||||
diff --git a/libnm/nm-vpn-connection.c b/libnm/nm-vpn-connection.c
|
||||
index 814f45f0f..636c39507 100644
|
||||
--- a/libnm/nm-vpn-connection.c
|
||||
+++ b/libnm/nm-vpn-connection.c
|
||||
@@ -144,8 +144,8 @@ init_dbus (NMObject *object)
|
||||
property_info);
|
||||
|
||||
proxy = _nm_object_get_proxy (object, NM_DBUS_INTERFACE_VPN_CONNECTION);
|
||||
- g_signal_connect (proxy, "vpn-state-changed",
|
||||
- G_CALLBACK (vpn_state_changed_proxy), object);
|
||||
+ g_signal_connect_object (proxy, "vpn-state-changed",
|
||||
+ G_CALLBACK (vpn_state_changed_proxy), object, 0);
|
||||
g_object_unref (proxy);
|
||||
}
|
||||
|
||||
--
|
||||
2.13.6
|
||||
|
@ -1,31 +0,0 @@
|
||||
From fad0790a27d693d02c4b8404f9327608a838b8e6 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Haller <thaller@redhat.com>
|
||||
Date: Mon, 25 Sep 2017 12:15:30 +0200
|
||||
Subject: [PATCH 3/3] cli: fix crash in interactive mode for "describe ."
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=788104
|
||||
(cherry picked from commit 54490be96d77ac2e34d247b58265dd393f5acba7)
|
||||
(cherry picked from commit b18ff17d3d4495722745c701826880bf14672827)
|
||||
---
|
||||
clients/cli/connections.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/clients/cli/connections.c b/clients/cli/connections.c
|
||||
index a93dc15fc..fac1227b7 100644
|
||||
--- a/clients/cli/connections.c
|
||||
+++ b/clients/cli/connections.c
|
||||
@@ -7387,7 +7387,10 @@ editor_menu_main (NmCli *nmc, NMConnection *connection)
|
||||
} else
|
||||
ss = menu_ctx.curr_setting;
|
||||
|
||||
- if (descr_all) {
|
||||
+ if (!ss) {
|
||||
+ g_print (_("Error: no setting selected; valid are [%s]\n"), valid_settings_str);
|
||||
+ g_print (_("use 'goto <setting>' first, or 'describe <setting>.<property>'\n"));
|
||||
+ } else if (descr_all) {
|
||||
/* Show description for all properties */
|
||||
print_setting_description (ss);
|
||||
} else {
|
||||
--
|
||||
2.13.6
|
||||
|
@ -1,37 +0,0 @@
|
||||
From 613a88779bf424c9bcae20ccd9c4c04574f37554 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Haller <thaller@redhat.com>
|
||||
Date: Fri, 29 Sep 2017 17:08:55 +0200
|
||||
Subject: [PATCH 4/5] device: fix delay startup complete for unrealized devices
|
||||
|
||||
Since commit 6845b9b80a9fcec9d2c9e7b56a37329f38089f2e ("device: delay
|
||||
startup complete until device is initialized in platform", we also wait
|
||||
for devices that are still initializing platform/UDEV.
|
||||
|
||||
Obviously, that only applies to realized devices.
|
||||
|
||||
Otherwise, an unrealized device is going to block startup complete.
|
||||
|
||||
Fixes: 6845b9b80a9fcec9d2c9e7b56a37329f38089f2e
|
||||
(cherry picked from commit 9ad8010fe0c42291580e4a801ed85947ae660d38)
|
||||
(cherry picked from commit 0ba498b17dc582dcbd9b7102e03496f391d67812)
|
||||
---
|
||||
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 bacbfb33e..a085e466d 100644
|
||||
--- a/src/devices/nm-device.c
|
||||
+++ b/src/devices/nm-device.c
|
||||
@@ -12030,7 +12030,8 @@ nm_device_has_pending_action (NMDevice *self)
|
||||
if (priv->pending_actions)
|
||||
return TRUE;
|
||||
|
||||
- if (nm_device_get_unmanaged_flags (self, NM_UNMANAGED_PLATFORM_INIT)) {
|
||||
+ if ( nm_device_is_real (self)
|
||||
+ && nm_device_get_unmanaged_flags (self, NM_UNMANAGED_PLATFORM_INIT)) {
|
||||
/* as long as the platform link is not yet initialized, we have a pending
|
||||
* action. */
|
||||
return TRUE;
|
||||
--
|
||||
2.13.6
|
||||
|
@ -1,40 +0,0 @@
|
||||
From 7d99bbea013d9f01d764e3394b77f1f709047129 Mon Sep 17 00:00:00 2001
|
||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
||||
Date: Wed, 4 Oct 2017 14:30:57 +0200
|
||||
Subject: [PATCH 5/5] device: fix frozen notify signals on unrealize error path
|
||||
|
||||
If unrealize() failed we returned without thawing notify signals. Fix
|
||||
this by moving g_object_freeze_notify() after the
|
||||
unrealization/deletion but before the properties are reset in
|
||||
unrealize_notify().
|
||||
|
||||
Fixes: a93807c288743f499362f7edfe0674020762811c
|
||||
(cherry picked from commit 24a7f88bc56b66745c1e6b9444df8a80125de059)
|
||||
(cherry picked from commit 5bd8269315fc7d41c62e258689a05bf062c6f592)
|
||||
---
|
||||
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 a085e466d..6321d2b49 100644
|
||||
--- a/src/devices/nm-device.c
|
||||
+++ b/src/devices/nm-device.c
|
||||
@@ -3257,7 +3257,6 @@ nm_device_unrealize (NMDevice *self, gboolean remove_resources, GError **error)
|
||||
g_return_val_if_fail (priv->iface != NULL, FALSE);
|
||||
g_return_val_if_fail (priv->real, FALSE);
|
||||
|
||||
- g_object_freeze_notify (G_OBJECT (self));
|
||||
|
||||
ifindex = nm_device_get_ifindex (self);
|
||||
|
||||
@@ -3274,6 +3273,7 @@ nm_device_unrealize (NMDevice *self, gboolean remove_resources, GError **error)
|
||||
}
|
||||
}
|
||||
|
||||
+ g_object_freeze_notify (G_OBJECT (self));
|
||||
NM_DEVICE_GET_CLASS (self)->unrealize_notify (self);
|
||||
|
||||
_parent_set_ifindex (self, 0, FALSE);
|
||||
--
|
||||
2.13.6
|
||||
|
@ -1,325 +0,0 @@
|
||||
From 5c5876732c51adcf0e1973021bc26a663b240ec9 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Haller <thaller@redhat.com>
|
||||
Date: Wed, 4 Oct 2017 11:14:48 +0200
|
||||
Subject: [PATCH 6/8] keyfile: minor cleanup in get_one_int() to use
|
||||
_nm_utils_ascii_str_to_int64()
|
||||
|
||||
(cherry picked from commit 72c28cb6bcc26e6a63083e4d92f8f66ee5c121e4)
|
||||
(cherry picked from commit 14f0f23e77219364c0ee7ae692aae35551101ed8)
|
||||
---
|
||||
libnm-core/nm-keyfile-reader.c | 11 +++++------
|
||||
1 file changed, 5 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/libnm-core/nm-keyfile-reader.c b/libnm-core/nm-keyfile-reader.c
|
||||
index eb257eeb1..15a0e406f 100644
|
||||
--- a/libnm-core/nm-keyfile-reader.c
|
||||
+++ b/libnm-core/nm-keyfile-reader.c
|
||||
@@ -133,8 +133,7 @@ read_array_of_uint (GKeyFile *file,
|
||||
static gboolean
|
||||
get_one_int (KeyfileReaderInfo *info, const char *property_name, const char *str, guint32 max_val, guint32 *out)
|
||||
{
|
||||
- long tmp;
|
||||
- char *endptr;
|
||||
+ gint64 tmp;
|
||||
|
||||
g_return_val_if_fail (!info == !property_name, FALSE);
|
||||
|
||||
@@ -145,13 +144,13 @@ get_one_int (KeyfileReaderInfo *info, const char *property_name, const char *str
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
- errno = 0;
|
||||
- tmp = strtol (str, &endptr, 10);
|
||||
- if (errno || (tmp < 0) || (tmp > max_val) || *endptr != 0) {
|
||||
- if (property_name)
|
||||
+ tmp = _nm_utils_ascii_str_to_int64 (str, 10, 0, max_val, -1);
|
||||
+ if (tmp == -1) {
|
||||
+ if (property_name) {
|
||||
handle_warn (info, property_name, NM_KEYFILE_WARN_SEVERITY_WARN,
|
||||
_("ignoring invalid number '%s'"),
|
||||
str);
|
||||
+ }
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
--
|
||||
2.13.6
|
||||
|
||||
|
||||
From e843259d6a13e9219cf151432ed3794246c7d067 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Haller <thaller@redhat.com>
|
||||
Date: Wed, 4 Oct 2017 11:16:36 +0200
|
||||
Subject: [PATCH 7/8] keyfile: cleanup error argument for read_field()
|
||||
|
||||
Rename @error to @out_err_str, because @error is usually used for GError
|
||||
output arguments.
|
||||
|
||||
Also, make the string variables "const char *".
|
||||
|
||||
Use nm_assert() in read_field(), because it is a static function
|
||||
with only four call sites. It's easily verified that the assertion
|
||||
holds, so no need for a run-time check in production builds.
|
||||
|
||||
(cherry picked from commit 29e9b567f0938fd202a433e7098092f0a39723ed)
|
||||
(cherry picked from commit f889aa783d776afa200587b5891e3578a3033518)
|
||||
---
|
||||
libnm-core/nm-keyfile-reader.c | 58 ++++++++++++++++++++++++------------------
|
||||
1 file changed, 33 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/libnm-core/nm-keyfile-reader.c b/libnm-core/nm-keyfile-reader.c
|
||||
index 15a0e406f..5934c833b 100644
|
||||
--- a/libnm-core/nm-keyfile-reader.c
|
||||
+++ b/libnm-core/nm-keyfile-reader.c
|
||||
@@ -249,17 +249,17 @@ build_route (KeyfileReaderInfo *info,
|
||||
* When @current target is %NULL, gracefully fail returning %NULL while
|
||||
* leaving the @current target %NULL end setting @error to %NULL;
|
||||
*/
|
||||
-static char *
|
||||
-read_field (char **current, char **error, const char *characters, const char *delimiters)
|
||||
+static const char *
|
||||
+read_field (char **current, const char **out_err_str, const char *characters, const char *delimiters)
|
||||
{
|
||||
- char *start;
|
||||
+ const char *start;
|
||||
|
||||
- g_return_val_if_fail (current, NULL);
|
||||
- g_return_val_if_fail (error, NULL);
|
||||
- g_return_val_if_fail (characters, NULL);
|
||||
- g_return_val_if_fail (delimiters, NULL);
|
||||
+ nm_assert (current);
|
||||
+ nm_assert (out_err_str);
|
||||
+ nm_assert (characters);
|
||||
+ nm_assert (delimiters);
|
||||
|
||||
- *error = NULL;
|
||||
+ *out_err_str = NULL;
|
||||
|
||||
if (!*current) {
|
||||
/* graceful failure, leave '*current' NULL */
|
||||
@@ -282,8 +282,8 @@ read_field (char **current, char **error, const char *characters, const char *de
|
||||
return start;
|
||||
} else {
|
||||
/* error, bad character */
|
||||
- *error = *current;
|
||||
- *current = start;
|
||||
+ *out_err_str = *current;
|
||||
+ *current = (char *) start;
|
||||
return NULL;
|
||||
}
|
||||
else {
|
||||
@@ -332,42 +332,50 @@ read_one_ip_address_or_route (KeyfileReaderInfo *info,
|
||||
char **out_gateway,
|
||||
NMSetting *setting)
|
||||
{
|
||||
- guint32 plen = G_MAXUINT32;
|
||||
+ guint plen;
|
||||
gpointer result;
|
||||
- char *address_str, *plen_str, *gateway_str, *metric_str, *current, *error;
|
||||
- gs_free char *value = NULL, *value_orig = NULL;
|
||||
+ const char *address_str;
|
||||
+ const char *plen_str;
|
||||
+ const char *gateway_str;
|
||||
+ const char *metric_str;
|
||||
+ const char *err_str = NULL;
|
||||
+ char *current;
|
||||
+ gs_free char *value = NULL;
|
||||
+ gs_free char *value_orig = NULL;
|
||||
|
||||
#define VALUE_ORIG() (value_orig ? value_orig : (value_orig = nm_keyfile_plugin_kf_get_string (info->keyfile, setting_name, key_name, NULL)))
|
||||
|
||||
- current = value = nm_keyfile_plugin_kf_get_string (info->keyfile, setting_name, key_name, NULL);
|
||||
+ value = nm_keyfile_plugin_kf_get_string (info->keyfile, setting_name, key_name, NULL);
|
||||
if (!value)
|
||||
return NULL;
|
||||
|
||||
+ current = value;
|
||||
+
|
||||
/* get address field */
|
||||
- address_str = read_field (¤t, &error, IP_ADDRESS_CHARS, DELIMITERS);
|
||||
- if (error) {
|
||||
+ address_str = read_field (¤t, &err_str, IP_ADDRESS_CHARS, DELIMITERS);
|
||||
+ if (err_str) {
|
||||
handle_warn (info, property_name, NM_KEYFILE_WARN_SEVERITY_WARN,
|
||||
_("unexpected character '%c' for address %s: '%s' (position %td)"),
|
||||
- *error, key_name, VALUE_ORIG (), error - current);
|
||||
+ *err_str, key_name, VALUE_ORIG (), err_str - current);
|
||||
return NULL;
|
||||
}
|
||||
/* get prefix length field (skippable) */
|
||||
- plen_str = read_field (¤t, &error, DIGITS, DELIMITERS);
|
||||
+ plen_str = read_field (¤t, &err_str, DIGITS, DELIMITERS);
|
||||
/* get gateway field */
|
||||
- gateway_str = read_field (¤t, &error, IP_ADDRESS_CHARS, DELIMITERS);
|
||||
- if (error) {
|
||||
+ gateway_str = read_field (¤t, &err_str, IP_ADDRESS_CHARS, DELIMITERS);
|
||||
+ if (err_str) {
|
||||
handle_warn (info, property_name, NM_KEYFILE_WARN_SEVERITY_WARN,
|
||||
_("unexpected character '%c' for %s: '%s' (position %td)"),
|
||||
- *error, key_name, VALUE_ORIG (), error - current);
|
||||
+ *err_str, key_name, VALUE_ORIG (), err_str - current);
|
||||
return NULL;
|
||||
}
|
||||
/* for routes, get metric */
|
||||
if (route) {
|
||||
- metric_str = read_field (¤t, &error, DIGITS, DELIMITERS);
|
||||
- if (error) {
|
||||
+ metric_str = read_field (¤t, &err_str, DIGITS, DELIMITERS);
|
||||
+ if (err_str) {
|
||||
handle_warn (info, property_name, NM_KEYFILE_WARN_SEVERITY_WARN,
|
||||
_("unexpected character '%c' in prefix length for %s: '%s' (position %td)"),
|
||||
- *error, key_name, VALUE_ORIG (), error - current);
|
||||
+ *err_str, key_name, VALUE_ORIG (), err_str - current);
|
||||
return NULL;
|
||||
}
|
||||
} else
|
||||
@@ -393,7 +401,7 @@ read_one_ip_address_or_route (KeyfileReaderInfo *info,
|
||||
|
||||
/* parse plen, fallback to defaults */
|
||||
if (plen_str) {
|
||||
- if (!get_one_int (info, property_name, plen_str, ipv6 ? 128 : 32, &plen)
|
||||
+ if ( !get_one_int (info, property_name, plen_str, ipv6 ? 128 : 32, &plen)
|
||||
|| (route && plen == 0)) {
|
||||
plen = DEFAULT_PREFIX (route, ipv6);
|
||||
if ( info->error
|
||||
--
|
||||
2.13.6
|
||||
|
||||
|
||||
From 0a76ddaad11baec08ab0826a5d635fa5b158c6e4 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Haller <thaller@redhat.com>
|
||||
Date: Wed, 4 Oct 2017 11:28:15 +0200
|
||||
Subject: [PATCH 8/8] keyfile: fix reading/writing route metric zero
|
||||
|
||||
Zero is a valid route metric and distinct from -1, which means unspecified.
|
||||
Fix reader and writer.
|
||||
|
||||
Fixes: e374923bbe4a9f608644756f749b9bae9aa5f349
|
||||
(cherry picked from commit 099be8e4db0b00d4ff3ded60a4a3cb65d55bbd40)
|
||||
(cherry picked from commit 482fcb507e0b7d611701d9537321cdc6d58d3b84)
|
||||
---
|
||||
libnm-core/nm-keyfile-reader.c | 15 +++++++++------
|
||||
libnm-core/nm-keyfile-writer.c | 12 +++++++-----
|
||||
src/settings/plugins/keyfile/tests/test-keyfile.c | 6 +++---
|
||||
3 files changed, 19 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/libnm-core/nm-keyfile-reader.c b/libnm-core/nm-keyfile-reader.c
|
||||
index 5934c833b..0ac417cdb 100644
|
||||
--- a/libnm-core/nm-keyfile-reader.c
|
||||
+++ b/libnm-core/nm-keyfile-reader.c
|
||||
@@ -185,7 +185,8 @@ build_route (KeyfileReaderInfo *info,
|
||||
const char *gateway_str, const char *metric_str)
|
||||
{
|
||||
NMIPRoute *route;
|
||||
- guint32 metric = 0;
|
||||
+ guint32 u32;
|
||||
+ gint64 metric = -1;
|
||||
GError *error = NULL;
|
||||
|
||||
g_return_val_if_fail (plen, NULL);
|
||||
@@ -204,9 +205,10 @@ build_route (KeyfileReaderInfo *info,
|
||||
**/
|
||||
if ( family == AF_INET6
|
||||
&& !metric_str
|
||||
- && get_one_int (NULL, NULL, gateway_str, G_MAXUINT32, &metric))
|
||||
+ && get_one_int (NULL, NULL, gateway_str, G_MAXUINT32, &u32)) {
|
||||
+ metric = u32;
|
||||
gateway_str = NULL;
|
||||
- else {
|
||||
+ } else {
|
||||
if (!info->error) {
|
||||
handle_warn (info, property_name, NM_KEYFILE_WARN_SEVERITY_WARN,
|
||||
_("ignoring invalid gateway '%s' for %s route"),
|
||||
@@ -218,14 +220,15 @@ build_route (KeyfileReaderInfo *info,
|
||||
} else
|
||||
gateway_str = NULL;
|
||||
|
||||
- /* parse metric, default to 0 */
|
||||
+ /* parse metric, default to -1 */
|
||||
if (metric_str) {
|
||||
- if (!get_one_int (info, property_name, metric_str, G_MAXUINT32, &metric))
|
||||
+ if (!get_one_int (info, property_name, metric_str, G_MAXUINT32, &u32))
|
||||
return NULL;
|
||||
+ metric = u32;
|
||||
}
|
||||
|
||||
route = nm_ip_route_new (family, dest_str, plen, gateway_str,
|
||||
- metric ? (gint64) metric : -1,
|
||||
+ metric,
|
||||
&error);
|
||||
if (!route) {
|
||||
handle_warn (info, property_name, NM_KEYFILE_WARN_SEVERITY_WARN,
|
||||
diff --git a/libnm-core/nm-keyfile-writer.c b/libnm-core/nm-keyfile-writer.c
|
||||
index 6a3d9a9f4..19b734a05 100644
|
||||
--- a/libnm-core/nm-keyfile-writer.c
|
||||
+++ b/libnm-core/nm-keyfile-writer.c
|
||||
@@ -137,7 +137,7 @@ write_ip_values (GKeyFile *file,
|
||||
GString *output;
|
||||
int family, i;
|
||||
const char *addr, *gw;
|
||||
- guint32 plen, metric;
|
||||
+ guint32 plen;
|
||||
char key_name[64], *key_name_idx;
|
||||
|
||||
if (!array->len)
|
||||
@@ -150,25 +150,27 @@ write_ip_values (GKeyFile *file,
|
||||
|
||||
output = g_string_sized_new (2*INET_ADDRSTRLEN + 10);
|
||||
for (i = 0; i < array->len; i++) {
|
||||
+ gint64 metric = -1;
|
||||
+
|
||||
if (is_route) {
|
||||
NMIPRoute *route = array->pdata[i];
|
||||
|
||||
addr = nm_ip_route_get_dest (route);
|
||||
plen = nm_ip_route_get_prefix (route);
|
||||
gw = nm_ip_route_get_next_hop (route);
|
||||
- metric = MAX (0, nm_ip_route_get_metric (route));
|
||||
+ metric = nm_ip_route_get_metric (route);
|
||||
} else {
|
||||
NMIPAddress *address = array->pdata[i];
|
||||
|
||||
addr = nm_ip_address_get_address (address);
|
||||
plen = nm_ip_address_get_prefix (address);
|
||||
gw = i == 0 ? gateway : NULL;
|
||||
- metric = 0;
|
||||
}
|
||||
|
||||
g_string_set_size (output, 0);
|
||||
g_string_append_printf (output, "%s/%u", addr, plen);
|
||||
- if (metric || gw) {
|
||||
+ if ( metric != -1
|
||||
+ || gw) {
|
||||
/* Older versions of the plugin do not support the form
|
||||
* "a.b.c.d/plen,,metric", so, we always have to write the
|
||||
* gateway, even if there isn't one.
|
||||
@@ -182,7 +184,7 @@ write_ip_values (GKeyFile *file,
|
||||
}
|
||||
|
||||
g_string_append_printf (output, ",%s", gw);
|
||||
- if (metric)
|
||||
+ if (is_route && metric != -1)
|
||||
g_string_append_printf (output, ",%lu", (unsigned long) metric);
|
||||
}
|
||||
|
||||
diff --git a/src/settings/plugins/keyfile/tests/test-keyfile.c b/src/settings/plugins/keyfile/tests/test-keyfile.c
|
||||
index d9da53173..2584a7229 100644
|
||||
--- a/src/settings/plugins/keyfile/tests/test-keyfile.c
|
||||
+++ b/src/settings/plugins/keyfile/tests/test-keyfile.c
|
||||
@@ -312,11 +312,11 @@ test_read_valid_wired_connection (void)
|
||||
check_ip_route (s_ip4, 3, "1.1.1.3", 13, NULL, -1);
|
||||
check_ip_route (s_ip4, 4, "1.1.1.4", 14, "2.2.2.4", -1);
|
||||
check_ip_route (s_ip4, 5, "1.1.1.5", 15, "2.2.2.5", -1);
|
||||
- check_ip_route (s_ip4, 6, "1.1.1.6", 16, "2.2.2.6", -1);
|
||||
+ check_ip_route (s_ip4, 6, "1.1.1.6", 16, "2.2.2.6", 0);
|
||||
check_ip_route (s_ip4, 7, "1.1.1.7", 17, NULL, -1);
|
||||
check_ip_route (s_ip4, 8, "1.1.1.8", 18, NULL, -1);
|
||||
- check_ip_route (s_ip4, 9, "1.1.1.9", 19, NULL, -1);
|
||||
- check_ip_route (s_ip4, 10, "1.1.1.10", 20, NULL, -1);
|
||||
+ check_ip_route (s_ip4, 9, "1.1.1.9", 19, NULL, 0);
|
||||
+ check_ip_route (s_ip4, 10, "1.1.1.10", 20, NULL, 0);
|
||||
check_ip_route (s_ip4, 11, "1.1.1.11", 21, NULL, 21);
|
||||
|
||||
/* Route attributes */
|
||||
--
|
||||
2.13.6
|
||||
|
@ -1,29 +0,0 @@
|
||||
From 51c7520752d09c2d3a5c7e19b9a5d86b889ed456 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Thu, 5 Oct 2017 22:35:25 +0200
|
||||
Subject: [PATCH] platform: treat dsa devices as regular wired ethernet
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1371289
|
||||
(cherry picked from commit 5c2ee8b26e540e0afaae2063d6e6121f9dce7c7f)
|
||||
---
|
||||
src/platform/nm-linux-platform.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
|
||||
index 6b84c185f..8b59cec45 100644
|
||||
--- a/src/platform/nm-linux-platform.c
|
||||
+++ b/src/platform/nm-linux-platform.c
|
||||
@@ -762,6 +762,10 @@ _linktype_get_type (NMPlatform *platform,
|
||||
* aside from the DEVTYPE. */
|
||||
if (!g_strcmp0 (devtype, "gadget"))
|
||||
return NM_LINK_TYPE_ETHERNET;
|
||||
+
|
||||
+ /* Distributed Switch Architecture switch chips */
|
||||
+ if (!g_strcmp0 (devtype, "dsa"))
|
||||
+ return NM_LINK_TYPE_ETHERNET;
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.13.6
|
||||
|
@ -1,43 +0,0 @@
|
||||
From e9bdc531b64c5603b0c3a5a6e784122b8be1e8ef Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Haller <thaller@redhat.com>
|
||||
Date: Thu, 2 Nov 2017 15:14:18 +0100
|
||||
Subject: [PATCH 1/1] systemd: let "NetworkManager-wait-online.service" require
|
||||
"NetworkManager.service"
|
||||
|
||||
`systemctl start network-online.target` should suffice to start
|
||||
"NetworkManager.service".
|
||||
|
||||
That would work because
|
||||
- "network-online.target" has "Wants=NetworkManager-wait-online.service"
|
||||
- "NetworkManager-wait-online.service" has "Require=NetworkManager.service".
|
||||
|
||||
But previously, "NetworkManager-wait-online.service" would just
|
||||
fail with missing dependency.
|
||||
|
||||
See also https://github.com/systemd/systemd/pull/6065 which does the
|
||||
same for networkd's wait-online serice, and see rh#1452866 for a
|
||||
use-case.
|
||||
|
||||
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1452866
|
||||
(cherry picked from commit 28b97f02f64ecf94e22c8929dfd0ba64151bd9d3)
|
||||
(cherry picked from commit eeedf51f087d1cd6c5c4b79f7299b6060d28024f)
|
||||
---
|
||||
data/NetworkManager-wait-online.service.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/data/NetworkManager-wait-online.service.in b/data/NetworkManager-wait-online.service.in
|
||||
index 1753d2039..896324685 100644
|
||||
--- a/data/NetworkManager-wait-online.service.in
|
||||
+++ b/data/NetworkManager-wait-online.service.in
|
||||
@@ -1,7 +1,7 @@
|
||||
[Unit]
|
||||
Description=Network Manager Wait Online
|
||||
Documentation=man:nm-online(1)
|
||||
-Requisite=NetworkManager.service
|
||||
+Requires=NetworkManager.service
|
||||
After=NetworkManager.service
|
||||
Before=network-online.target
|
||||
|
||||
--
|
||||
2.13.6
|
||||
|
@ -1,57 +0,0 @@
|
||||
From a3900f1ab74a7ff17f87ed3485af2cd327fee091 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Wed, 1 Nov 2017 21:29:39 +0100
|
||||
Subject: [PATCH 1/1] libnm/client: proxy *_enabled and metered properties to
|
||||
the right object
|
||||
|
||||
They're provided by the Manager, not by the RemoteSettings.
|
||||
|
||||
(cherry picked from commit c81005b84650b8e6d709ce6afda96fb55987cdb8)
|
||||
(cherry picked from commit 34035ceee8e75d8cb7deb6f4aa211067bddcfe97)
|
||||
---
|
||||
libnm/nm-client.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libnm/nm-client.c b/libnm/nm-client.c
|
||||
index c8707f50e..4d7931756 100644
|
||||
--- a/libnm/nm-client.c
|
||||
+++ b/libnm/nm-client.c
|
||||
@@ -2630,7 +2630,7 @@ get_property (GObject *object, guint prop_id,
|
||||
break;
|
||||
case PROP_WIRELESS_HARDWARE_ENABLED:
|
||||
if (priv->manager)
|
||||
- g_object_get_property (G_OBJECT (priv->settings), pspec->name, value);
|
||||
+ g_object_get_property (G_OBJECT (priv->manager), pspec->name, value);
|
||||
else
|
||||
g_value_set_boolean (value, FALSE);
|
||||
break;
|
||||
@@ -2639,7 +2639,7 @@ get_property (GObject *object, guint prop_id,
|
||||
break;
|
||||
case PROP_WWAN_HARDWARE_ENABLED:
|
||||
if (priv->manager)
|
||||
- g_object_get_property (G_OBJECT (priv->settings), pspec->name, value);
|
||||
+ g_object_get_property (G_OBJECT (priv->manager), pspec->name, value);
|
||||
else
|
||||
g_value_set_boolean (value, FALSE);
|
||||
break;
|
||||
@@ -2648,7 +2648,7 @@ get_property (GObject *object, guint prop_id,
|
||||
break;
|
||||
case PROP_WIMAX_HARDWARE_ENABLED:
|
||||
if (priv->manager)
|
||||
- g_object_get_property (G_OBJECT (priv->settings), pspec->name, value);
|
||||
+ g_object_get_property (G_OBJECT (priv->manager), pspec->name, value);
|
||||
else
|
||||
g_value_set_boolean (value, FALSE);
|
||||
break;
|
||||
@@ -2669,7 +2669,7 @@ get_property (GObject *object, guint prop_id,
|
||||
break;
|
||||
case PROP_METERED:
|
||||
if (priv->manager)
|
||||
- g_object_get_property (G_OBJECT (priv->settings), pspec->name, value);
|
||||
+ g_object_get_property (G_OBJECT (priv->manager), pspec->name, value);
|
||||
else
|
||||
g_value_set_uint (value, NM_METERED_UNKNOWN);
|
||||
break;
|
||||
--
|
||||
2.13.6
|
||||
|
@ -7,9 +7,9 @@
|
||||
%global glib2_version %(pkg-config --modversion glib-2.0 2>/dev/null || echo bad)
|
||||
|
||||
%global epoch_version 1
|
||||
%global rpm_version 1.8.4
|
||||
%global real_version 1.8.4
|
||||
%global release_version 7
|
||||
%global rpm_version 1.10.2
|
||||
%global real_version 1.10.2
|
||||
%global release_version 1
|
||||
%global snapshot %{nil}
|
||||
%global git_sha %{nil}
|
||||
|
||||
@ -41,6 +41,7 @@
|
||||
%bcond_without wwan
|
||||
%bcond_without team
|
||||
%bcond_without wifi
|
||||
%bcond_without ovs
|
||||
%bcond_without ppp
|
||||
%bcond_without nmtui
|
||||
%bcond_without regen_docs
|
||||
@ -85,15 +86,6 @@ Source2: 00-server.conf
|
||||
Source3: 20-connectivity-fedora.conf
|
||||
|
||||
#Patch1: 0001-some.patch
|
||||
Patch1: 0001-manager-Disconnect-from-signals-on-the-proxy-when-we.patch
|
||||
Patch2: 0002-vpn-remote-connection-disconnect-signal-handlers-whe.patch
|
||||
Patch3: 0003-cli-fix-crash-in-interactive-mode-for-describe.patch
|
||||
Patch4: 0004-device-fix-delay-startup-complete-for-unrealized-dev.patch
|
||||
Patch5: 0005-device-fix-frozen-notify-signals-on-unrealize-error-.patch
|
||||
Patch6: 0006-keyfile-route-metric-zero-fix.patch
|
||||
Patch7: 0007-platform-treat-dsa-devices-as-regular-wired-ethernet.patch
|
||||
Patch8: 0008-systemd-let-NetworkManager-wait-online.service-requi.patch
|
||||
Patch9: 0009-libnm-client-proxy-_enabled-and-metered-properties-t.patch
|
||||
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
@ -239,6 +231,19 @@ This package contains NetworkManager support for mobile broadband (WWAN)
|
||||
devices.
|
||||
%endif
|
||||
|
||||
|
||||
%if %{with ovs}
|
||||
%package ovs
|
||||
Summary: OpenVSwitch device plugin for NetworkManager
|
||||
Group: System Environment/Base
|
||||
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
|
||||
Requires: openvswitch
|
||||
|
||||
%description ovs
|
||||
This package contains NetworkManager support for OpenVSwitch bridges.
|
||||
%endif
|
||||
|
||||
|
||||
%if %{with ppp}
|
||||
%package ppp
|
||||
Summary: PPP plugin for NetworkManager
|
||||
@ -349,15 +354,6 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
|
||||
%setup -q -n NetworkManager-%{real_version}
|
||||
|
||||
#%patch1 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
|
||||
%build
|
||||
%if %{with regen_docs}
|
||||
@ -369,6 +365,7 @@ intltoolize --automake --copy --force
|
||||
--disable-static \
|
||||
--with-dhclient=yes \
|
||||
--with-dhcpcd=no \
|
||||
--with-dhcpcanon=no \
|
||||
--with-config-dhcp-default=dhclient \
|
||||
--with-crypto=nss \
|
||||
%if %{with test}
|
||||
@ -418,6 +415,11 @@ intltoolize --automake --copy --force
|
||||
--enable-teamdctl=yes \
|
||||
%else
|
||||
--enable-teamdctl=no \
|
||||
%endif
|
||||
%if %{with ovs}
|
||||
--enable-ovs=yes \
|
||||
%else
|
||||
--enable-ovs=no \
|
||||
%endif
|
||||
--with-selinux=yes \
|
||||
--enable-polkit=yes \
|
||||
@ -561,7 +563,7 @@ fi
|
||||
%dir %{nmlibdir}/VPN
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man5/*
|
||||
%{_mandir}/man7/*
|
||||
%{_mandir}/man7/nmcli-examples.7*
|
||||
%{_mandir}/man8/*
|
||||
%dir %{_localstatedir}/lib/NetworkManager
|
||||
%dir %{_sysconfdir}/NetworkManager/system-connections
|
||||
@ -606,6 +608,13 @@ fi
|
||||
%{_libdir}/%{name}/libnm-wwan.so
|
||||
%endif
|
||||
|
||||
%if %{with ovs}
|
||||
%files ovs
|
||||
%{_libdir}/%{name}/libnm-device-plugin-ovs.so
|
||||
%{systemd_dir}/NetworkManager.service.d/NetworkManager-ovs.conf
|
||||
%{_mandir}/man7/nm-openvswitch.7*
|
||||
%endif
|
||||
|
||||
%if %{with ppp}
|
||||
%files ppp
|
||||
%{_libdir}/pppd/%{ppp_version}/nm-pppd-plugin.so
|
||||
@ -687,15 +696,18 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Dec 15 2017 Thomas Haller <thaller@redhat.com> - 1:1.10.2-1
|
||||
- Update to 1.10.2 release
|
||||
|
||||
* Fri Nov 17 2017 Björn Esser <besser82@fedoraproject.org> - 1:1.8.4-7
|
||||
- Apply patch from previous commit
|
||||
|
||||
* Mon Nov 2 2017 Thomas Haller <thaller@redhat.com> - 1:1.8.4-6
|
||||
* Thu Nov 2 2017 Thomas Haller <thaller@redhat.com> - 1:1.8.4-6
|
||||
- systemd: let NM-w-o.service require NetworkManager service (rh #1452866)
|
||||
- platform: really treat dsa devices as regular wired ethernet (rh #1371289)
|
||||
- libnm: fix accessing enabled and metered properties
|
||||
|
||||
* Mon Oct 8 2017 Lubomir Rintel <lkundrak@v3.sk> - 1:1.8.4-5
|
||||
* Mon Oct 9 2017 Lubomir Rintel <lkundrak@v3.sk> - 1:1.8.4-5
|
||||
- platform: treat dsa devices as regular wired ethernet (rh #1371289)
|
||||
|
||||
* Thu Oct 5 2017 Thomas Haller <thaller@redhat.com> - 1:1.8.4-4
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (NetworkManager-1.8.4.tar.xz) = e9aa26e2abe4537c6cbba53e281493e32be8a9f0624d5323212848f286d1279ad2ab79a39de34ad0ea188c888b1b61c4ba4d4d053c4d227e68f9236955f69bb1
|
||||
SHA512 (NetworkManager-1.10.2.tar.xz) = bc372b334120bc62ce4d9f78baf9f46a880fe6fa24181bcefe71eb1c67868c32edb4c5b323e63aa720284b13189a0704e0b3d13a2c6e6a9be72e5bfb6bca9072
|
||||
|
Loading…
Reference in New Issue
Block a user