diff options
| -rw-r--r-- | debian/changelog | 4 | ||||
| -rw-r--r-- | debian/patches/04-ifupdown-support-dns-search-entries.patch | 60 | ||||
| -rw-r--r-- | debian/patches/series | 1 |
3 files changed, 65 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 9789cf4a..091d15f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,10 @@ network-manager (0.9.2.0-2) UNRELEASED; urgency=low * Change section of gir1.2-networkmanager-1.0 to introspection. * Fix versioned Build-Depends on dpkg-dev. The buildflags.mk snippet was added in version 1.16.1, not 1.6.1. + * debian/patches/04-ifupdown-support-dns-search-entries.patch + - Support dns-search entries in /etc/network/interfaces as used by + resolvconf and openresolv. (Closes: #651447) + Patch cherry-picked from upstream Git. -- Michael Biebl <biebl@debian.org> Thu, 05 Jan 2012 14:19:04 +0100 diff --git a/debian/patches/04-ifupdown-support-dns-search-entries.patch b/debian/patches/04-ifupdown-support-dns-search-entries.patch new file mode 100644 index 00000000..09e2f277 --- /dev/null +++ b/debian/patches/04-ifupdown-support-dns-search-entries.patch @@ -0,0 +1,60 @@ +From e4fbf5363edcc77be59a13194c8998a864883728 Mon Sep 17 00:00:00 2001 +From: Guido Günther <agx@sigxcpu.org> +Date: Wed, 07 Dec 2011 15:41:52 +0000 +Subject: ifupdown: support dns-search entries + +as used by resolvconf and openresolv. +--- +Index: network-manager/src/settings/plugins/ifupdown/parser.c +=================================================================== +--- network-manager.orig/src/settings/plugins/ifupdown/parser.c 2011-10-16 08:48:00.000000000 +0200 ++++ network-manager/src/settings/plugins/ifupdown/parser.c 2012-01-05 14:45:06.907708918 +0100 +@@ -434,6 +434,15 @@ + return error_quark; + } + ++static void ++ifupdown_add_search_item(gpointer data, gpointer user_data) ++{ ++ const char *dns_search = data; ++ NMSettingIP4Config *ip4_setting = user_data; ++ ++ if (!nm_setting_ip4_config_add_dns_search (ip4_setting, dns_search)) ++ PLUGIN_WARN ("SCPlugin-Ifupdown", " warning: duplicate DNS domain '%s'", dns_search); ++} + + static void + update_ip4_setting_from_if_block(NMConnection *connection, +@@ -457,14 +466,18 @@ + const char *gateway_v = ifparser_getkey(block, "gateway"); + const char *nameserver_v = ifparser_getkey(block, "dns-nameserver"); + const char *nameservers_v = ifparser_getkey(block, "dns-nameservers"); ++ const char *search_v = ifparser_getkey(block, "dns-search"); + GSList* nameservers_list = NULL; + GSList* nameservers_list_i = NULL; ++ GSList* search_list = NULL; + GError *error = NULL; + + if(nameservers_v) + nameservers_list_i = nameservers_list = string_to_glist_of_strings (nameservers_v); + if(nameserver_v) + nameservers_list_i = nameservers_list = g_slist_append(nameservers_list, g_strdup(nameserver_v)); ++ if(search_v) ++ search_list = string_to_glist_of_strings (search_v); + + if (!address_v) + address_v = g_strdup ("0.0.0.0"); +@@ -514,6 +527,13 @@ + if (!nm_setting_ip4_config_get_num_dns (ip4_setting)) + PLUGIN_PRINT("SCPlugin-Ifupdown", "No dns-nameserver configured in /etc/network/interfaces"); + ++ /* DNS searches */ ++ if (search_list) { ++ g_slist_foreach (search_list, (GFunc) ifupdown_add_search_item, ip4_setting); ++ g_slist_foreach (search_list, (GFunc) g_free, NULL); ++ g_slist_free (search_list); ++ } ++ + g_object_set(ip4_setting, + NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_MANUAL, + NULL); diff --git a/debian/patches/series b/debian/patches/series index fc215f9c..0b0b4e30 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ # Debian patches for network-manager 02-dbus_access_network_manager.patch 03-systemd.patch +04-ifupdown-support-dns-search-entries.patch |