My appologies. I forgot to include the actual patch! Here it is:
*** src/cache_cf.c.jkj Mon Feb 16 14:10:11 1998
--- src/cache_cf.c Mon Feb 16 14:11:13 1998
***************
*** 131,136 ****
--- 131,137 ----
#define DefaultCleanRate -1 /* disabled */
#define DefaultDnsChildren 5 /* 5 processes */
#define DefaultOptionsResDefnames 0 /* default off */
+ #define DefaultOptionsResResolver 0 /* default off */
#define DefaultOptionsAnonymizer 0 /* default off */
#define DefaultOptionsIcpHitStale 0 /* default off */
#define DefaultRedirectChildren 5 /* 5 processes */
***************
*** 1219,1224 ****
--- 1220,1227 ----
parseIntegerValue(&Config.dnsChildren);
else if (!strcmp(token, "dns_defnames"))
parseOnOff(&Config.Options.res_defnames);
+ else if (!strcmp(token, "dns_resolver"))
+ parseOnOff(&Config.Options.res_resolver);
else if (!strcmp(token, "redirect_program"))
parsePathname(&Config.Program.redirect, 1);
***************
*** 1610,1615 ****
--- 1613,1619 ----
Config.levelTwoDirs = DefaultLevelTwoDirs;
Config.Options.log_udp = DefaultOptionsLogUdp;
Config.Options.res_defnames = DefaultOptionsResDefnames;
+ Config.Options.res_resolver = DefaultOptionsResResolver;
Config.Options.anonymizer = DefaultOptionsAnonymizer;
Config.Options.icp_hit_stale = DefaultOptionsIcpHitStale;
Config.Options.enable_purge = DefaultOptionsEnablePurge;
*** src/cache_cf.h.jkj Mon Feb 16 14:08:54 1998
--- src/cache_cf.h Mon Feb 16 14:09:38 1998
***************
*** 274,279 ****
--- 274,280 ----
int log_udp;
int enable_purge;
int res_defnames;
+ int res_resolver;
int anonymizer;
int client_db;
int query_icmp;
*** src/dns.c.jkj Mon Feb 16 14:00:19 1998
--- src/dns.c Mon Feb 16 14:08:26 1998
***************
*** 129,135 ****
--- 129,139 ----
int sfd;
int fd;
int len;
+ int oc = 0;
LOCAL_ARRAY(char, buf, 128);
+ char *dnsopts[2];
+
+ dnsopts[0] = dnsopts[1] = (char *)0;
cfd = comm_open(SOCK_STREAM,
0,
***************
*** 201,210 ****
fclose(debug_log);
close(fd);
close(cfd);
if (Config.Options.res_defnames)
! execlp(command, "(dnsserver)", "-D", NULL);
! else
! execlp(command, "(dnsserver)", NULL);
debug(50, 0, "dnsOpenServer: %s: %s\n", command, xstrerror());
_exit(1);
return 0;
--- 205,216 ----
fclose(debug_log);
close(fd);
close(cfd);
+
if (Config.Options.res_defnames)
! dnsopts[oc++] = "-D";
! if (Config.Options.res_resolver)
! dnsopts[oc++] = "-R";
! execlp (command, "(dnsserver)", dnsopts[0], dnsopts[1], NULL);
debug(50, 0, "dnsOpenServer: %s: %s\n", command, xstrerror());
_exit(1);
return 0;
*** src/dnsserver.c.jkj Mon Feb 16 13:59:11 1998
--- src/dnsserver.c Mon Feb 16 14:00:12 1998
***************
*** 280,286 ****
#endif
#endif
! while ((c = getopt(argc, argv, "vhdD")) != -1) {
switch (c) {
case 'v':
printf("dnsserver version %s\n", SQUID_VERSION);
--- 280,286 ----
#endif
#endif
! while ((c = getopt(argc, argv, "vhdDR")) != -1) {
switch (c) {
case 'v':
printf("dnsserver version %s\n", SQUID_VERSION);
***************
*** 296,301 ****
--- 296,306 ----
case 'D':
#ifdef RES_DEFNAMES
_res.options |= RES_DEFNAMES;
+ #endif
+ break;
+ case 'R':
+ #ifdef RES_DNSRCH
+ _res.options |= RES_DNSRCH;
#endif
break;
case 'h':
*** src/squid.conf.pre.in.jkj Mon Feb 16 19:43:41 1998
--- src/squid.conf.pre.in Mon Feb 16 19:47:10 1998
***************
*** 564,569 ****
--- 564,586 ----
#
#dns_defnames off
+ # TAG: dns_resolver
+ # Normally the 'dnsserver' disables the RES_DNSRCH resolver
+ # option (see res_init(3)). This prevents the resolver from
+ # searching through domain lists specified in resolv.conf. To
+ # enable behaviour closer to the default, turn this on. This
+ # will allow single-component hostnames to be resolved across all
+ # domains defined in resolv.conf.
+ #
+ # This is most useful when you have only a single cache in a domain
+ # or a hierarchy of caches in a single domain (for example sco.com).
+ # Enabling this option will allow the cache to resolve host names
+ # exactly as they would be by programs such as `ping' or `telnet'.
+ #
+ # The default is off.
+ #
+ #dns_resolver off
+
# TAG: unlinkd_program
# Specify the location of the executable for file deletion process.
#
Received on Mon Feb 16 1998 - 20:07:21 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:38:54 MST