2008-03-09 Dan Williams <dcbw@redhat.com>
Patch from Bas Zoetekouw <bas@debian.org> * src/dhcp-manager/nm-dhcp-manager.c - (nm_dhcp_manager_get_ip4_config): handle domain-search option too git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3403 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2008-03-09 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
|
Patch from Bas Zoetekouw <bas@debian.org>
|
||||||
|
|
||||||
|
* src/dhcp-manager/nm-dhcp-manager.c
|
||||||
|
- (nm_dhcp_manager_get_ip4_config): handle domain-search option too
|
||||||
|
|
||||||
2008-03-09 Dan Williams <dcbw@redhat.com>
|
2008-03-09 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
Patch from Bas Zoetekouw <bas@debian.org>
|
Patch from Bas Zoetekouw <bas@debian.org>
|
||||||
|
@@ -842,7 +842,8 @@ nm_dhcp_manager_get_ip4_config (NMDHCPManager *manager,
|
|||||||
guint32 ip4_broadcast = 0;
|
guint32 ip4_broadcast = 0;
|
||||||
guint32 ip4_gateway = 0;
|
guint32 ip4_gateway = 0;
|
||||||
char * hostname = NULL;
|
char * hostname = NULL;
|
||||||
char * domain_names = NULL;
|
char * domain = NULL;
|
||||||
|
char * search = NULL;
|
||||||
char * nameservers = NULL;
|
char * nameservers = NULL;
|
||||||
char * nis_domain = NULL;
|
char * nis_domain = NULL;
|
||||||
char * nis_servers = NULL;
|
char * nis_servers = NULL;
|
||||||
@@ -915,7 +916,8 @@ nm_dhcp_manager_get_ip4_config (NMDHCPManager *manager,
|
|||||||
|
|
||||||
hostname = g_hash_table_lookup (device->options, "new_host_name");
|
hostname = g_hash_table_lookup (device->options, "new_host_name");
|
||||||
nameservers = g_hash_table_lookup (device->options, "new_domain_name_servers");
|
nameservers = g_hash_table_lookup (device->options, "new_domain_name_servers");
|
||||||
domain_names = g_hash_table_lookup (device->options, "new_domain_name");
|
domain = g_hash_table_lookup (device->options, "new_domain_name");
|
||||||
|
search = g_hash_table_lookup (device->options, "new_domain_search");
|
||||||
nis_domain = g_hash_table_lookup (device->options, "new_nis_domain");
|
nis_domain = g_hash_table_lookup (device->options, "new_nis_domain");
|
||||||
nis_servers = g_hash_table_lookup (device->options, "new_nis_servers");
|
nis_servers = g_hash_table_lookup (device->options, "new_nis_servers");
|
||||||
static_routes = g_hash_table_lookup (device->options, "new_static_routes");
|
static_routes = g_hash_table_lookup (device->options, "new_static_routes");
|
||||||
@@ -939,13 +941,24 @@ nm_dhcp_manager_get_ip4_config (NMDHCPManager *manager,
|
|||||||
nm_info (" hostname '%s'", hostname);
|
nm_info (" hostname '%s'", hostname);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (domain_names) {
|
if (domain) {
|
||||||
char **searches = g_strsplit (domain_names, " ", 0);
|
char **domains = g_strsplit (domain, " ", 0);
|
||||||
|
char **s;
|
||||||
|
|
||||||
|
for (s = domains; *s; s++) {
|
||||||
|
nm_info (" domain name '%s'", *s);
|
||||||
|
nm_ip4_config_add_domain (ip4_config, *s);
|
||||||
|
}
|
||||||
|
g_strfreev (domains);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (search) {
|
||||||
|
char **searches = g_strsplit (search, " ", 0);
|
||||||
char **s;
|
char **s;
|
||||||
|
|
||||||
for (s = searches; *s; s++) {
|
for (s = searches; *s; s++) {
|
||||||
nm_info (" domain name '%s'", *s);
|
nm_info (" domain search '%s'", *s);
|
||||||
nm_ip4_config_add_domain (ip4_config, *s);
|
nm_ip4_config_add_search (ip4_config, *s);
|
||||||
}
|
}
|
||||||
g_strfreev (searches);
|
g_strfreev (searches);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user