aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/dante/patches/100-do-not-use-defdname.patch
blob: 37b91a9ffcd127828462cbd70762402464c220ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
--- a/lib/addressmatch.c
+++ b/lib/addressmatch.c
@@ -399,18 +399,6 @@ addrmatch(rule, address, protocol, alias
          if (hostareeq(rule->addr.domain, hostent->h_name)
          ||  hostisinlist(rule->addr.domain, (const char **)hostent->h_aliases))
             matched = 1;
-#if !HAVE_NO_RESOLVESTUFF
-         else if (strchr(hostent->h_name, '.') == NULL) {
-            /* if hostname we got is non-qualified, try to qualify it. */
-            char fqdn[MAXHOSTNAMELEN];
-
-            snprintf(fqdn, sizeof(fqdn), "%s.%s",
-            hostent->h_name, _res.defdname);
-
-            if (hostareeq(rule->addr.domain, fqdn))
-               matched = 1;
-         }
-#endif /* !HAVE_NO_RESOLVESTUFF */
       }
 
       if (!matched && alias) {
@@ -465,20 +453,6 @@ addrmatch(rule, address, protocol, alias
                   matched = 1;
                   break;
                }
-#if !HAVE_NO_RESOLVESTUFF
-               else if (strchr(ip->h_name, '.') == NULL) {
-                  /* if hostname we got is non-qualified, try to qualify it. */
-                  char fqdn[MAXHOSTNAMELEN];
-
-                  snprintf(fqdn, sizeof(fqdn), "%s.%s",
-                  ip->h_name, _res.defdname);
-
-                  if (hostareeq(rule->addr.domain, fqdn)) {
-                     matched = 1;
-                     break;
-                  }
-               }
-#endif /* !HAVE_NO_RESOLVESTUFF */
             }
 
             hostentfree(host);