Project

General

Profile

Bug #7110

Empty custom NTP ACL produces syntax error in /var/etc/ntpd.conf

Added by John Silva 3 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
NTPD
Target version:
Start date:
01/10/2017
Due date:
% Done:

100%

Affected version:
2.3
Affected Architecture:

Description

On the NTPD ACL tab [Services/NTP/ACLs] the blank default entry under Custom Access Restrictions results in addition of a naked restrict keyword to /var/etc/ntpd.conf. This results in a syntax error that is logged during ntpd startup.

2017-01-10T17:57:29.426040-08:00 pfsense <ntp.err> ntpd[78938]: line 19 column 0 syntax error, unexpected T_EOC
2017-01-10T17:57:29.426257-08:00 pfsense <ntp.err> ntpd[78938]: syntax error in /var/etc/ntpd.conf line 19, column 0

ntpd ignores the invalid configuration line and continues to run after logging the error.

#
# pfSense ntp configuration file
#

tinker panic 0
# Orphan mode stratum
tos orphan 12

# Upstream Servers
server xx.xx.xx.xx iburst maxpoll 9

statsdir /var/log/ntp
logconfig =syncall +clockall +peerall +sysall
driftfile /var/db/ntpd.drift
restrict default kod limited nomodify nopeer notrap
restrict -6 default kod limited nomodify nopeer notrap
restrict

interface ignore all
interface listen vtnet0

Running current 2.3.3 snapshot.

2.3.3-DEVELOPMENT (amd64) 
built on Tue Jan 10 05:04:57 CST 2017 
FreeBSD 10.3-RELEASE-p15

Associated revisions

Revision d90beba6
Added by Jim Pingle 3 months ago

Do not write a 'restrict' line to the NTP config if it will be empty. Fixes #7110

Revision 6ca5c3ca
Added by Jim Pingle 3 months ago

Do not write a 'restrict' line to the NTP config if it will be empty. Fixes #7110

Revision 59c6b72e
Added by Jim Pingle 3 months ago

Do not write a 'restrict' line to the NTP config if it will be empty. Fixes #7110

History

#1 Updated by Jim Pingle 3 months ago

  • Assignee set to Jim Pingle
  • Target version set to 2.4.0

#2 Updated by Jim Pingle 3 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

#3 Updated by John Silva 3 months ago

Can confirm that fix works on current 2.3.3 snapshot. Thanks, Jim!

#4 Updated by Jim Pingle 3 months ago

  • Status changed from Feedback to Resolved

#5 Updated by Jim Pingle about 2 months ago

  • Target version changed from 2.4.0 to 2.3.3

Also available in: Atom PDF