freebsd-nq/contrib/ntp/ntpd
Bjoern A. Zeeb 2bddeb8538 In case ntp cannot resolve a hostname on startup it will queue the entry
for resolving by a child process that, upon success, will add the entry
to the config of the running running parent process.

Unfortunately there are a couple of bugs with this, fixed in various
later versions of upstream in potentially different ways due to other
code changes:

1) Upon server [-46] <FQDN> the [-46] are used as FQDN for later resolving
   which does not work.  Make sure we always pass the name (or IP there).

2) The intermediate file to carry the information to the child process
   does not know about -4/-6 restrictions, so that a dual-stacked host
   could resolve to an IPv6 address but that might be unreachable (see
   r223626) leading to no working synchronization ignoring a IPv4 record.
   Thus alter the intermediate format to also pass the address family
   (AF_UNSPEC (default), AF_INET or AF_INET6) to the child process
   depending on -4 or -6.

3) Make the child process to parse the new intermediate file format and
   save the address family for getaddrinfo() hints flags.

4) Change child to always reload resolv.conf calling res_init() before
   trying to resolve names.  This will pick up resolv.conf changes or
   new resolv.confs should they have not existed or been empty or
   unusable on ntp startup.  This fix is more conditional in upstream
   versions but given FreeBSD has res_init there is no need for the
   configure logic as well.

Approved by:	roberto
Sponsored by:	Sandvine Incorporated
MFC after:	9 days
2011-06-29 13:01:10 +00:00
..
check_y2k.c
cmd_args.c Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
jupiter.h
Makefile.am
Makefile.in Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
ntp_config.c In case ntp cannot resolve a hostname on startup it will queue the entry 2011-06-29 13:01:10 +00:00
ntp_control.c
ntp_crypto.c Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
ntp_filegen.c
ntp_intres.c In case ntp cannot resolve a hostname on startup it will queue the entry 2011-06-29 13:01:10 +00:00
ntp_io.c Compare port numbers correctly. They are stored by SRCPORT() 2011-06-28 09:46:25 +00:00
ntp_loopfilter.c
ntp_monitor.c
ntp_peer.c
ntp_proto.c
ntp_refclock.c
ntp_request.c Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
ntp_restrict.c
ntp_timer.c Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
ntp_util.c
ntpd-opts.c Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
ntpd-opts.def
ntpd-opts.h Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
ntpd-opts.menu
ntpd-opts.texi Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
ntpd.1 Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
ntpd.c Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
ntpdbase-opts.def
ntpdsim-opts.c Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
ntpdsim-opts.def
ntpdsim-opts.h Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
ntpdsim-opts.menu
ntpdsim-opts.texi Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
ntpdsim.1 Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
ntpsim.c
ppsapi_timepps.h
refclock_acts.c
refclock_arbiter.c
refclock_arc.c
refclock_as2201.c
refclock_atom.c
refclock_bancomm.c
refclock_chronolog.c
refclock_chu.c
refclock_conf.c
refclock_datum.c
refclock_dumbclock.c Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
refclock_fg.c
refclock_gpsvme.c
refclock_heath.c
refclock_hopfpci.c
refclock_hopfser.c Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
refclock_hpgps.c
refclock_irig.c
refclock_jjy.c Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
refclock_jupiter.c
refclock_leitch.c
refclock_local.c
refclock_msfees.c
refclock_mx4200.c
refclock_neoclock4x.c
refclock_nmea.c Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
refclock_oncore.c
refclock_palisade.c Merge 4.2.4p8 into contrib (r200452 & r200454). 2009-12-15 14:58:10 +00:00
refclock_palisade.h
refclock_parse.c
refclock_pcf.c
refclock_pst.c
refclock_ripencc.c
refclock_shm.c
refclock_tpro.c
refclock_trak.c
refclock_true.c
refclock_tt560.c
refclock_ulink.c
refclock_wwv.c
refclock_wwvb.c
refclock_zyfer.c