Fix two incorrect assertion bugs causing NetworkManager crashes
This commit is contained in:
parent
2c85ca4d0d
commit
8b454ba75e
68
0008-bgo739436-vpn-service-assert-fix.patch
Normal file
68
0008-bgo739436-vpn-service-assert-fix.patch
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
From d1d5196fd45c939d0d91d4a34b63e20b4b12bc34 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||||
|
Date: Sun, 9 Nov 2014 12:38:38 +0100
|
||||||
|
Subject: [PATCH 1/2] vpn: propagate daemon exec error correctly (bgo #739436)
|
||||||
|
|
||||||
|
NetworkManager[31624]: <warn> VPN service 'openvpn': could not launch the VPN service. error: (8) Failed to execute child process "/usr/local/libexec/nm-openvpn-service" (No such file or directory).
|
||||||
|
**
|
||||||
|
NetworkManager:ERROR:nm-manager.c:3094:_activation_auth_done: assertion failed: (error)
|
||||||
|
|
||||||
|
https://bugzilla.gnome.org/show_bug.cgi?id=739436
|
||||||
|
|
||||||
|
(cherry picked from commit 282d9b0e10c08dcda4a1d082b15dc2bdda8ee3d2)
|
||||||
|
---
|
||||||
|
src/vpn-manager/nm-vpn-service.c | 10 +++++-----
|
||||||
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/vpn-manager/nm-vpn-service.c b/src/vpn-manager/nm-vpn-service.c
|
||||||
|
index 824543f..64eb78b 100644
|
||||||
|
--- a/src/vpn-manager/nm-vpn-service.c
|
||||||
|
+++ b/src/vpn-manager/nm-vpn-service.c
|
||||||
|
@@ -54,7 +54,7 @@ typedef struct {
|
||||||
|
|
||||||
|
#define VPN_CONNECTION_GROUP "VPN Connection"
|
||||||
|
|
||||||
|
-static gboolean start_pending_vpn (NMVPNService *self);
|
||||||
|
+static gboolean start_pending_vpn (NMVPNService *self, GError **error);
|
||||||
|
|
||||||
|
NMVPNService *
|
||||||
|
nm_vpn_service_new (const char *namefile, GError **error)
|
||||||
|
@@ -130,7 +130,7 @@ connection_vpn_state_changed (NMVPNConnection *connection,
|
||||||
|
g_signal_handlers_disconnect_by_func (connection, G_CALLBACK (connection_vpn_state_changed), self);
|
||||||
|
if (connection == priv->active) {
|
||||||
|
priv->active = NULL;
|
||||||
|
- start_pending_vpn (self);
|
||||||
|
+ start_pending_vpn (self, NULL);
|
||||||
|
} else
|
||||||
|
priv->pending = g_slist_remove (priv->pending, connection);
|
||||||
|
g_object_unref (connection);
|
||||||
|
@@ -253,7 +253,7 @@ start_active_vpn (NMVPNService *self, GError **error)
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
-start_pending_vpn (NMVPNService *self)
|
||||||
|
+start_pending_vpn (NMVPNService *self, GError **error)
|
||||||
|
{
|
||||||
|
NMVPNServicePrivate *priv = NM_VPN_SERVICE_GET_PRIVATE (self);
|
||||||
|
|
||||||
|
@@ -266,7 +266,7 @@ start_pending_vpn (NMVPNService *self)
|
||||||
|
priv->active = g_slist_nth_data (priv->pending, 0);
|
||||||
|
priv->pending = g_slist_remove (priv->pending, priv->active);
|
||||||
|
|
||||||
|
- return start_active_vpn (self, NULL);
|
||||||
|
+ return start_active_vpn (self, error);
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
@@ -300,7 +300,7 @@ nm_vpn_service_activate (NMVPNService *service,
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Otherwise start the next VPN */
|
||||||
|
- return start_pending_vpn (service);
|
||||||
|
+ return start_pending_vpn (service, error);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
--
|
||||||
|
1.7.11.7
|
||||||
|
|
64
0009-rh1167345-external-master-slave-assert-fix.patch
Normal file
64
0009-rh1167345-external-master-slave-assert-fix.patch
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
From 05f686009a32e23815f7371b144f8dfa72f966d0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@redhat.com>
|
||||||
|
Date: Wed, 24 Sep 2014 16:02:37 +0200
|
||||||
|
Subject: [PATCH 2/2] core: do not assert when a device is enslaved externally
|
||||||
|
(rh #1167345)
|
||||||
|
|
||||||
|
Test case:
|
||||||
|
# ip link add name BR type bridge
|
||||||
|
# brctl addif BR eth0
|
||||||
|
|
||||||
|
Monitoring external master/slave changes was intruduced by
|
||||||
|
08e0cfb484dfc6aa6342871158ffe752c7c50f03.
|
||||||
|
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1167345
|
||||||
|
|
||||||
|
(cherry picked from commit c9b9229c2e7de2bbb12e493a868921b7a788ee92)
|
||||||
|
---
|
||||||
|
src/devices/nm-device.c | 4 ----
|
||||||
|
src/nm-active-connection.c | 4 ++--
|
||||||
|
2 files changed, 2 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
|
||||||
|
index 35ee470..7d7d528 100644
|
||||||
|
--- a/src/devices/nm-device.c
|
||||||
|
+++ b/src/devices/nm-device.c
|
||||||
|
@@ -2966,8 +2966,6 @@ act_stage3_ip4_config_start (NMDevice *self,
|
||||||
|
g_assert (connection);
|
||||||
|
|
||||||
|
method = nm_utils_get_ip_config_method (connection, NM_TYPE_SETTING_IP4_CONFIG);
|
||||||
|
- if (priv->master)
|
||||||
|
- g_assert_cmpstr (method, ==, NM_SETTING_IP4_CONFIG_METHOD_DISABLED);
|
||||||
|
|
||||||
|
if ( strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_MANUAL) != 0
|
||||||
|
&& priv->is_master
|
||||||
|
@@ -3864,8 +3862,6 @@ act_stage3_ip6_config_start (NMDevice *self,
|
||||||
|
g_assert (connection);
|
||||||
|
|
||||||
|
method = nm_utils_get_ip_config_method (connection, NM_TYPE_SETTING_IP6_CONFIG);
|
||||||
|
- if (priv->master)
|
||||||
|
- g_assert_cmpstr (method, ==, NM_SETTING_IP6_CONFIG_METHOD_IGNORE);
|
||||||
|
|
||||||
|
if ( strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_MANUAL) != 0
|
||||||
|
&& priv->is_master
|
||||||
|
diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c
|
||||||
|
index 1ac67a9..2dc0688 100644
|
||||||
|
--- a/src/nm-active-connection.c
|
||||||
|
+++ b/src/nm-active-connection.c
|
||||||
|
@@ -371,11 +371,11 @@ device_master_changed (GObject *object,
|
||||||
|
return;
|
||||||
|
if (!nm_device_get_master (device))
|
||||||
|
return;
|
||||||
|
+ if (!nm_active_connection_get_master (self))
|
||||||
|
+ return;
|
||||||
|
g_signal_handlers_disconnect_by_func (device, G_CALLBACK (device_master_changed), self);
|
||||||
|
|
||||||
|
master = nm_active_connection_get_master (self);
|
||||||
|
- g_assert (master);
|
||||||
|
-
|
||||||
|
master_state = nm_active_connection_get_state (master);
|
||||||
|
if (master_state >= NM_ACTIVE_CONNECTION_STATE_DEACTIVATING) {
|
||||||
|
/* Master failed before attaching the slave */
|
||||||
|
--
|
||||||
|
1.7.11.7
|
||||||
|
|
@ -13,7 +13,7 @@
|
|||||||
%define snapshot .git20140704
|
%define snapshot .git20140704
|
||||||
%define git_sha 6eb82acd
|
%define git_sha 6eb82acd
|
||||||
%define realversion 0.9.10.0
|
%define realversion 0.9.10.0
|
||||||
%define release_version 13
|
%define release_version 14
|
||||||
%define epoch_version 1
|
%define epoch_version 1
|
||||||
|
|
||||||
%define obsoletes_nmver 1:0.9.9.95-1
|
%define obsoletes_nmver 1:0.9.9.95-1
|
||||||
@ -89,6 +89,8 @@ Patch4: 0004-bluez-re-add-DUN-support-for-Bluez5.patch
|
|||||||
Patch5: 0005-core-only-set-IPv6-hop_limit-for-values-greater-than.patch
|
Patch5: 0005-core-only-set-IPv6-hop_limit-for-values-greater-than.patch
|
||||||
Patch6: 0006-platform-deal-with-default-route-being-passed-to-rou.patch
|
Patch6: 0006-platform-deal-with-default-route-being-passed-to-rou.patch
|
||||||
Patch7: 0007-rh1159408-cli-multiple-wifi-devices-fix.patch
|
Patch7: 0007-rh1159408-cli-multiple-wifi-devices-fix.patch
|
||||||
|
Patch8: 0008-bgo739436-vpn-service-assert-fix.patch
|
||||||
|
Patch9: 0009-rh1167345-external-master-slave-assert-fix.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
@ -334,6 +336,8 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
|
|||||||
%patch5 -p1 -b .core-only-set-IPv6-hop_limit-for-values-greater-than.orig
|
%patch5 -p1 -b .core-only-set-IPv6-hop_limit-for-values-greater-than.orig
|
||||||
%patch6 -p1 -b .default-route-spam
|
%patch6 -p1 -b .default-route-spam
|
||||||
%patch7 -p1 -b .rh1159408-cli-multiple-wifi-devices-fix.orig
|
%patch7 -p1 -b .rh1159408-cli-multiple-wifi-devices-fix.orig
|
||||||
|
%patch8 -p1 -b .bgo739436-vpn-service-assert-fix.patch.orig
|
||||||
|
%patch9 -p1 -b .rh1167345-external-master-slave-assert-fix.orig
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -605,6 +609,10 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 24 2014 Jiří Klimeš <jklimes@redhat.com> - 1:0.9.10.0-14.git20140704
|
||||||
|
- vpn: propagate daemon exec error correctly (bgo #739436)
|
||||||
|
- core: do not assert when a device is enslaved externally (rh #1167345)
|
||||||
|
|
||||||
* Thu Nov 6 2014 Jiří Klimeš <jklimes@redhat.com> - 1:0.9.10.0-13.git20140704
|
* Thu Nov 6 2014 Jiří Klimeš <jklimes@redhat.com> - 1:0.9.10.0-13.git20140704
|
||||||
- cli: fix crash in `nmcli device wifi` with multiple wifi devices (rh #1159408)
|
- cli: fix crash in `nmcli device wifi` with multiple wifi devices (rh #1159408)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user