Non named operation and new arch
- From: Tor Krill <tor krill nu>
- To: networkmanager-list gnome org
- Subject: Non named operation and new arch
- Date: Sun, 23 Oct 2005 17:47:33 +0200
Hi all,
I'm working on a port of NM to my distribution of choice, Archlinux.
Working on this i run without named and if i understand correct that is
ok? With fallback on glibc resolver.
Doing this i have encountered two problems. When writing resolv.conf
only first nameserver gets written, once for each NS i had originally.
The other problem is in nm_named_manager_remove_ip4_config. In that
config is deleted before the last call to
rewrite_resolv_conf resulting in that my resolv.conf being written empty
on shutdown.
Attached to this email is a small patch with my fix for these.
Other than that, what possibilities are there for addition of Archlinux
support in NM? What requirements are there? I have a complete patch
against NM 5.1 albeit not widely tested.
Regards,
/Tor
diff -urN NetworkManager-0.5.1/src/named-manager/nm-named-manager.c NetworkManager-0.5.1-work/src/named-manager/nm-named-manager.c
--- NetworkManager-0.5.1/src/named-manager/nm-named-manager.c 2005-09-28 16:42:57.000000000 +0200
+++ NetworkManager-0.5.1-work/src/named-manager/nm-named-manager.c 2005-10-23 15:19:35.000000000 +0200
@@ -301,7 +301,7 @@
if (!str)
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);
inet_ntop (AF_INET, &addr, buf, ADDR_BUF_LEN);
@@ -354,6 +354,8 @@
char * searches = NULL;
FILE * f;
+ g_return_val_if_fail (config != NULL, FALSE);
+
if ((f = fopen (tmp_resolv_conf, "w")) == NULL)
goto lose;
@@ -704,8 +706,6 @@
if (mgr->priv->use_named)
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
* default zone if the one we are removing was the old
@@ -723,6 +723,9 @@
g_error_free (error);
}
+ mgr->priv->configs = g_slist_remove (mgr->priv->configs, config);
+ nm_ip4_config_unref (config);
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]