[188] in Zephyr Mailing List
Zephyr 2.0.2 checksum byte order wierdness
daemon@ATHENA.MIT.EDU (Greg Wohletz)
Thu Dec 7 20:08:48 1995
To: zephyr@MIT.EDU
Date: Thu, 07 Dec 1995 17:04:12 -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?
--Greg