OpenBSD CVS

CVS log for src/usr.sbin/ntpd/control.c


[BACK] Up to [local] / src / usr.sbin / ntpd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.21 / (download) - annotate - [select for diffs], Tue Apr 23 13:34:51 2024 UTC (5 weeks, 4 days ago) by jsg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

correct indentation; no functional change
ok tb@

Revision 1.20 / (download) - annotate - [select for diffs], Wed Dec 20 15:36:36 2023 UTC (5 months, 1 week ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

introduce log_ntp_addr() and use it where applicable, avoids a null
pointer deref in constraint.c reported by bluhm@; ok millert@

Revision 1.19 / (download) - annotate - [select for diffs], Wed Apr 21 09:38:11 2021 UTC (3 years, 1 month ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.18: +14 -13 lines
Diff to previous 1.18 (colored)

Improve ntpd offset handling.  Call the index of the offset loops
"shift" consistently.  Merge the two offset loops in client_update()
into one.  Use a simple assignment for the best value instead of
memcpy().  Use the same mechanism to loop over the offset array
everywhere to avoid an invalid best value.
tested by weerd@; OK claudio@

Revision 1.18 / (download) - annotate - [select for diffs], Wed Feb 12 19:14:56 2020 UTC (4 years, 3 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.17: +2 -1 lines
Diff to previous 1.17 (colored)

If constraints are configured but do not work for whatever reason ntpd
does not work. Make that more clear in the log and ntpdctl -s status.
report by and ok benno@

Revision 1.17 / (download) - annotate - [select for diffs], Wed Jul 10 05:53:37 2019 UTC (4 years, 10 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

fix printing when the pool is specified as an IP address; reported by and
ok deraadt@

Revision 1.16 / (download) - annotate - [select for diffs], Sun Jul 7 19:17:40 2019 UTC (4 years, 10 months ago) by otto
Branch: MAIN
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

proper level of two messages, prompted by deraadt@

Revision 1.15 / (download) - annotate - [select for diffs], Tue May 28 06:49:46 2019 UTC (5 years ago) by otto
Branch: MAIN
Changes since 1.14: +7 -3 lines
Diff to previous 1.14 (colored)

A step in solving the bootstrap problem in a dnssec environement.
If the time is wrong, we cannot validate dnssec, leading to failed
DNS lookups, so we cannot adjust or set the time.  Work around this
by repeating a failed DNS lookup with a lookup with the DC (check
disabled) bit set. ok florian@

Revision 1.14 / (download) - annotate - [select for diffs], Mon Jan 14 16:30:21 2019 UTC (5 years, 4 months ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.13: +27 -1 lines
Diff to previous 1.13 (colored)

Prevent multiple ntpds from tripping over each other.
This brings over the logic from bgpd & ospfd.
Input & OK deraadt

Revision 1.13 / (download) - annotate - [select for diffs], Sat Aug 4 11:07:14 2018 UTC (5 years, 9 months ago) by mestre
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.12: +1 -8 lines
Diff to previous 1.12 (colored)

Revert back previous commit, we have decided that socket files don't cause any
harm if not deleted after the daemon is shutdown and at the same time we also
tackle another attack surface by not allowing the program to create/delete
any more files (by removing "cpath" promise from pledge(2)).

Discussion initiated by a question from deraadt@ OK florian@

Revision 1.12 / (download) - annotate - [select for diffs], Mon Jan 9 14:04:31 2017 UTC (7 years, 4 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.11: +5 -4 lines
Diff to previous 1.11 (colored)

Replace hand-rolled for(;;) traversal of ctl_conns TAILQ with
TAILQ_FOREACH().

No intentional functional change.

ok reyk@

Revision 1.11 / (download) - annotate - [select for diffs], Wed Sep 14 13:20:16 2016 UTC (7 years, 8 months ago) by rzalamena
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

Teach ntpd(8) how to fork+exec.

ok reyk@, bcook@

Revision 1.10 / (download) - annotate - [select for diffs], Sun Mar 27 11:16:12 2016 UTC (8 years, 2 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.9: +6 -9 lines
Diff to previous 1.9 (colored)

Rename session_socket_blockmode() to session_socket_nonblockmode(),
removing its second parameter and the enum() that provided the
values for said parameter.

The function was only called with the second parameter set to one
value (BM_NONBLOCKING) from the enum(). So just do the right thing.
Similar to changes made in smtpd.

While here remove the pointless third parameter from the fcntl(F_GETFL)
call.

No functional change.

ok guenther@ bcook@ deraadt@

Revision 1.9 / (download) - annotate - [select for diffs], Sat Dec 5 13:12:16 2015 UTC (8 years, 5 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

EAGAIN handling for imsg_read. OK henning@ benno@

Revision 1.8 / (download) - annotate - [select for diffs], Fri Nov 20 18:53:42 2015 UTC (8 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.7: +7 -7 lines
Diff to previous 1.7 (colored)

use RMS for jitter. we're linking with enough libraries that libm is tiny.
ok deraadt

Revision 1.7 / (download) - annotate - [select for diffs], Fri Oct 23 14:52:20 2015 UTC (8 years, 7 months ago) by phessler
Branch: MAIN
Changes since 1.6: +2 -3 lines
Diff to previous 1.6 (colored)

Allowing upstream servers of ntp being in multiple routing tables is
non-sensical.  The dns lookups happened in the process routing table
(usually '0'), which is very likely to have different results from the
other routing domains.  If you do depend on having this behaviour,
you'll need to use pf to cross the rtable boundary.

"listen on * rtable X" is still supported.

Users of "server * rtable X" will need to switch to launching ntpd with
"route -T X exec /usr/sbin/ntpd"

OK deraadt@

Revision 1.6 / (download) - annotate - [select for diffs], Sat Jul 18 00:53:44 2015 UTC (8 years, 10 months ago) by bcook
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

replace bzero with memset

ok phessler@ deraadt@

Revision 1.5 / (download) - annotate - [select for diffs], Tue Feb 10 06:40:08 2015 UTC (9 years, 3 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.4: +4 -1 lines
Diff to previous 1.4 (colored)

Add support for "constraints": when configured, ntpd(8) will query the
time from HTTPS servers, by parsing the Date: header, and use the
median constraint time as a boundary to verify NTP responses.  This
adds some level of authentication and protection against MITM attacks
while preserving the accuracy of the NTP protocol; without relying on
authentication options for NTP that are basically unavailable at
present.  This is an initial implementation and the semantics will be
improved once it is in the tree.

Discussed with deraadt@ and henning@
OK henning@

Revision 1.4 / (download) - annotate - [select for diffs], Fri Jan 9 07:35:37 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.3: +9 -9 lines
Diff to previous 1.3 (colored)

remove excessive/wrong use of sys/param.h
peanuts -- but all work has to start somewhere.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Jan 4 01:24:43 2015 UTC (9 years, 4 months ago) by bcook
Branch: MAIN
Changes since 1.2: +10 -10 lines
Diff to previous 1.2 (colored)

rename sockaddr_un variables from 'sun' to the more common 'sa'.

This avoids a namespace conflict with Solaris build environments.

discussed with deraadt@ and kettenis@

Revision 1.2 / (download) - annotate - [select for diffs], Wed Nov 13 20:44:39 2013 UTC (10 years, 6 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

from sthen: handle msgbuf_write() returning EAGAIN

ok krw

Revision 1.1 / (download) - annotate - [select for diffs], Fri Oct 4 14:28:16 2013 UTC (10 years, 8 months ago) by phessler
Branch: MAIN

Add ntpctl(8), which allows us to query the locally running ntpd(8) process

diff from Mike Miller <mmiller mgm51 com> (many thanks!)

OK phessler@, henning@, todd@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.