Bug 83613 - dhclient-script bug causes ntp to fail to work
Summary: dhclient-script bug causes ntp to fail to work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: dhcp
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-02-06 10:25 UTC by Martijn Feleus
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2003-03-04 17:02:46 UTC
Embargoed:


Attachments (Terms of Use)

Description Martijn Feleus 2003-02-06 10:25:26 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020830

Description of problem:
A bug in the handling of ntp in the dhclient-script component of the dhclient
package (which can't be selected anywhere in bugzilla, I might add) causes the
dhcp-configured ntp servers to be ignored because of the default restrict policy.

Version-Release number of selected component (if applicable):
dhclient-3.0pl1-9, dhclient-3.0pl1-15

How reproducible:
Always

Steps to Reproduce:
1. configure dhcp to set ntp servers
2. let the client get it's info from the dhcp server
3. ntp doesn't work because the /etc/ntp.conf doesn't list the servers as
'unrestricted', so the servers are ignored.
    

Actual Results:  Time wasn't sync'ed (sp?) properly, causing confusion.

Expected Results:  NTP should have sync'ed time, of course :-)

Additional info:

patch for dhclient-script below:

--- /sbin/dhclient-script       2003-01-13 14:26:32.000000000 +0100
+++ /sbin/dhclient-script.ntp   2003-01-13 14:26:26.000000000 +0100
@@ -157,6 +157,7 @@
       :> /etc/ntp/step-tickers
       for I in $new_ntp_servers; do
          echo "server $I" >> /etc/ntp.conf
+         echo "restrict $I" >> /etc/ntp.conf
          echo "$I" >> /etc/ntp/step-tickers
       done
        fi

Comment 1 Elliot Lee 2003-02-19 22:29:12 UTC
dhclient comes from the dhcp source package.

Comment 2 Martijn Feleus 2003-02-20 09:22:54 UTC
Sorry, forgot to do rpm -qf /sbin/dhclient-script ;-) I learned only recently
that the selection of packages seems to be based on the source rpm, which can
generate more than one binary rpm IIRC. Hence the confusion.

I might add that the way this script sets the defaults is counter-intuitive and
IMHO contrary to unix tradition. Every configuration and default should be
defined in /etc, not hidden in a script in /sbin. Perhaps it's best to rewrite
dhclient-script to allow for this?

Comment 3 Daniel Walsh 2003-03-04 17:02:46 UTC
Current release has the following code in it.  Available on Rawhide.

     :> /etc/ntp/step-tickers
      for I in $new_ntp_servers; do
          echo "restrict $I nomodify notrap noquery" >> /etc/ntp.conf
	  echo "server $I" >> /etc/ntp.conf
	  echo "$I" >> /etc/ntp/step-tickers
      done



Note You need to log in before you can comment on or make changes to this bug.