Bug #7034
closedNTP Orphan Mode stratum setting is not displayed in input field
100%
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.
      
      Updated by Jim Pingle almost 9 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 (
) 
      
      Updated by Jim Pingle almost 9 years ago
      
    
    - Status changed from Confirmed to Feedback
 - % Done changed from 0 to 100
 
Applied in changeset d0db0f9bcae3d368c2d83cc7bc4b888fd07eade3.
      
      Updated by Thomas Rieschl almost 9 years ago
      
    
    Wow, that was fast :)
Thanks, and happy holidays!
      
      Updated by Thomas Rieschl almost 9 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!
      
      Updated by Jim Pingle almost 9 years ago
      
    
    - Status changed from Feedback to Confirmed
 
Yep, something isn't quite right with how it's doing validation.
      
      Updated by Jim Pingle almost 9 years ago
      
    
    - Status changed from Confirmed to Feedback
 
Applied in changeset 531c348639adb8b7e7d190e8fdab709fea61f61a.
      
      Updated by Thomas Rieschl almost 9 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!
      
      Updated by Jim Pingle almost 9 years ago
      
    
    - Status changed from Feedback to Resolved
 
      
      Updated by Jim Pingle over 8 years ago
      
    
    - Target version changed from 2.4.0 to 2.3.3