Page MenuHomeFreeBSD

Modernize usage of "restrict" keyword in ntp.conf
ClosedPublic

Authored by ian on Jun 23 2018, 2:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 18, 10:45 AM
Unknown Object (File)
Wed, Mar 18, 4:21 AM
Unknown Object (File)
Tue, Mar 17, 3:29 AM
Unknown Object (File)
Sun, Mar 15, 5:33 PM
Unknown Object (File)
Fri, Mar 13, 9:56 AM
Unknown Object (File)
Feb 27 2026, 2:53 PM
Unknown Object (File)
Feb 27 2026, 7:17 AM
Unknown Object (File)
Feb 25 2026, 8:04 AM
Subscribers

Details

Summary

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 was followed up with some contrib/ntp code inspection to verify that the -4/-6 keywords are basically no-ops in all contexts now.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Looks good.

Thanks for taking care of this.

This revision is now accepted and ready to land.Jun 23 2018, 3:15 AM
This revision was automatically updated to reflect the committed changes.