summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authormbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-02-12 22:47:25 +0000
committermbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-02-12 22:47:25 +0000
commitfb16e407a9dfb75e2c179354fca5e9a156ed5356 (patch)
treed0074782a11a699a543e879c1d1f0b325a9fdf66 /package
parent14f10a2ff8275dd7f8d80bdb8fc3043d540242df (diff)
fix dnsmasq parsing of /etc/hosts for fqdn cases like "localhost."
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6291 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/dnsmasq/patches/103-hosts-fqdn.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/package/dnsmasq/patches/103-hosts-fqdn.patch b/package/dnsmasq/patches/103-hosts-fqdn.patch
new file mode 100644
index 000000000..054161419
--- /dev/null
+++ b/package/dnsmasq/patches/103-hosts-fqdn.patch
@@ -0,0 +1,15 @@
+--- dnsmasq-2.35/src/cache.c.orig 2007-02-12 14:35:58.000000000 -0800
++++ dnsmasq-2.35/src/cache.c 2007-02-12 14:36:51.000000000 -0800
+@@ -720,10 +720,11 @@
+ while ((token = strtok(NULL, " \t\n\r")) && (*token != '#'))
+ {
+ struct crec *cache;
++ int fqdn = !!strchr(token, '.');
+ if (canonicalise(token))
+ {
+ /* If set, add a version of the name with a default domain appended */
+- if ((opts & OPT_EXPAND) && domain_suffix && !strchr(token, '.') &&
++ if ((opts & OPT_EXPAND) && domain_suffix && !fqdn &&
+ (cache = malloc(sizeof(struct crec) +
+ strlen(token)+2+strlen(domain_suffix)-SMALLDNAME)))
+ {