[Git][NTPsec/ntpsec][master] 3 commits: TODO update.
Eric S. Raymond
gitlab at mg.gitlab.com
Wed Oct 5 08:26:00 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
c219c64f by Eric S. Raymond at 2016-10-05T04:18:59-04:00
TODO update.
- - - - -
17f72b42 by Eric S. Raymond at 2016-10-05T04:20:14-04:00
Update docs and TODO for the protocol refactoring.
- - - - -
cefd690c by Eric S. Raymond at 2016-10-05T04:22:36-04:00
Change rawdcf clock to use timespec rather than timeval internally.
- - - - -
3 changed files:
- devel/TODO
- docs/index.txt
- libparse/clk_rawdcf.c
Changes:
=====================================
devel/TODO
=====================================
--- a/devel/TODO
+++ b/devel/TODO
@@ -4,9 +4,7 @@
=== Code ===
-* Land TESTFRAME.
-
-* Land Daniel's protocol-machine refactoring.
+* Test broadcast and symmetric modes; either fix them or remove them.
* Land Daniel's redesign of the restriction language.
@@ -20,7 +18,7 @@
=== Packaging ===
-* Package metadata for Debian Ubuntu, Red Hat, and SuSe.
+* Package metadata for Debian, Ubuntu, Raspbian, Red Hat, Gentoo, and SuSe.
== After 1.0 release ==
=====================================
docs/index.txt
=====================================
--- a/docs/index.txt
+++ b/docs/index.txt
@@ -110,10 +110,14 @@ few will be user-visible.
recent versions of NTP Classic, and if not broken would have been at
high risk for bugs that would enable DoS vulnerabilities.
+* Interleave mode has been removed. It didn't work correctly (there
+ was an implementation error in the timestamp handling), so no point
+ in allowing it to increase attack surface.
+
* The code has been systematically hardened, with unsafe string
copy and formatting functions replaced by safe (bounded) ones.
-* In toto, more than 60% of the NTP Classic code has been outright
+* In toto, more than 65% of the NTP Classic code has been outright
removed, with less than 5% new code added. This is a dramatic
reduction in attack surface.
=====================================
libparse/clk_rawdcf.c
=====================================
--- a/libparse/clk_rawdcf.c
+++ b/libparse/clk_rawdcf.c
@@ -8,7 +8,7 @@
#include <config.h>
#include "ntp_fp.h"
-#include "timevalops.h"
+#include "timespecops.h"
#include "ntp_calendar.h"
#include "parse.h"
@@ -504,16 +504,16 @@ calc_usecdiff(
long offset
)
{
- struct timeval delta;
+ struct timespec delta;
long delta_usec = 0;
l_fp delt;
delt = ref->fp;
delt.l_i -= offset;
L_SUB(&delt, &base->fp);
- TSTOTV(&delt, &delta);
+ delta = lfp_stamp_to_tspec(delt, NULL);
- delta_usec = 1000000 * (int32_t)delta.tv_sec + delta.tv_usec;
+ delta_usec = 1000000 * (int32_t)delta.tv_sec + delta.tv_nsec/1000;
return delta_usec;
}
@@ -567,7 +567,7 @@ inp_rawdcf(
timestamp_t *tstamp
)
{
- static struct timeval timeout = { 1, 500000 }; /* 1.5 secongs denote second #60 */
+ static struct timespec timeout = { 1, 500000000 }; /* 1.5 secongs denote second #60 */
parseprintf(DD_PARSE, ("inp_rawdcf(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/b1c7ada84be7f7047f041fe8c511af686cccd0f1...cefd690c65640e75c27f68c0d15cf76032a4d1ea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161005/4c4d12d0/attachment.html>
More information about the vc
mailing list