OpenVPN Domain Search Suffix

I am new to this list.  I developed a patch to add support for the dhcp-option DOMAIN to the OpenVPN plugin for NetworkManager.  I'm not sure if this is the right list to submit this patch.  I run Fedora and when I bring up a VPN connection to my office network, then DHCP server is configured to send a DNS server and a DOMAIN search suffix.  However, NetworkManager just erases /etc/resolv.conf and places the correct nameserver line, but does not add a "search" line.  The attached patch resolves the issue for me.  I run Fedora and this patch is against the latest package for F8.

If I should send this patch to Fedora Bugzilla instead of this list, just let me know.

diff -uNr a/src/nm-openvpn-service-openvpn-helper.c b/src/nm-openvpn-service-openvpn-helper.c
--- a/src/nm-openvpn-service-openvpn-helper.c	2007-12-13 08:25:34.000000000 -0600
+++ b/src/nm-openvpn-service-openvpn-helper.c	2008-02-02 15:41:04.000000000 -0600
@@ -186,6 +186,7 @@
 	GError *err = NULL;
 	GValue *dns_list = NULL;
 	GValue *nbns_list = NULL;
+	GValue *domain_list = 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 "))
+			domain_list = 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 (domain_list)
+		g_hash_table_insert (config, NM_VPN_PLUGIN_IP4_CONFIG_DOMAIN, domain_list);
 	/* 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]