It is more complicated than it appears. First, remember that "resolve"
means the process of translating a host name (as specified by the user) to
an IP address. Now it turns out that the common Unix method for resolving
involves trying not only the specified name, but also that name with the
domains listed in /etc/resolv.conf appended. But the routine that does this
does *not* return the "full" name back to the caller -- the caller gets the
IP address and nothing more.
Ping does something additional -- once it gets the IP address, it then "does
a reverse lookup" to translate the IP address back into a domain name. But
this translation is done via an entirely different database, the "PTR
records" in DNS. And if the PTR records aren't set up correctly, the
reverse lookup will fail.
Perversely, my company provides an example of this, and you can see the
effect on ping, it does not use the host name as you would expect:
$ ping www.pingtel.com
PING www.pingtel.com (216.142.118.36) 56(84) bytes of data.
64 bytes from 216.142.118.36: icmp_seq=1 ttl=240 time=52.3 ms
64 bytes from 216.142.118.36: icmp_seq=2 ttl=240 time=49.4 ms
64 bytes from 216.142.118.36: icmp_seq=3 ttl=240 time=46.5 ms
64 bytes from 216.142.118.36: icmp_seq=4 ttl=240 time=50.6 ms
64 bytes from 216.142.118.36: icmp_seq=5 ttl=240 time=53.7 ms
64 bytes from 216.142.118.36: icmp_seq=6 ttl=240 time=44.6 ms
I suppose you could demand that all Subversion clients on your machine were
to go through this process (or something similar), but it would have severe
upward-compatibility problems, I'd think -- If a working copy already exists
that was checked out with an abbreviated or alternative host name, a client
that canonicalized all host names would be unable to use it.
Dale
-----Original Message-----
From: Jaap Vermeulen [mailto:jaap@skyscape.com]
I've been looking at the responses to this message on the mailing list.
What I'm asking for is much simpler than what is discussed. And it follows
standard (and predictable) practices.
When you provide a name, it will be resolved to a FQDN. In other words, if
you type "blarvitz", the DNS libraries will automatically add the domain
based on a list of primary/subdomains that your machine is in. (This is
true both for UNIX or Windows.) For example, try a ping to your SVN server
without the primary domain and examine its output; it will have the FQDN.
This is done by routines like "gethostbyname()" or "getaddrinfo()".
The only thing I'm asking for is that the host part of the svn: URL is
resolved to a FQDN. This can be done either by resolving both the given and
stored host name and then comparing them (probably best), or by storing the
resolved host name and only resolving the given host name and then comparing
it.
This avoid issues where if you provide a partial host name, it will not
match with the stored (partial) host name, even though they will both be
resolved to the same FQDN. If an IP address is used, you simply try a
reverse lookup. If either the lookup or the reverse lookup fails, you keep
the original string (of course). In the end the host names either match or
don't match, and the result is no worse than what we have now. :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Nov 15 16:11:11 2004