(slightly out of topic) libresolv

Hi, Today I became curious of something that is completely trivial but perhaps very educational... Anybody knows if libresolv checks up the nameservers in /etc/resolv.conf everytime somebody calls gethostbyname or any other call of the family or if it has some sort of smart routine, like to make this smarter it only parses /etc/resolv.conf if its mtime has changed...

Anybody knows if libresolv checks up the nameservers in /etc/resolv.conf everytime somebody calls gethostbyname or any other call of the family or if it has some sort of smart routine, like to make this smarter it only parses /etc/resolv.conf if its mtime has changed...
No, it's not smart. It reads /etc/resolv.conf once the first time a name resoultion is required, then stores the IP addresses of the DNS servers for later use. This can lead to problems. For example, the web proxy, wwwoffle, which is started by the boot scripts in many SuSE implementations, can be confused by a dialup system changing /etc/resolv.conf when the connection is made. wwwoffle reads and stores the DNS server IP addresses early on, then can't tell when ppp or whatever changes the DNS servers as it goes online. -- "...our desktop is falling behind stability-wise and feature wise to KDE ...when I went to Mexico in December to the facility where we launched gnome, they had all switched to KDE3." - Miguel de Icaza, March 2003
participants (2)
-
Derek Fountain
-
Raúl Gutiérrez Segalés