Hi Jan, Jan Ritzerfeld wrote:
Am Dienstag, 14. Oktober 2008 schrieb Bernd Nies:
Is the toplevel .local somewhere hardcoded in the NSS libs? [...]
AFAIK it is a glibc patch. The .local domain is dedicated to multicast DNS: http://files.multicastdns.org/draft-cheshire-dnsext-multicastdns.txt
Thanks. Indeed an strace of "getent hosts something.local" shows that it tries to contact a multicast IP address before it timeouts for 5s: 08:31:25 ioctl(3, SIOCGIFFLAGS, {ifr_name="lo", ifr_flags=IFF_UP|IFF_LOOPBACK|IFF_RUNNING}) = 0 08:31:25 ioctl(3, SIOCGIFFLAGS, {ifr_name="lo", ifr_flags=IFF_UP|IFF_LOOPBACK|IFF_RUNNING}) = 0 08:31:25 ioctl(3, SIOCGIFFLAGS, {ifr_name="eth0", ifr_flags=IFF_UP|IFF_BROADCAST|IFF_RUNNING|IFF_MULTICAST}) = 0 08:31:25 ioctl(3, SIOCGIFINDEX, {ifr_name="eth0", ifr_index=2}) = 0 08:31:25 ioctl(3, SIOCGIFFLAGS, {ifr_name="vmnet8", ifr_flags=IFF_UP|IFF_BROADCAST|IFF_RUNNING|IFF_MULTICAST}) = 0 08:31:25 ioctl(3, SIOCGIFINDEX, {ifr_name="vmnet8", ifr_index=3}) = 0 08:31:25 setsockopt(3, SOL_IP, IP_RECVTTL, [1], 4) = 0 08:31:25 setsockopt(3, SOL_IP, IP_MULTICAST_IF, "\0\0\0\0\0\0\0\0\2\0\0\0", 12) = 0 08:31:25 sendto(3, "\231\r\1\0\0\1\0\0\0\0\0\0\tsomething\5local\0\0\34\0"..., 33, 0, {sa_family=AF_INET, sin_port=htons(5353), sin_addr=inet_addr("224.0.0.251")}, 28) = 33 08:31:25 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4 08:31:25 setsockopt(4, SOL_IP, IP_RECVTTL, [1], 4) = 0 08:31:25 setsockopt(4, SOL_IP, IP_MULTICAST_IF, "\0\0\0\0\0\0\0\0\3\0\0\0", 12) = 0 08:31:25 sendto(4, "\231\r\1\0\0\1\0\0\0\0\0\0\tsomething\5local\0\0\34\0"..., 33, 0, {sa_family=AF_INET, sin_port=htons(5353), sin_addr=inet_addr("224.0.0.251")}, 28) = 33 08:31:25 gettimeofday({1224138685, 489039}, NULL) = 0 08:31:25 poll(^C But it ignores the lookup order defined in /etc/nsswitch.conf. It should return the entry from /etc/hosts and then stop. I checked the command "getent hosts something.local" with an entry in /etc/hosts and hosts order "files dns" on various Unixes: Operating System glibc Result ---------------------------------------------- Solaris 8 N/A OK Solaris 9 N/A OK Solaris 10 N/A OK RedHat ES 3u7 2.3.2 OK RedHat ES 4u4 2.3.4-2.25 OK SLES 9p4 2.3.3-98.94 10s delay SLES 10p1 2.4-31.30 OK Suse Linux 9.0 2.3.2-88 OK Suse Linux 10.1 2.4-28 15s delay openSUSE 11.0 2.8-14.1 15s delay Bye, Bernd -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org