Subject: Re: [dnsop] Re: getaddrinfo/TTL and resolver application-interface

From: Pekka Savola <[email-masked]>
Date: Sun, 1 Aug 2004 06:15:29 +0300 (EEST)

On Sun, 1 Aug 2004, Jun-ichiro itojun Hagino wrote:
> 	getaddrinfo() is not a DNS-only function; it can lookup hostname-to
> 	address using /etc/hosts, NIS, LDAP, whatever you have.  what value
> 	would you put in to ai_ttl when the lookup is done by non-DNS method?

-1, unless something else is provided?

-- 
Pekka Savola                 "You each name yourselves king, yet the
Netcore Oy                    kingdom bleeds."
Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings

.
dnsop resources:_____________________________________________________
web user interface: http://darkwing.uoregon.edu/~llynch/dnsop.html
mhonarc archive: http://darkwing.uoregon.edu/~llynch/dnsop/index.html

---

From: [email-masked]
Date: Mon, 02 Aug 2004 07:03:01 +0900

>-1, unless something else is provided?

	then what do you expect application to do with the data?  when does
	it expire?  any fabricated value (-1, 0, whatever) in ai_ttl is
	problematical to TTL-aware application, IMHO.  what i'm suggesting
	is to use DNS-only API like getrrrsetbyname() if you want TTL.

itojun
.

---

From: Pekka Savola <[email-masked]>
Date: Mon, 2 Aug 2004 01:48:53 +0300 (EEST)

> 	is to use DNS-only API like getrrrsetbyname() if you want TTL.

Let's assume that currently apps keep records forever, i.e., "-1" 
(infinite).

If apps would use TTL info to requery the addresses now and then, 
telling them that a particular record has infinite lifetime (because 
lifetime information wasn't provided) seems like pretty much equal to 
the situation now -- i.e., it doesn't make situations worse. (And 
infinite would actually probably be rather accurate esp. with 
/etc/hosts).

getrrsetbyname has the generic problem that the applications don't
want to care about the lookup mechanism used.  /etc/hosts or whatever
is just as fine as DNS.  Thus I think only apps which specifically
know that they definitely want their answers to come from DNS (and not
from hosts file or whateveR) can use getrrsetname.  But I don't think
the majority cares, or should need to care.

.