[660] in Zephyr_Bugs
Re: zephyr 2.0: bad port number for linux clients
daemon@ATHENA.MIT.EDU (Derrick J. Brashear)
Fri Jul 21 13:44:49 1995
Date: Fri, 21 Jul 1995 13:43:52 -0400 (EDT)
From: "Derrick J. Brashear" <db74+@andrew.cmu.edu>
To: bug-zephyr@MIT.EDU
regarding the 0 port number reported by Jay and Marc, I'd guess the
change in subscr.c is probably a good place to look for the cause:
***************
*** 478,485 ****
of the client for which the sender desires the subscription
list. The port field is the port of the sender. */
! retval = ZReadAscii(notice->z_message, notice->z_message_len,
! (unsigned char *) &temp, sizeof(u_short), 2);
if (retval != ZERR_NONE) {
syslog(LOG_WARNING, "subscr_marshal read port num: %s",
error_message(retval));
--- 478,484 ----
of the client for which the sender desires the subscription
list. The port field is the port of the sender. */
! retval = ZReadAscii16(notice->z_message, notice->z_message_len, &temp);
if (retval != ZERR_NONE) {
syslog(LOG_WARNING, "subscr_marshal read port num: %s",
error_message(retval));
***************
*** 486,494 ****
return(NULL);
}
- /* Blech blech blech */
reply = *notice;
! reply.z_port = *((u_short *)&temp);
client = client_which_client(&who->sin_addr, &reply);
--- 485,492 ----
return(NULL);
}
reply = *notice;
! reply.z_port = htons(temp);
client = client_which_client(&who->sin_addr, &reply);
but i haven't had a change to go after things with a debugger to find out if
this is really where the problem was. (the above is a diff between beta2 and
2.0 release)
-D