Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 85090

Summary: ntp init script can't punch servers through firewall with 'prefer' keyword
Product: [Retired] Red Hat Linux Reporter: Dave Heistand <davidbh-redhatbeta>
Component: ntpAssignee: Harald Hoyer <harald>
Status: CLOSED DUPLICATE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: mattdm
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 18:51:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Dave Heistand 2003-02-25 16:49:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203

Description of problem:
using the 'prefer' keyword in /etc/ntp.conf like so:
server  128.197.27.108 prefer

causes errors when the firewall is started:
sudo service ntpd restart
ntpd: Removing firewall 

ntpd: Removing firewall opening for prefer port 123iptables v1.2.7a:
host/network `prefer' not found
Try `iptables -h' or 'iptables --help' for more information.

ntpd: Opening firewall for input from prefer port 123iptables v1.2.7a:
host/network `prefer' not found
Try `iptables -h' or 'iptables --help' for more information.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. edit /etc/ntpd.conf
2. add 'prefer' to any of your ntp servers
3. sudo service ntpd restart
    

Actual Results:  ntp shows errors when trying to punch holes through firewall

Expected Results:  using 'prefer' should not cause the errors.

Additional info:

here is output from a patch that seems to work for me...

@@ -44,7 +44,7 @@
         fi
        timeservers=`/bin/sed \
                  -n -e 's/\#.*$//;/127.*/d' \
-                 -e 's/^[[:blank:]]*server[[:blank:]][[:blank:]]*\(.*\)/\1/p' \
+                 -e
's/^[[:blank:]]*server[[:blank:]][[:blank:]]*\([^[:blank:]]*\).*/\1/p' \
                  -e
's/^[[:blank:]]*server[[:blank:]]+\([[:alnum:].]+\)[[:blank:]]*.*/\1/p' \
                  -e
's/^[[:blank:]]*peer[[:blank:]]+\([[:alnum:].]+\)[[:blank:]]*.*/\1/p' \
                  $ntpconf`
@@ -111,7 +111,7 @@
         fi
        timeservers=`/bin/sed \
                  -n -e 's/\#.*$//;/127.*/d' \
-                 -e 's/^[[:blank:]]*server[[:blank:]][[:blank:]]*\(.*\)/\1/p' \
+                 -e
's/^[[:blank:]]*server[[:blank:]][[:blank:]]*\([^[:blank:]]*\).*/\1/p' \
                  $ntpconf`

Comment 1 Harald Hoyer 2003-03-10 14:50:01 UTC

*** This bug has been marked as a duplicate of 82713 ***

Comment 2 Red Hat Bugzilla 2006-02-21 18:51:58 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.