From: Dennis Ferguson To: medin@NSIPO.NASA.GOV Subject: Re: xntpd problems on norad Cc: ntp@TRANTOR.UMD.EDU Date: Wed, 3 Jan 90 09:28:08 EST Milo, I screwed up a sanity check in xntpd/refclock_pst.c in a way which was hidden when running with the clock line discipline but which bit when running in cooked mode. Since more or less the same check is done in four different places, there are 4 copies of the defective code. Please try the following patch and see if it does better. Dennis =========== *** refclock_pst.c.OLD Wed Jan 3 09:10:46 1990 --- refclock_pst.c Wed Jan 3 09:22:01 1990 *************** *** 751,757 **** * EOL character. If not, forget it. If the length * is insane, forget it. */ ! if (len == 0 || *cp != PSTEOL || pst->lencode < PSTMINQVLEN || pst->lencode > PSTMAXQVLEN) { pst->reason = QVREASON + 1; return 0; --- 751,757 ---- * EOL character. If not, forget it. If the length * is insane, forget it. */ ! if (len < 0 || *cp != PSTEOL || pst->lencode < PSTMINQVLEN || pst->lencode > PSTMAXQVLEN) { pst->reason = QVREASON + 1; return 0; *************** *** 872,878 **** * EOL character. If not, forget it. If the length * is insane, forget it. */ ! if (n == 0 || *cp != PSTEOL || pst->lencode < PSTMINQMLEN || pst->lencode > PSTMAXQMLEN) { pst->reason = QMREASON + 1; return 0; --- 872,878 ---- * EOL character. If not, forget it. If the length * is insane, forget it. */ ! if (n < 0 || *cp != PSTEOL || pst->lencode < PSTMINQMLEN || pst->lencode > PSTMAXQMLEN) { pst->reason = QMREASON + 1; return 0; *************** *** 1003,1009 **** * EOL character. If not, forget it. If the length * is insane, forget it. */ ! if (n == 0 || *cp != PSTEOL || len < PSTMINQDLEN || len > PSTMAXQDLEN) { pst->reason = QDREASON + 1; return 0; --- 1003,1009 ---- * EOL character. If not, forget it. If the length * is insane, forget it. */ ! if (n < 0 || *cp != PSTEOL || len < PSTMINQDLEN || len > PSTMAXQDLEN) { pst->reason = QDREASON + 1; return 0; *************** *** 1103,1109 **** * EOL character. If not, forget it. If the length * is insane, forget it. */ ! if (n == 0 || *cp != PSTEOL || len < PSTMINQTLEN || len > PSTMAXQTLEN) { pst->reason = QTREASON + 1; return 0; --- 1103,1109 ---- * EOL character. If not, forget it. If the length * is insane, forget it. */ ! if (n < 0 || *cp != PSTEOL || len < PSTMINQTLEN || len > PSTMAXQTLEN) { pst->reason = QTREASON + 1; return 0;