Skip to content

Commit fb8fa5f

Browse files
author
committed
xmt/aorg and leap_expire fixes from Dave Mills
1 parent 2e89c40 commit fb8fa5f

4 files changed

Lines changed: 11 additions & 7 deletions

File tree

ChangeLog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* xmt -> aorg timestamp cleanup from Dave Mills, reported by Dave Hart.
2+
* Leap/expire cleanup from Dave Mills.
13
(4.2.5p178) 2009/05/21 Released by Harlan Stenn <stenn@ntp.org>
24
* Provide erealloc() and estrdup(), a la emalloc().
35
* Improve ntp.conf's parser error messages.

ntpd/ntp_crypto.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -967,6 +967,7 @@ crypto_recv(
967967
leap_expire = ntohl(ep->pkt[2]);
968968
crypto_update();
969969
strcpy(str1, fstostr(leap_sec));
970+
strcpy(str2, fstostr(leap_expire));
970971
snprintf(tbuf, sizeof(tbuf),
971972
"%d leap %s expire %s", leap_tai, str1,
972973
str2);

ntpd/ntp_peer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ findmanycastpeer(
995995
peer->next) {
996996
if (peer->cast_flags & MDF_ACAST) {
997997
NTOHL_FP(&pkt->org, &p_org);
998-
if (L_ISEQU(&peer->xmt, &p_org))
998+
if (L_ISEQU(&p_org, &peer->aorg))
999999
return (peer);
10001000
}
10011001
}

ntpd/ntp_proto.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -797,11 +797,10 @@ receive(
797797
sys_restricted++;
798798
return; /* not enabled */
799799
}
800-
if ((peer = newpeer(&rbufp->recv_srcadr,
801-
rbufp->dstadr, MODE_CLIENT,
802-
hisversion, NTP_MINDPOLL, NTP_MAXDPOLL,
803-
FLAG_IBURST | FLAG_PREEMPT, MDF_UCAST | MDF_ACLNT,
804-
0, skeyid)) == NULL) {
800+
if ((peer = newpeer(&rbufp->recv_srcadr, rbufp->dstadr,
801+
MODE_CLIENT, hisversion, NTP_MINDPOLL,
802+
NTP_MAXDPOLL, FLAG_IBURST | FLAG_PREEMPT,
803+
MDF_UCAST | MDF_ACLNT, 0, skeyid)) == NULL) {
805804
sys_declined++;
806805
return; /* ignore duplicate */
807806
}
@@ -1062,6 +1061,8 @@ receive(
10621061
peer->flip = 1;
10631062
report_event(PEVNT_XLEAVE, peer, NULL);
10641063
}
1064+
} else {
1065+
L_CLR(&peer->aorg);
10651066
}
10661067

10671068
/*
@@ -1091,7 +1092,7 @@ receive(
10911092
peer->rec = p_xmt;
10921093
peer->dst = rbufp->recv_time;
10931094
}
1094-
L_CLR(&peer->xmt);
1095+
peer->xmt = p_xmt;
10951096

10961097
/*
10971098
* If this is a crypto_NAK, the server cannot authenticate a

0 commit comments

Comments
 (0)