[Date Prev][Date Next] [Chronological] [Thread] [Top]

Strange DNS Queries



>Hi!
>
>I am running a server that uses openldap 1.2.7, nss_ldap-97 and
>pam_ldap-42.
>
>Everything works fine except one thing.
>
>Every time I run a command that uses  getpwent, or similar calls, a
>request to the dns
>server is made that asks for the local name of the server or for '.'. 
>
>The name looked for cames from the file /etc/ldap.conf (directive host
>myhost.mi.infn.it) 
>
>Even if I put "host 127.0.0.1" a request is made to dns asking for
>127.0.0.1
>and every LDAP lookup fails.
>
>Also queries for . (root) are made for a command such ps!
>
>
>In /etc/hosts I have the rigth  entries.
>
>In the file nsswitch.conf I have
>---------
>#
>passwd:         files ldap
>group:          files ldap
>shadow:         files ldap
>#
>hosts:          files dns 
>-------- 
>
>and in host.conf
>---------
>order hosts, bind
>multi on
>---------
>
>
>The most strange thing is that this simple program 
>
>---------
>#include <stdio.h>
>#include <netdb.h>
>#include <netinet/in.h>
>
>struct hostent *entry;
>struct in_addr *ptr;
>char **listptr;
>int length;
>
>int main (int argc,  char *argv[])
>{
>entry=gethostbyname("nn.nn.nn.nn");
>
>printf ("%s\n",entry->h_name);
>
>while ((ptr=(struct in_addr *) *entry->h_addr_list++) != NULL) 
>
>{
>printf ("%s\n",inet_ntoa(*ptr));
>
>}
>
>exit (0);
>}
>---------
>
>works fine doing dns lookups only if /etc/hosts fails.
>
>
>
>The following are lines from tcpdump for the strange queries
>----
>queries for local name
>
>11:40:57.196371 myhost.mi.infn.it.1663 > named.mi.infn.it.domain: 31741+
>(32) (ttl 64, id 31801)
>11:40:57.197967 named.mi.infn.it.domain > myhost.mi.infn.it.1663: 31741*
>q: myhost.mi.infn.i 1/3/3 (169) (ttl 30,id 28507)
>- 
>queries for .
>
>11:45:20.845126 myhost.mi.infn.it.1663 > named.mi.infn.it.domain: 52936+
>A? . (17) (ttl 64, id 34165)
>11:45:20.846037 named.mi.infn.it.domain > myhost.mi.infn.it.1663: 52936
>q: . 0/1/0 (90) (ttl 30, id 33251)
>----
>
>Has anyone encountered this behaviour before? Any Ideas?
>
>Tkanks
>Giuseppe Lo Biondo
>
>