This is the mail archive of the
mailing list for the glibc project.
[Bug libc/2099] Support for SRV records in getaddrinfo
- From: "binki at gentoo dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Tue, 20 Mar 2012 06:42:41 +0000
- Subject: [Bug libc/2099] Support for SRV records in getaddrinfo
- Auto-submitted: auto-generated
- References: <firstname.lastname@example.org/bugzilla/>
Nathan Phillip Brink (binki) <binki at gentoo dot org> changed:
What |Removed |Added
CC| |binki at gentoo dot org
--- Comment #7 from Nathan Phillip Brink (binki) <binki at gentoo dot org> 2012-03-20 06:42:41 UTC ---
(In reply to comment #4)
> Actually, it won't work. RFC 2782 specifies that all SRV records have a host
> name attached. It's not just information about the port. Given that, what would
> getaddrinfo ("host1.domain", "someserv", ....)
> mean if the SRV record for
I'm quite sure that when the SRV spec says "domain", it is referring to the
full domain. Not the domain in the sense of domainname(1). I.e., you would
search for _someserv._tcp.host1.domain instead of _someserv._tcp.domain. Am I
misreading the spec here?
> has the host name "host2.domain" associated? It makes no sense. There can only
> be a functions which queries the SRV records based on the service name alone.
> Trying to embed this into getaddrinfo is no good.
If the word "domain" in the SRV spec is interpreted properly, this objection
makes no sense. Sure, it is likely enough that getaddrinfo("domain",
"someserv", ...) will not tell you to go ahead and connect directly to
"domain". But getaddrinfo("host1.domain", "someserv", ...) would likely not hit
any SRV records at all and fall back to the traditional DNS lookups.
The main objection to this change would be that programs would suddenly break
if getaddrinfo(node, serv, ...) would suddenly tried to find the appropriate
host for accessing serv at node. In reality, few domains set SRV records for
services where there is no program support. So, most programs which would be
affected by this change would behave no differently if getaddrinfo() started
actually looking up services instead of just hosts.
It would be really nice to get SRV support in applications with no added
complexity. Maybe the interface provided by ruli
http://nongnu.org/ruli/tutorial/getaddrinfo.html is a way to get these
advantages without departing too far from getaddrinfo()...
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.