Comment # 11 on bug 782060 from
(In reply to Reinhard Max from comment #10)
> Setting the 2nd argument of getaddrinfo() to NULL asks for an arbitrary port
> rather than the port for NTP (123), and I wonder why this change hasn't
> broken anything (or it has and we just didn't notice).

getaddrinfo(3) says about the 2nd argument
> If service is NULL, then the port number
> of the returned socket addresses will be left uninitialized.

which is exactly what we want here, because we dont need the port number
and would just throw away the value which we looked up in /etc/services
(unless the surrounding code changed a lot)

Though doing one lookup per IP for UDP would still be a lot better
than the original 10 or so lookups


You are receiving this mail because: