100-do-not-use-defdname.patch 1.4 KB

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