Project

General

Profile

Actions

Bug #7034

closed

NTP Orphan Mode stratum setting is not displayed in input field

Added by Thomas Rieschl almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
NTPD
Target version:
Start date:
12/23/2016
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
All
Affected Architecture:
All

Description

The "Orphan Mode" setting in the NTP config is not displayed in the input form field.

It is used, though. I checked the config file (/var/etc/ntpd.conf), the correct value is used there. When submitting the form with the empty field, 12, the default value is used in the config file.

I could reproduce it in the current stable release (2.3.2-RELEASE-p1 (amd64)), on a firewall used in production and the current nightly snapshot (2.4.0-BETA (amd64), built on Thu Dec 22 16:08:06 CST 2016), freshly installed in a VM. I don't know if non-amd64 architectures are also affected.

Actions #1

Updated by Jim Pingle almost 8 years ago

  • Status changed from New to Confirmed
  • Assignee set to Jim Pingle
  • Target version set to 2.4.0
  • Affected Architecture All added
  • Affected Architecture deleted ()
Actions #2

Updated by Jim Pingle almost 8 years ago

  • Status changed from Confirmed to Feedback
  • % Done changed from 0 to 100
Actions #3

Updated by Thomas Rieschl almost 8 years ago

Wow, that was fast :)
Thanks, and happy holidays!

Actions #4

Updated by Thomas Rieschl almost 8 years ago

I just tested it with the current nightly (2.4.0-BETA (amd64) built on Wed Jan 04 13:38:53 CST 2017; FreeBSD 11.0-RELEASE-p5). In general it works as expected, although, due to a typo, I noticed that the input is not being validated or filtered.
I could enter a non-numeric value which was accepted, but after restarting the ntpd the following error was logged:

syntax error in /var/etc/ntpd.conf line 7, column 7
line 7 column 7 syntax error, unexpected T_String, expecting T_Integer

Also, whitespace before and after the number is not removed, but that is just cosmetic and doesn't trigger an error.

Thanks!

Actions #5

Updated by Jim Pingle almost 8 years ago

  • Status changed from Feedback to Confirmed

Yep, something isn't quite right with how it's doing validation.

Actions #6

Updated by Jim Pingle almost 8 years ago

  • Status changed from Confirmed to Feedback
Actions #7

Updated by Thomas Rieschl almost 8 years ago

Just tested again with 2.4.0-BETA (amd64) built on Fri Jan 06 01:41:07 CST 2017, FreeBSD 11.0-RELEASE-p5 and it's working now as expected. Also, the weird behavior when entering "12" is gone :)

Although, your trim in line 98 (https://github.com/pfsense/pfsense/commit/531c348639adb8b7e7d190e8fdab709fea61f61a#diff-e65382559f6744c6c0a4ab8ac8be6a3fR98) is moot, because " 13" won't validate as numeric anyway.

Thanks!

Actions #8

Updated by Jim Pingle almost 8 years ago

  • Status changed from Feedback to Resolved
Actions #9

Updated by Jim Pingle almost 8 years ago

  • Target version changed from 2.4.0 to 2.3.3
Actions

Also available in: Atom PDF