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)
Sun, Sep 28, 10:17 AM
Unknown Object (File)
Thu, Sep 25, 11:13 AM
Unknown Object (File)
Sun, Sep 21, 3:59 AM
Unknown Object (File)
Sep 4 2025, 2:16 PM
Unknown Object (File)
Sep 2 2025, 3:00 PM
Unknown Object (File)
Jul 28 2025, 8:23 AM
Unknown Object (File)
Jul 7 2025, 7:14 AM
Unknown Object (File)
Jul 5 2025, 10:59 PM
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.