Commits (3)
......@@ -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);
......
......@@ -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
......
......@@ -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
......