+* xmt -> aorg timestamp cleanup from Dave Mills, reported by Dave Hart.
+* Leap/expire cleanup from Dave Mills.
(4.2.5p178) 2009/05/21 Released by Harlan Stenn <stenn@ntp.org>
* Provide erealloc() and estrdup(), a la emalloc().
* Improve ntp.conf's parser error messages.
leap_expire = ntohl(ep->pkt[2]);
crypto_update();
strcpy(str1, fstostr(leap_sec));
+ strcpy(str2, fstostr(leap_expire));
snprintf(tbuf, sizeof(tbuf),
"%d leap %s expire %s", leap_tai, str1,
str2);
peer->next) {
if (peer->cast_flags & MDF_ACAST) {
NTOHL_FP(&pkt->org, &p_org);
- if (L_ISEQU(&peer->xmt, &p_org))
+ if (L_ISEQU(&p_org, &peer->aorg))
return (peer);
}
}
sys_restricted++;
return; /* not enabled */
}
- if ((peer = newpeer(&rbufp->recv_srcadr,
- rbufp->dstadr, MODE_CLIENT,
- hisversion, NTP_MINDPOLL, NTP_MAXDPOLL,
- FLAG_IBURST | FLAG_PREEMPT, MDF_UCAST | MDF_ACLNT,
- 0, skeyid)) == NULL) {
+ if ((peer = newpeer(&rbufp->recv_srcadr, rbufp->dstadr,
+ MODE_CLIENT, hisversion, NTP_MINDPOLL,
+ NTP_MAXDPOLL, FLAG_IBURST | FLAG_PREEMPT,
+ MDF_UCAST | MDF_ACLNT, 0, skeyid)) == NULL) {
sys_declined++;
return; /* ignore duplicate */
}
peer->flip = 1;
report_event(PEVNT_XLEAVE, peer, NULL);
}
+ } else {
+ L_CLR(&peer->aorg);
}
/*
peer->rec = p_xmt;
peer->dst = rbufp->recv_time;
}
- L_CLR(&peer->xmt);
+ peer->xmt = p_xmt;
/*
* If this is a crypto_NAK, the server cannot authenticate a