Bug 202016 - ntpdc -pn is broken, FreeBSD 10.2-RC1
Summary: ntpdc -pn is broken, FreeBSD 10.2-RC1
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.2-BETA1
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2015-07-31 22:07 UTC by stadtkind2
Modified: 2018-07-04 15:25 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stadtkind2 2015-07-31 22:07:45 UTC
Hi,

ntpdc -pn doesn't seem to work anymore:

$ ntpdc -pn
localhost: timed out, nothing received
***Request timed out

$ sockstat -p 123 -P udp
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS      
root     ntpd       689   20 udp6   *:123                 *:*
root     ntpd       689   21 udp4   *:123                 *:*
root     ntpd       689   22 udp4   xxx.xxx.xxx.xxx:123     *:*
root     ntpd       689   23 udp6   ::1:123               *:*
root     ntpd       689   24 udp6   fe80::1%lo0:123       *:*
root     ntpd       689   25 udp4   127.0.0.1:123         *:*

ntpq works fine though:

$ ntpq -c peers 
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*router          xxx.xxx.xxx.xxx  2 u  969 1024  377    0.666   -0.731   1.282

Here's my ntp.conf:

server router iburst
restrict default limited kod nomodify notrap nopeer noquery
restrict -6 default limited kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
restrict 127.127.1.0
Comment 1 Radim Kolar 2017-02-15 20:30:15 UTC
I can reproduce it on 10.3-p16. I didnt get ntpdc command work.
Comment 2 Bunny Evans 2018-01-12 02:01:22 UTC
Still present in 11.1 release.
Comment 3 Ian Lepore freebsd_committer freebsd_triage 2018-07-04 15:25:58 UTC
The ntpdc tool communicated with ntpd using "mode 7 private control packets", a feature which is no longer supported by ntpd because of sercurity concerns (this comes from the upstream ntp project, who documented ntpdc and mode 7 packets as depracted some time ago).

Everything that used to require ntpdc can now be done using ntpq, which uses supported mode 6 packets.

You might reasonably ask why ntpdc is still distributed as part of ntp (I sure wonder why), but I suspect only the ntp project folks could answer that.