Re: DNS from wifi not removed when switching to wire after suspend/resume
- From: Frederik Himpe <fhimpe telenet be>
- To: networkmanager-list gnome org
- Subject: Re: DNS from wifi not removed when switching to wire after suspend/resume
- Date: Tue, 17 Nov 2009 22:37:20 +0000 (UTC)
On Tue, 17 Nov 2009 22:23:42 +0000, Frederik Himpe wrote:
> Looking at resolvconf's man page, I guess that NetworkManager only calls
> networkmanager -a, which will add stuff to resolvconf, but does not call
> resolvconf -d first to clean up the outdated entries.
I'm not really good in C, but I was thinking of something like this:
--- src/named-manager/nm-named-manager.c~ 2009-11-17 20:46:13.000000000 +0100
+++ src/named-manager/nm-named-manager.c 2009-11-17 23:34:21.000000000 +0100
@@ -355,6 +355,12 @@
return FALSE;
if (domain || searches || nameservers) {
+ cmd = g_strconcat (RESOLVCONF_PATH, " -d ", "NetworkManager", NULL);
+ if (nm_spawn_process (cmd) == 0)
+ retval = TRUE;
+ g_free (cmd);
+ if (retval == FALSE)
+ return retval;
cmd = g_strconcat (RESOLVCONF_PATH, " -a ", "NetworkManager", NULL);
nm_info ("(%s): writing resolv.conf to %s", iface, RESOLVCONF_PATH);
if ((f = popen (cmd, "w")) == NULL)
Would this make sense, or am I way off now?
--
Frederik HImpe
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]