refresh all package patches in the buildroot using quilt
[openwrt/openwrt.git] / package / dnsmasq / patches / 103-hosts-fqdn.patch
1 Index: dnsmasq-2.38/src/cache.c
2 ===================================================================
3 --- dnsmasq-2.38.orig/src/cache.c 2007-06-04 13:22:23.510281176 +0200
4 +++ dnsmasq-2.38/src/cache.c 2007-06-04 13:22:24.014204568 +0200
5 @@ -749,10 +749,11 @@
6 while ((token = strtok(NULL, " \t\n\r")) && (*token != '#'))
7 {
8 struct crec *cache;
9 + int fqdn = !!strchr(token, '.');
10 if (canonicalise(token))
11 {
12 /* If set, add a version of the name with a default domain appended */
13 - if ((opts & OPT_EXPAND) && domain_suffix && !strchr(token, '.') &&
14 + if ((opts & OPT_EXPAND) && domain_suffix && !fqdn &&
15 (cache = malloc(sizeof(struct crec) +
16 strlen(token)+2+strlen(domain_suffix)-SMALLDNAME)))
17 {