Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I get true DNS TTL info into Squids IP cache?

cache DNS info IP Squid TTL
0
Posted

How can I get true DNS TTL info into Squids IP cache?

0

• 2.10 My platform is BSD/OS or BSDI and I can’t compile Squid • 2.11 Problems compiling libmiscutil.a on Solaris • 2.12 I have problems compiling Squid on Platform Foo. • 2.13 I see a lot warnings while compiling Squid. • 2.

0

If you have source for BIND, you can modify it as indicated in the diff below. It causes the global variable _dns_ttl_ to be set with the TTL of the most recent lookup. Then, when you compile Squid, the configure script will look for the _dns_ttl_ symbol in libresolv.a. If found, dnsserver will return the TTL value for every lookup. This hack was contributed by Endre Balint Nagy. diff -ru bind-4.9.4-orig/res/gethnamaddr.c bind-4.9.4/res/gethnamaddr.c — bind-4.9.4-orig/res/gethnamaddr.c Mon Aug 5 02:31:35 1996 +++ bind-4.9.4/res/gethnamaddr.c Tue Aug 27 15:33:11 1996 @@ -133,6 +133,7 @@ } align; extern int h_errno; +int _dns_ttl_; #ifdef DEBUG static void @@ -223,6 +224,7 @@ host.h_addr_list = h_addr_ptrs; haveanswer = 0; had_error = 0; + _dns_ttl_ = -1; while (ancount– > 0 && cp < eom && !had_error) { n = dn_expand(answer->buf, eom, cp, bp, buflen); if ((n < 0) || !(*name_ok)(bp)) { @@ -232,8 +234,11 @@ cp += n; /* name */ type = _getshort(cp); cp += INT16SZ; /* type */ - class = _g

0

• 2.10 My platform is BSD/OS or BSDI and I can’t compile Squid • 2.11 Problems compiling libmiscutil.a on Solaris • 2.12 I have problems compiling Squid on Platform Foo. • 2.13 I see a lot warnings while compiling Squid. • 2.14 Building Squid on OS/2 • 2.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.