From owner-svn-src-stable@freebsd.org Wed Jul 4 14:10:37 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4829F103A97D; Wed, 4 Jul 2018 14:10:37 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE0AF7D434; Wed, 4 Jul 2018 14:10:36 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B56F942E6; Wed, 4 Jul 2018 14:10:36 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w64EAaZ6024274; Wed, 4 Jul 2018 14:10:36 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w64EAar3024273; Wed, 4 Jul 2018 14:10:36 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201807041410.w64EAar3024273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 4 Jul 2018 14:10:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r335950 - stable/10/etc X-SVN-Group: stable-10 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: stable/10/etc X-SVN-Commit-Revision: 335950 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2018 14:10:37 -0000 Author: ian Date: Wed Jul 4 14:10:36 2018 New Revision: 335950 URL: https://svnweb.freebsd.org/changeset/base/335950 Log: MFC r335595-r335596 r335595: Modernize usage of "restrict" keyword in ntp.conf It is no longer necessary to specify a -4/-6 flag on any ntp.conf keyword. The address type is inferred from the address itself as necessary. "restrict default" statements always apply to both address families regardless of any -4/-6 flag that may be present. So this change just tidies up our default config by removing the redundant restrict -6 statement and comment, and by removing the -6 flag from the restrict keyword that allows access from localhost. This change was inspired by the patches provided in PRs 201803 and 210245, and included some contrib/ntp code inspection to verify that the -4/-6 keywords are basically no-ops in all contexts now. PR: 201803 210245 Differential Revision: https://reviews.freebsd.org/D15974 r335596: Fix a comment; the ntp leaplist file is updated periodically, but not weekly (it's only updated when a check shows it's within 30 days of expiring). PR: 207138 Modified: stable/10/etc/ntp.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/ntp.conf ============================================================================== --- stable/10/etc/ntp.conf Wed Jul 4 14:04:23 2018 (r335949) +++ stable/10/etc/ntp.conf Wed Jul 4 14:10:36 2018 (r335950) @@ -62,15 +62,13 @@ pool 0.freebsd.pool.ntp.org iburst # See http://support.ntp.org/bin/view/Support/AccessRestrictions # for more information. # -restrict default limited kod nomodify notrap noquery nopeer -restrict -6 default limited kod nomodify notrap noquery nopeer -restrict source limited kod nomodify notrap noquery +restrict default limited kod nomodify notrap noquery nopeer +restrict source limited kod nomodify notrap noquery # # Alternatively, the following rules would block all unauthorized access. # #restrict default ignore -#restrict -6 default ignore # # In this case, all remote NTP time servers also need to be explicitly # allowed or they would not be able to exchange time information with @@ -85,7 +83,7 @@ restrict source limited kod nomodify notrap noquer # # The following settings allow unrestricted access from the localhost restrict 127.0.0.1 -restrict -6 ::1 +restrict ::1 # # If a server loses sync with all upstream servers, NTP clients @@ -101,6 +99,6 @@ restrict -6 ::1 # See http://support.ntp.org/bin/view/Support/ConfiguringNTP#Section_6.14. # for documentation regarding leapfile. Updates to the file can be obtained # from ftp://time.nist.gov/pub/ or ftp://tycho.usno.navy.mil/pub/ntp/. -# Use either leapfile in /etc/ntp or weekly updated leapfile in /var/db. +# Use either leapfile in /etc/ntp or periodically updated leapfile in /var/db. #leapfile "/etc/ntp/leap-seconds" leapfile "/var/db/ntpd.leap-seconds.list"