summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2004-07-18 12:59:41 +0000
committerhenning <henning@openbsd.org>2004-07-18 12:59:41 +0000
commitbf22f0ff6ef53632f01f090e3b7dee956b5f26d0 (patch)
treefd94791189c334999e0443d31f5b5ac57207af4a /lib
parentreturn EINVAL if ftruncate(2) is passed a negative offset (diff)
downloadwireguard-openbsd-bf22f0ff6ef53632f01f090e3b7dee956b5f26d0.tar.xz
wireguard-openbsd-bf22f0ff6ef53632f01f090e3b7dee956b5f26d0.zip
query interval scaling, episode II
1) base the interval calculation on the offset from the last reply, not from the last peer update. Allows us to send more queries again faster when the local clock diverges too much 2) every time we form a peer update (for which we need 8 replies) check wether we have a ready peer update for all peers that are currently trusted, and if so, calculate the total offset and call adjtime(). that means that adjtime is no longer called in fixed intervals but whenever we have enough data to reliably calculate the local clock offset. In practice, that means we call adjtime() less often, but with probably better data. 3) invalidate peer updates after beeing used. no point in re-using them - this resulted in calling adjtime() multiple times with the same offset, which doesn't make sense tested by many
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions