[189] in Zephyr Mailing List
Re: Zephyr 2.0.2 checksum byte order wierdness
daemon@ATHENA.MIT.EDU (Greg Wohletz)
Fri Dec 8 16:46:49 1995
To: zephyr@MIT.EDU
In-Reply-To: Your message of "Thu, 07 Dec 1995 17:04:12 PST."
<9512080105.AA13905@MIT.EDU>
Date: Fri, 08 Dec 1995 13:42:13 -0800
From: Greg Wohletz <greg@duke.CS.UNLV.EDU>
>There seems to be something wrong somwhere regarding byte order in the
>checksum field. zephyr messages comming from our DECstations (little
>endian) are encountering a checksum mismatch. Examining the bad checksum
>reveals a byte swaped checksum, like this:
>
>checksum fail (8d096155,5561098d), returning ZAUTH_CKSUM_FAILED
>
>In the file lib/zephyr/ZMkAuth.c at the end of the ZMakeAuthentication
>routine is the following code:
>
>
> notice->z_checksum = checksum;
> checksum = htonl(checksum);
> ZMakeAscii32(cstart, buffer + buffer_len - cstart, checksum);
>
>
>This code does not look right to me. Doesn't the routine ZMakeAscii32 do
>the equivalent of a htonl, and essentially undo this operation?
OK I ifdef'ed out the htonl call and indeed that fixed the problem. Let me
know if what I've done is completely bogus...
--Greg