[763] in Zephyr_Bugs

home help back first fref pref prev next nref lref last post

Re: Zephyr 2.0.2 little endian unauthentic Zephyrs

daemon@ATHENA.MIT.EDU (ghudson@MIT.EDU)
Sun Mar 24 18:21:18 1996

From: ghudson@MIT.EDU
Date: Sun, 24 Mar 1996 18:21:15 -0500
To: garvin@eos.ncsu.edu
Cc: bug-zephyr@MIT.EDU, garvin@eos.ncsu.edu
In-Reply-To: "[758] in Zephyr_Bugs"

> I've poked around but can't seem to track the problem down.  Under
> 2.0.2 little endian (i386 Linux, MIPS DEC Ultrix, Alpha AXP OSF
> 3.2a) machines' Zephyrs are being sent unauthentic.  Zephyrs coming
> from big endian machines are received correctly (authentic).  I've
> looked at the checksums being calculated in ZCkAuth versus what's
> being received in the packet, and they don't match (duh).  Help?

There's an extra byte swap in ZMakeAuthentication().  Try the
following patch:

*** lib/zephyr/ZMkAuth.c~  Thu Mar 21 08:19:23 1996
--- lib/zephyr/ZMkAuth.c   Thu Mar 21 08:19:42 1996
***************
*** 90,96 ****
      checksum ^= des_quad_cksum(notice->z_message, NULL, notice->z_message_len,
                               0, cred.session);
      notice->z_checksum = checksum;
!     checksum = htonl(checksum);
      ZMakeAscii32(cstart, buffer + buffer_len - cstart, checksum);
  
      return (ZERR_NONE);
--- 90,96 ----
      checksum ^= des_quad_cksum(notice->z_message, NULL, notice->z_message_len,
                               0, cred.session);
      notice->z_checksum = checksum;
! /*    checksum = htonl(checksum);*/
      ZMakeAscii32(cstart, buffer + buffer_len - cstart, checksum);
  
      return (ZERR_NONE);
---

home help back first fref pref prev next nref lref last post