summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorMike Baker <mbm@openwrt.org>2007-02-12 22:47:25 +0000
committerMike Baker <mbm@openwrt.org>2007-02-12 22:47:25 +0000
commitb478e36af219d9ed24e5fbbf82911385a613e71c (patch)
treedc49720c2609aecd3f936b7f107d94c65c255aab /package
parentf2c73eaa2010098feaca7952f110ba3b59e6b4a0 (diff)
downloadmtk-20170518-b478e36af219d9ed24e5fbbf82911385a613e71c.zip
mtk-20170518-b478e36af219d9ed24e5fbbf82911385a613e71c.tar.gz
mtk-20170518-b478e36af219d9ed24e5fbbf82911385a613e71c.tar.bz2
fix dnsmasq parsing of /etc/hosts for fqdn cases like "localhost."
SVN-Revision: 6291
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 0000000..0541614
--- /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)))
+ {