[FS#260] ntp server doesn't work - no reply to clients

LEDE Bugs lede-bugs at lists.infradead.org
Tue Nov 8 08:13:05 PST 2016


The following task has a new comment added:

FS#260 - ntp server doesn't work - no reply to clients
User who did this - Juliusz Chroboczek (jch)

----------
Ah, sorry, I misread the bug report.

My reading of RFC 5905 is that unsynchronised peers should be sending packets with the stratum field set to 0 and the LI field set to 3:

    Initially, all variables are cleared to zero, then the leap is set to
    3 (unsynchronized) and stratum is set to MAXSTRAT (16).  Remember
    that MAXSTRAT is mapped to zero in the transmitted packet.

I've just checked that this is the way both ntpd and chrony behave:

    17:12:10.032320 IP (tos 0xb8, ttl 64, id 14778, offset 0, flags [DF], proto UDP (17), length 76)
        192.168.1.1.123 > 192.168.3.117.46945: NTPv4, length 48
            Server, Leap indicator: clock unsynchronized (192), Stratum 0 (unspecified), poll 3 (8s), precision -18
            Root Delay: 0.000000, Root dispersion: 0.000122, Reference-ID: (unspec)
              Reference Timestamp:  0.000000000
              Originator Timestamp: 3687610330.028420243 (2016/11/08 17:12:10)
              Receive Timestamp:    3687610309.385550141 (2016/11/08 17:11:49)
              Transmit Timestamp:   3687610309.385816186 (2016/11/08 17:11:49)
                Originator - Receive Timestamp:  -20.642870068
                Originator - Transmit Timestamp: -20.642604053

Now, since sysntp doesn't support symmetric mode (peer-to-peer operation), it should not break anything to ignore client requests when unsynchronised.  Still, I find the standard behaviour occasionally useful, so I guess it could usefully be added to sysntp.

----------

More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=260#comment805



More information about the lede-bugs mailing list