This fixes a bunch or valgrind errors.
request->utoken = htonl(SPECIAL_UTOKEN);
}
generate_auth(request);
+ } else {
+ memset(request->auth, 0, sizeof (request->auth));
}
command_length = PKL_CommandLength(request);
result->local_rx.tv_sec = 0;
result->local_rx.tv_usec = 0;
+ result->local_tx.tv_sec = 0;
+ result->local_tx.tv_usec = 0;
return result;
struct in_pktinfo *ipi;
cmsg = CMSG_FIRSTHDR(&msg);
+ memset(cmsg, 0, CMSG_SPACE(sizeof(struct in_pktinfo)));
+ cmsglen += CMSG_SPACE(sizeof(struct in_pktinfo));
+
cmsg->cmsg_level = IPPROTO_IP;
cmsg->cmsg_type = IP_PKTINFO;
cmsg->cmsg_len = CMSG_LEN(sizeof(struct in_pktinfo));
- cmsglen += CMSG_SPACE(sizeof(struct in_pktinfo));
ipi = (struct in_pktinfo *) CMSG_DATA(cmsg);
- memset(ipi, 0, sizeof(struct in_pktinfo));
ipi->ipi_spec_dst.s_addr = htonl(remote_addr->local_ip_addr);
#if 0
LOG(LOGS_INFO, LOGF_NtpIO, "sending to %s:%d from %s",
inst->skew_dirn = SST_Skew_Nochange;
inst->estimated_offset = 0.0;
inst->estimated_offset_sd = 86400.0; /* Assume it's at least within a day! */
+ inst->offset_time.tv_sec = 0;
+ inst->offset_time.tv_usec = 0;
inst->variance = 16.0;
inst->nruns = 0;
return inst;
report->resid_skew = 0;
}
} else {
+ report->latest_meas_ago = 86400 * 365 * 10;
report->orig_latest_meas = 0;
report->latest_meas = 0;
report->latest_meas_err = 0;