Re: NTP: Possible permissions bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Fri, 2014-05-09 at 08:47 -0700, Kyle Terrien wrote:
> I was using an old hpHosts /etc/hosts file (to block ads). I reverted it
> to the stock /etc/hosts file in the package filesystem, and ntp-4.2.7
> runs without thrashing.
> 
> I'm re-enabling Adblock Plus for now--until I get around to creating an
> updated hosts table.

I'm using the ad-blocking hosts file from

http://someonewhocares.org/hosts/zero/

though I replace 0.0.0.0 with 0.0.0.1 so that connect() returns EINVAL
instead of connecting to localhost.  However, that file is under 300KB,
while the hpHosts file is currently over 16MB.  From looking at output
from

$ ltrace -S telnet 
telnet> open telnet.google.com
Server lookup failure:  telnet.google.com:telnet, Name or service not known
telnet> open telnet.apple.com
Server lookup failure:  telnet.apple.com:telnet, Name or service not known
telnet> 

it appears that getaddrinfo() rescans /etc/hosts in full for each
lookup.  That's not obviously related to the problem you're having with
ntpd, but it does seem that huge ad-blocking host files are horribly
inefficient.  Does anyone know a way to load them into database of some
sort, perhaps a NIS database that could be referenced in /etc/host.conf,
e.g.

order hosts,nis,bind

Carl



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux