NetworkManager r3294 - in trunk/vpn-daemons/openvpn: . src



Author: dcbw
Date: Wed Feb  6 18:34:12 2008
New Revision: 3294
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3294&view=rev

Log:
2008-02-06  Dan Williams  <dcbw redhat com>

	Patch from Ryan Ayers <rayers public dividia net>

	* src/nm-openvpn-service-openvpn-helper.c
		- (main): respect server-provided DNS search domain



Modified:
   trunk/vpn-daemons/openvpn/ChangeLog
   trunk/vpn-daemons/openvpn/src/nm-openvpn-service-openvpn-helper.c

Modified: trunk/vpn-daemons/openvpn/src/nm-openvpn-service-openvpn-helper.c
==============================================================================
--- trunk/vpn-daemons/openvpn/src/nm-openvpn-service-openvpn-helper.c	(original)
+++ trunk/vpn-daemons/openvpn/src/nm-openvpn-service-openvpn-helper.c	Wed Feb  6 18:34:12 2008
@@ -186,6 +186,7 @@
 	GError *err = NULL;
 	GValue *dns_list = NULL;
 	GValue *nbns_list = NULL;
+	GValue *dns_domain = NULL;
 
 	g_type_init ();
 
@@ -248,12 +249,16 @@
 			dns_list = parse_addr_list (dns_list, tmp + 4);
 		else if (g_str_has_prefix (tmp, "WINS "))
 			nbns_list = parse_addr_list (nbns_list, tmp + 5);
+		else if (g_str_has_prefix (tmp, "DOMAIN ") && !dns_domain)
+			dns_domain = str_to_gvalue (tmp + 7, FALSE);
 	}
 
 	if (dns_list)
 		g_hash_table_insert (config, NM_VPN_PLUGIN_IP4_CONFIG_DNS, dns_list);
 	if (nbns_list)
 		g_hash_table_insert (config, NM_VPN_PLUGIN_IP4_CONFIG_NBNS, nbns_list);
+	if (dns_domain)
+		g_hash_table_insert (config, NM_VPN_PLUGIN_IP4_CONFIG_DOMAIN, dns_domain);
 
 	/* Send the config info to nm-openvpn-service */
 	send_ip4_config (connection, config);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]