[Git][NTPsec/ntpsec][master] 3 commits: Add another syscall to the allowed list
Hal Murray
gitlab at mg.gitlab.com
Wed Nov 30 11:47:24 UTC 2016
Hal Murray pushed to branch master at NTPsec / ntpsec
Commits:
ed8c9d20 by Hal Murray at 2016-11-29T23:18:39-08:00
Add another syscall to the allowed list
- - - - -
d2c6e4ca by Hal Murray at 2016-11-29T23:18:39-08:00
Few more REFIDLEN fixes
- - - - -
a67785d9 by Hal Murray at 2016-11-30T03:42:17-08:00
Fix typo: missing f in lfptoloat
- - - - -
3 changed files:
- ntpd/ntp_proto.c
- ntpd/ntp_sandbox.c
- pylib/packet.py
Changes:
=====================================
ntpd/ntp_proto.c
=====================================
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -246,7 +246,7 @@ parse_packet(
pkt->precision = (int8_t)recv_buf[3];
pkt->rootdelay = ntp_be32dec(recv_buf + 4);
pkt->rootdisp = ntp_be32dec(recv_buf + 8);
- memcpy(pkt->refid, recv_buf + 12, 4);
+ memcpy(pkt->refid, recv_buf + 12, REFIDLEN);
pkt->reftime = ntp_be64dec(recv_buf + 16);
pkt->org = ntp_be64dec(recv_buf + 24);
pkt->rec = ntp_be64dec(recv_buf + 32);
@@ -552,7 +552,7 @@ handle_procpkt(
peer->outcount = 0;
if(is_kod(pkt)) {
- if(!memcmp(pkt->refid, "RATE", 4)) {
+ if(!memcmp(pkt->refid, "RATE", REFIDLEN)) {
peer->selbroken++;
report_event(PEVNT_RATE, peer, NULL);
if (peer->minpoll < 10) { peer->minpoll = 10; }
@@ -622,7 +622,7 @@ handle_procpkt(
peer->precision = pkt->precision;
peer->rootdelay = scalbn((double)pkt->rootdelay, -16);
peer->rootdisp = scalbn((double)pkt->rootdisp, -16);
- memcpy(&peer->refid, pkt->refid, 4);
+ memcpy(&peer->refid, pkt->refid, REFIDLEN);
uint64_to_lfp(&peer->reftime, pkt->reftime);
uint64_to_lfp(&peer->rec, pkt->rec);
uint64_to_lfp(&peer->xmt, pkt->xmt);
=====================================
ntpd/ntp_sandbox.c
=====================================
--- a/ntpd/ntp_sandbox.c
+++ b/ntpd/ntp_sandbox.c
@@ -342,6 +342,7 @@ int scmp_sc[] = {
SCMP_SYS(socket),
SCMP_SYS(socketcall), /* old kernels */
SCMP_SYS(stat),
+ SCMP_SYS(statfs64), /* from getaddrinfo after lid open */
#ifdef __NR_time
SCMP_SYS(time), /* not in ARM */
#endif
=====================================
pylib/packet.py
=====================================
--- a/pylib/packet.py
+++ b/pylib/packet.py
@@ -1305,7 +1305,7 @@ class ControlSession:
highwater = len(span.entries)
for (tag, val) in variables.items():
if tag =="now":
- span.now = ntp.ntpc.lfptoloat(val)
+ span.now = ntp.ntpc.lfptofloat(val)
continue
elif tag == "last.newest":
continue
@@ -1319,7 +1319,7 @@ class ControlSession:
if idx >= len(span.entries):
span.entries.append(MRUEntry())
if type(val) != type(0) and val.startswith("0x"):
- val = ntp.ntpc.lfptoloat(val)
+ val = ntp.ntpc.lfptofloat(val)
setattr(span.entries[-1], prefix, val)
# If we've seen the end sentinel on the span, break out
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/3c109673dfbc730b926d536dffc0f58f92513041...a67785d989057a88f3213326db1f43816a923672
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161130/b9efd749/attachment.html>
More information about the vc
mailing list