2005-10-24 Dan Williams <dcbw@redhat.com>
Patch from Tor Krill <tor@krill.nu> * src/named-manager/nm-named-manager.c - Write more than just the first nameserver to /etc/resolv.conf - Write out valid /etc/resolv.conf on exit git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1067 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2005-10-24 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
|
Patch from Tor Krill <tor@krill.nu>
|
||||||
|
* src/named-manager/nm-named-manager.c
|
||||||
|
- Write more than just the first nameserver to /etc/resolv.conf
|
||||||
|
- Write out valid /etc/resolv.conf on exit
|
||||||
|
|
||||||
2005-10-21 Christopher Aillon <caillon@redhat.com>
|
2005-10-21 Christopher Aillon <caillon@redhat.com>
|
||||||
|
|
||||||
* gnome/applet/applet-dbus-vpn.c:
|
* gnome/applet/applet-dbus-vpn.c:
|
||||||
|
@@ -301,7 +301,7 @@ compute_nameservers (NMNamedManager *mgr, NMIP4Config *config)
|
|||||||
if (!str)
|
if (!str)
|
||||||
str = g_string_new ("");
|
str = g_string_new ("");
|
||||||
|
|
||||||
addr.s_addr = nm_ip4_config_get_nameserver (config, 0);
|
addr.s_addr = nm_ip4_config_get_nameserver (config, i);
|
||||||
buf = g_malloc0 (ADDR_BUF_LEN);
|
buf = g_malloc0 (ADDR_BUF_LEN);
|
||||||
inet_ntop (AF_INET, &addr, buf, ADDR_BUF_LEN);
|
inet_ntop (AF_INET, &addr, buf, ADDR_BUF_LEN);
|
||||||
|
|
||||||
@@ -354,6 +354,8 @@ rewrite_resolv_conf (NMNamedManager *mgr, NMIP4Config *config, GError **error)
|
|||||||
char * searches = NULL;
|
char * searches = NULL;
|
||||||
FILE * f;
|
FILE * f;
|
||||||
|
|
||||||
|
g_return_val_if_fail (config != NULL, FALSE);
|
||||||
|
|
||||||
if ((f = fopen (tmp_resolv_conf, "w")) == NULL)
|
if ((f = fopen (tmp_resolv_conf, "w")) == NULL)
|
||||||
goto lose;
|
goto lose;
|
||||||
|
|
||||||
@@ -704,8 +706,6 @@ nm_named_manager_remove_ip4_config (NMNamedManager *mgr, NMIP4Config *config)
|
|||||||
if (mgr->priv->use_named)
|
if (mgr->priv->use_named)
|
||||||
remove_ip4_config_from_named (mgr, config);
|
remove_ip4_config_from_named (mgr, config);
|
||||||
|
|
||||||
mgr->priv->configs = g_slist_remove (mgr->priv->configs, config);
|
|
||||||
nm_ip4_config_unref (config);
|
|
||||||
|
|
||||||
/* Clear out and reload configs since we may need a new
|
/* Clear out and reload configs since we may need a new
|
||||||
* default zone if the one we are removing was the old
|
* default zone if the one we are removing was the old
|
||||||
@@ -723,6 +723,9 @@ nm_named_manager_remove_ip4_config (NMNamedManager *mgr, NMIP4Config *config)
|
|||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mgr->priv->configs = g_slist_remove (mgr->priv->configs, config);
|
||||||
|
nm_ip4_config_unref (config);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user