Age | Commit message (Collapse) | Author |
|
function old new delta
ntpd_main 1053 1130 +77
add_peers 166 195 +29
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
same IP)
function old new delta
add_peers 98 166 +68
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
update_local_clock 820 826 +6
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
update_local_clock 769 820 +51
recv_and_process_peer_pkt 838 862 +24
reset_peer_stats 137 133 -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 75/-4) Total: 71 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
setsockopt_int - 23 +23
do_load 918 934 +16
setsockopt_SOL_SOCKET_int - 14 +14
setsockopt_keepalive - 10 +10
setsockopt_SOL_SOCKET_1 - 10 +10
buffer_fill_and_print 169 178 +9
setsockopt_1 - 8 +8
nfsmount 3560 3566 +6
redirect 1277 1282 +5
tcpudpsvd_main 1782 1786 +4
d6_send_kernel_packet 272 275 +3
i2cget_main 380 382 +2
ed_main 2544 2545 +1
scan_recursive 380 378 -2
nbdclient_main 492 490 -2
hash_find 235 233 -2
cmdputs 334 332 -2
parse_command 1443 1440 -3
static.two 4 - -4
ntpd_main 1039 1035 -4
const_int_1 4 - -4
const_IPTOS_LOWDELAY 4 - -4
RCVBUF 4 - -4
ntp_init 474 469 -5
change_listen_mode 316 310 -6
uevent_main 416 409 -7
arping_main 1697 1690 -7
telnet_main 1612 1603 -9
socket_want_pktinfo 42 33 -9
setsockopt_reuseaddr 21 10 -11
setsockopt_broadcast 21 10 -11
httpd_main 772 757 -15
get_remote_transfer_fd 109 94 -15
make_new_session 503 487 -16
ftpd_main 2177 2160 -17
read_bunzip 1896 1866 -30
common_traceroute_main 4099 4058 -41
common_ping_main 1836 1783 -53
------------------------------------------------------------------------------
(add/remove: 5/4 grow/shrink: 8/21 up/down: 111/-283) Total: -172 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
This patch removes stray empty line from busybox code
reported by script find_stray_empty_lines
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
This speeds up syncing - now happens only just
two replies from a peer. Especially useful for "ntpd -q".
Shouldn't have ill effects: if we chose a bad peer,
we will discover it later and switch to another one.
The code is even smaller this way.
Suggested by Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
OpenNTPd is licensed under ISC-style license so it's good idea to keep
ntpd applet under same license to avoid mess, instead of having
our changes to be under GPL.
Names of original code's authors are added.
Signed-off-by: Adam Tkac <vonsch@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
The offset to jitter ratio is now calculated before updating
jitter to make the test more sensitive.
function old new delta
ntp_init 460 474 +14
update_local_clock 752 764 +12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 26/0) Total: 26 bytes
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
To avoid polling servers frequently slowly increase the interval up
to BIGPOLL when
- no replies are received from a peer
- no source can be selected
- peer claims to be unsynchronized (e.g. we are polling it too
frequently)
When recv() returns with an error, drop code to try to continue
on network errors: I'm not convinced those cases happen in real life.
function old new delta
recv_and_process_peer_pkt 919 838 -81
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
* on step, poll interval drops to 8.5 mins instead of 32 seconds
* on total loss of all replies (no replies from any peer
for last 8 requests), also drop poll interval to 8.5 mins
instead of 32 seconds
* on send abd recv errors, RETRY_INTERVAL is now 32 seconds,
not 5 seconds
* on timing out listening to reply, instead of unconditional
shortening poll interval by x4, clamp it to NOREPLY_INTERVAL
(512 seconds)
* if a largish offset is seen, clamp nexp poll interval
to 128 seconds, not 64 seconds
function old new delta
clamp_pollexp_and_set_MAXSTRAT - 37 +37
recv_and_process_peer_pkt 861 869 +8
poll_interval 52 48 -4
update_local_clock 762 752 -10
ntpd_main 1063 1050 -13
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/3 up/down: 45/-27) Total: 18 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
The burst mode needs to be stopped even when no replies are received.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
packed_usage 29908 29947 +39
ntp_init 428 460 +32
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 71/0) Total: 71 bytes
Signed-off-by: Nikolaus Froehlich <nikolaus@mathematik.uni-marburg.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Before this cahnge, sometimes they were used after the next packet
from another peer was received, because we did updare some peer stats
from high delay packet before dropping it.
function old new delta
recv_and_process_peer_pkt 922 966 +44
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
add_peers - 98 +98
packed_usage 29470 29511 +41
ntp_init 407 428 +21
pw_encrypt 14 27 +13
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/0 up/down: 173/0) Total: 173 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
rand() is the most standard C library function,
and on uclibc they are the same. I guess
they are the same in most todays' libc...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
poll_interval 57 52 -5
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
GCC complained about since_last_update being set but not used.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
recv_and_process_peer_pkt 892 922 +30
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Used to set p->filter_datapoint[i].d_dispersion = MAXDISP
and clear reachable bits, but this proved to be too agressive:
after step (tested with suspinding laptop for ~30 secs),
this caused all previous data to be considered invalid,
making us needing to collect full ~8 datapoins per peer
after step in order to start trusting them.
In turn, this was making poll interval decrease even after
step was done. (Poll interval decreases already before step
in this scenario, because we see large offsets and end up with
no good peer to select).
function old new delta
reset_peer_stats 157 139 -18
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
update_local_clock 982 835 -147
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Without it, peer selection logic is hard to debug
function old new delta
update_local_clock 861 982 +121
select_and_cluster 962 1065 +103
common_ping_main 1788 1821 +33
huft_build 1287 1296 +9
chpst_main 708 704 -4
INET6_resolve 127 119 -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/2 up/down: 266/-12) Total: 254 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
update_local_clock 861 943 +82
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
ntpd_main 1030 1026 -4
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
While at it: don't run "periodic" if interrupted by a signal.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
ntpd_main 960 1029 +69
recv_and_process_peer_pkt 834 892 +58
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 127/0) Total: 127 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
strftime_fmt - 53 +53
strftime_YYYYMMDDHHMMSS - 12 +12
strftime_HHMMSS - 12 +12
human_time 44 43 -1
fmtstr_t 9 - -9
step_time 361 345 -16
watch_main 261 232 -29
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 0/3 up/down: 77/-55) Total: 22 bytes
text data bss dec hex filename
919203 932 17692 937827 e4f63 busybox_old
919209 932 17692 937833 e4f69 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
When using busybox ntpd with an NTPv3 client and NTPv4 server (or vice
versa), the version numbers can be incorrectly ORed together, yielding
the bogus value of "NTPv7". This makes ntpd unusable with clients
such as Chrony and Windows "Internet Time".
This patch avoids the version mangling, by copying only the Leap
Indicator bits from the server's status field.
Signed-off-by: Paul Marks <paul@pmarks.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
We set a default path for the directory where pidfiles are create
when FEATURE_PIDFILE is selected. The default has no effect on
applets which must specify a pidfile path on the command line to
run, and it can be overridden by applets which optionally allow
the user to specify the pidfile path.
We also add pidfile write/remove support for klogd, ntpd and watchdog.
For syslogd, we add a missing remove_pidfile() for better cleanup
on daemon exit.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
We use functions from sys/resource.h in misc applets, but don't include
the header. This breaks building with newer glibc versions, so add the
include where needed.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
filter_datapoints 475 174 -301
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
update_local_clock 730 792 +62
recv_and_process_peer_pkt 850 835 -15
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
ntpd_main 887 929 +42
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|