[ntp:questions] Creating a socket per address in the ifnet list

Danny Mayer mayer at ntp.org
Thu Aug 26 12:15:17 UTC 2010

On 8/26/2010 3:21 AM, Abhiram wrote:
> When NTP is initializing it binds to WILD CARD v4 and v6 addresses.
> During the process, it retrieves ifnet list from kernel and creates a
> socket for each entry in the ifnet list. If there is a scaled
> configuration, i.e., Assume 1000 addresses are created on an interface
> then ntpd is going to create 1000 sockets. This doesn't scale well and
> it seems like this is not the best way to handle this.
> My questions:
> a. Why is a socket being created/maintained for each element/address
> in the ifnet list?
> b. Is n't it possible to handle all the packets with WILD CARD
> sockets?
> Can someone in the group with NTP expertise please respond with your
> valuable insights?
> Thanks,
> Abhi.

This has changed in the 4.2.6 code. It does fetch all of the addresses
but if you use the interface configuration option you can limit what
addresses it will open sockets for. Which code base are you looking at?


More information about the questions mailing list