git: d3ee609cf29e - stable/12 - ntpd: Support IPv6-only hosts

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Mon, 08 May 2023 17:34:09 UTC
The branch stable/12 has been updated by cy:

URL: https://cgit.FreeBSD.org/src/commit/?id=d3ee609cf29eca3abc81db231a2f4afba42f5bb1

commit d3ee609cf29eca3abc81db231a2f4afba42f5bb1
Author:     Mina Galic <freebsd_igalic.co>
AuthorDate: 2023-05-05 04:33:18 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2023-05-08 04:17:59 +0000

    ntpd: Support IPv6-only hosts
    
    0.pool.* returns only IPv4 addresses.
    2.pool.* returns both, IPv6 and IPv4 addresses.
    
    conservatively extend our IPv4 only pool configuration by adding a
    second pool, which also returns IPv6 addresses.
    
    PR:                     270536
    Reported by:            Lapo Luchini <lapo@lapo.it>
    Pull Request:           https://github.com/freebsd/freebsd-src/pull/731
    Differential Revision:  https://reviews.freebsd.org/D39954
    
    (cherry picked from commit fff1551c0357cc43f6138fecfad1d79d8d8baa15)
---
 usr.sbin/ntp/ntpd/ntp.conf | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/usr.sbin/ntp/ntpd/ntp.conf b/usr.sbin/ntp/ntpd/ntp.conf
index ae0a3d0e6cad..3a56ec9f599c 100644
--- a/usr.sbin/ntp/ntpd/ntp.conf
+++ b/usr.sbin/ntp/ntpd/ntp.conf
@@ -20,24 +20,27 @@
 tos minclock 3 maxclock 6
 
 #
-# The following pool statement will give you a random set of NTP servers
-# geographically close to you.  A single pool statement adds multiple
-# servers from the pool, according to the tos minclock/maxclock targets.
+# The following pool statements will give you a random set of IPv4 and IPv6
+# NTP servers geographically close to you.  A single pool statement adds
+# multiple servers from the pool, according to the tos minclock/maxclock
+# targets.
 # See http://www.pool.ntp.org/ for details.  Note, pool.ntp.org encourages
 # users with a static IP and good upstream NTP servers to add a server
-# to the pool. See http://www.pool.ntp.org/join.html if you are interested.
+# to the pool.  See http://www.pool.ntp.org/join.html if you are interested.
 #
 # The option `iburst' is used for faster initial synchronization.
 #
 pool 0.freebsd.pool.ntp.org iburst
+pool 2.freebsd.pool.ntp.org iburst
 
 #
 # If you want to pick yourself which country's public NTP server
-# you want to sync against, comment out the above pool, uncomment
-# the next one, and replace CC with the country's abbreviation.
-# Make sure that the hostname resolves to a proper IP address!
+# you want to sync against, comment out the above pool statements,
+# uncomment the next ones, and replace CC with the country's abbreviation.
+# Make sure that the hostnames resolves to a proper IP address!
 #
 # pool 0.CC.pool.ntp.org iburst
+# pool 2.CC.pool.ntp.org iburst
 
 #
 # To configure a specific server, such as an organization-wide local