2008-05-23 Tambet Ingo <tambet@gmail.com>
Add a flag to NMSettingIP4Config to make it possible to ignore the DNS information received from DHCP. * libnm-util/nm-setting-ip4-config.c: Add a new membet "ignore_dhcp_dns" to make it possible to ignore the DNS information (both servers and searches) returned by DHCP server. * src/NetworkManagerUtils.c (nm_utils_merge_ip4_config): Reset the name servers and searches if "ignore_dhcp_dns" is set. * src/nm-ip4-config.c (nm_ip4_config_reset_nameservers) (nm_ip4_config_reset_searches): Implement. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3685 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
|
||||
|
||||
/* NetworkManager -- Network link manager
|
||||
*
|
||||
* Dan Williams <dcbw@redhat.com>
|
||||
@@ -242,6 +244,11 @@ nm_utils_merge_ip4_config (NMIP4Config *ip4_config, NMSettingIP4Config *setting)
|
||||
if (!setting)
|
||||
return; /* Defaults are just fine */
|
||||
|
||||
if (setting->ignore_dhcp_dns) {
|
||||
nm_ip4_config_reset_nameservers (ip4_config);
|
||||
nm_ip4_config_reset_searches (ip4_config);
|
||||
}
|
||||
|
||||
if (setting->dns) {
|
||||
int i, j;
|
||||
|
||||
|
Reference in New Issue
Block a user