From dcdaefa75e254f0525966833a87d4890a477b0c1 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: May 11 2015 08:36:57 +0000 Subject: The split DNS patches are now upstream (rh #1161232) --- diff --git a/0003-kill-dns-plugin-child-synchronously-rh1161232.patch b/0003-kill-dns-plugin-child-synchronously-rh1161232.patch index 5534dce..0e7b260 100644 --- a/0003-kill-dns-plugin-child-synchronously-rh1161232.patch +++ b/0003-kill-dns-plugin-child-synchronously-rh1161232.patch @@ -1,8 +1,8 @@ -From 993bd6ab583c077eb0e94fb25f090eb164922435 Mon Sep 17 00:00:00 2001 +From a6ac4dd1176f7fc6f12e8513ec49da58607a6922 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Wed, 6 May 2015 11:52:27 +0200 -Subject: [PATCH 1/4] dns: kill plugin child synchronously to avoid restart - race (rh #1161232) (bgo #728342) +Subject: [PATCH] dns: kill plugin child synchronously to avoid restart race + (rh #1161232) (bgo #728342) NM was killing the dnsmasq local caching nameserver process and immediately starting a new one, and new process couldn't bind to 127.0.0.1 because the @@ -23,11 +23,11 @@ nm_utils_kill_child_sync()) which in turn relies on 1f84185 (core: add nm_utils_kill_child_async() and nm_utils_kill_child_sync() function) that is not entirely trivial to backport. --- - src/dns-manager/nm-dns-plugin.c | 41 ++++++++++++----------------------------- - 1 file changed, 12 insertions(+), 29 deletions(-) + src/dns-manager/nm-dns-plugin.c | 46 ++++++++++++++--------------------------- + 1 file changed, 16 insertions(+), 30 deletions(-) diff --git a/src/dns-manager/nm-dns-plugin.c b/src/dns-manager/nm-dns-plugin.c -index e85b2a0..549efe3 100644 +index e85b2a0..4f86d63 100644 --- a/src/dns-manager/nm-dns-plugin.c +++ b/src/dns-manager/nm-dns-plugin.c @@ -196,29 +196,6 @@ nm_dns_plugin_child_spawn (NMDnsPlugin *self, @@ -60,7 +60,7 @@ index e85b2a0..549efe3 100644 gboolean nm_dns_plugin_child_kill (NMDnsPlugin *self) { NMDnsPluginPrivate *priv = NM_DNS_PLUGIN_GET_PRIVATE (self); -@@ -229,14 +206,20 @@ gboolean nm_dns_plugin_child_kill (NMDnsPlugin *self) +@@ -229,21 +206,30 @@ gboolean nm_dns_plugin_child_kill (NMDnsPlugin *self) } if (priv->pid) { @@ -75,9 +75,10 @@ index e85b2a0..549efe3 100644 + int counter = 20; + + /* Wait up to 2 seconds synchronously. */ ++ nm_log_dbg (LOGD_DNS, "waiting for %s pid %d to exit", priv->progname, priv->pid); + while (counter--) { + if (waitpid (priv->pid, NULL, WNOHANG)) -+ break; ++ goto killed; + g_usleep (100000); + } + } @@ -87,6 +88,16 @@ index e85b2a0..549efe3 100644 kill (priv->pid, SIGKILL); /* ensure the child is reaped */ + nm_log_dbg (LOGD_DNS, "waiting for %s pid %d to exit", priv->progname, priv->pid); + waitpid (priv->pid, NULL, 0); +- nm_log_dbg (LOGD_DNS, "%s pid %d cleaned up", priv->progname, priv->pid); + } ++ ++killed: ++ nm_log_dbg (LOGD_DNS, "%s pid %d cleaned up", priv->progname, priv->pid); + priv->pid = 0; + g_free (priv->progname); + priv->progname = NULL; -- 2.4.0 diff --git a/NetworkManager.spec b/NetworkManager.spec index a7e8165..53ac18c 100644 --- a/NetworkManager.spec +++ b/NetworkManager.spec @@ -12,7 +12,7 @@ %define snapshot %{nil} %define realversion 0.9.10.2 -%define release_version 4 +%define release_version 5 %define epoch_version 1 %define obsoletes_nmver 1:0.9.9.95-1 @@ -81,15 +81,15 @@ Patch0: 0000-explain-dns1-dns2.patch Patch1: 0001-connectivity-disable-HTTP-keepalive-for-connectivity.patch Patch2: rh1203904-NM-loop-fix.patch +# Cherry-picks from upstream: +# http://cgit.freedesktop.org/NetworkManager/NetworkManager/log/?h=nm-0-9-10 + # https://bugzilla.redhat.com/show_bug.cgi?id=1161232 Patch3: 0003-kill-dns-plugin-child-synchronously-rh1161232.patch Patch4: 0004-refactor-building-IP-config-lists-for-dns-plugins-rh1161232.patch Patch5: 0005-ensure-that-update_dns-always-returns-a-GError-rh1161232.patch Patch6: 0006-refresh-DNS-if-plugin-child-quits-unexpectedly-rh1161232.patch -# Cherry-picks from upstream: -# http://cgit.freedesktop.org/NetworkManager/NetworkManager/log/?h=nm-0-9-10 - # https://bugzilla.redhat.com/show_bug.cgi?id=1168573 Patch7: 0007-cli-add-PHYS_PORT_ID-property-rh1168573.patch Patch8: 0008-cli-better-indicate-Wi-Fi-plugin-missing-rh1168573.patch @@ -618,6 +618,9 @@ fi %endif %changelog +* Mon May 11 2015 Lubomir Rintel - 1:0.9.10.2-5 +- The split DNS patches are now upstream (rh #1161232) + * Wed May 6 2015 Lubomir Rintel - 1:0.9.10.2-4 - Fix split DNS configuration with dnsmasq and VPN connections (rh #1161232) - Fix indication that a WiFi plugin is missing (rh #1168573)