A fix is included.  I originally wrote this for Mandrake 8.2 but I see that
the same version of ntp is still used in cooker.  My patched rpm seems to
be working happily.

I originally mailed this to message [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: ntp-4.1.1 will not accept broadcast packets

When I upgraded one my  Linux computers from Mandrake 8.0 (with a patched
ntp-4.0.99k) to Mandrake 8.2 (ntp-4.1.1) the ntp daemon stopped accepting
broadcast ticks from our department servers.

The following is the ntp.conf used with comments removed:

--- BEGIN of /etc/ntp.conf ---
server  127.127.1.0     # local clock
fudge   127.127.1.0     stratum 13      

driftfile /etc/ntp/drift
broadcastclient

authenticate no
--- END of /etc/ntp.conf ---

The following is the patch that it took to make it work:

--- ntp-4.1.1/ntpd/ntp_proto.c.ORIG     Wed May 29 09:39:46 2002
+++ ntp-4.1.1/ntpd/ntp_proto.c  Wed May 29 11:07:39 2002
@@ -348,11 +348,10 @@
        }
 
        /*
-        * Discard broadcast packets received on the wildcard interface
-        * or if not enabled as broadcast client.
+        * Discard broadcast packets if not enabled as broadcast client.
         */
        if (PKT_MODE(pkt->li_vn_mode) == MODE_BROADCAST &&
-           (rbufp->dstadr == any_interface || !sys_bclient))
+           !sys_bclient)
                return;
 
        /*

For all of our arriving broadcast packets the equality
"rbufp->dstadr == any_interface" was true.  I do not see the necessity for this
test as there is no way in ntp-4.1.1 to set which interface listens to
broadcast packets.

Bill Sebok      Computer Software Manager, Univ. of Maryland, Astronomy
        Internet: [EMAIL PROTECTED]     URL: http://furo.astro.umd.edu/

I received this reply (condensed) from David L. Mills, the original author
of ntp.

> The extra test was put in as defense when multicast breaks and the I/O
> code is unable to determine which outbound interface will be used. This
> works in all architectures known to me, but breaks in Linux. I have
> since removed the paranoid test so Linux does work with broadcast, but
> of course flames out with multicast. I don't know which incremental
> release version has the removed test, which was made some time ago.

> Dave

The following was my reply to his note:

It is still present in 4.1.1a, the latest "stable" version listed on the ntp
web site.  Mandrake 8.2 picked up ntp-4.1.1 which, unfortunately, broke things.

Bill Sebok      Computer Software Manager, Univ. of Maryland, Astronomy
        Internet: [EMAIL PROTECTED]     URL: http://furo.astro.umd.edu/


Reply via email to