[615] in Zephyr_Bugs
Re: "Address family not supported by protocol family"
daemon@ATHENA.MIT.EDU (Greg Hudson)
Thu Jul 6 15:39:10 1995
Date: Thu, 6 Jul 1995 15:40:52 -0400
From: Greg Hudson <ghudson@MIT.EDU>
To: Dan Egnor <egnor@ugcs.caltech.edu>
Cc: zephyr-bugs@MIT.EDU
In-Reply-To: "[595] in Zephyr_Bugs"
> When I run it, it initially appears to work fine, but when I tried
> to put "zwgc -ttymode" in our system-wide login script, the server
> started logging errors like the following:
> Jul 3 17:06:36 avarice zephyrd[28945]: xmit xmit: (0.0.0.8/42152)
> Address family not supported by protocol family
I think these errors are due to two memory corruption bugs in class.c,
which are fixed by the following patch:
Index: class.c
===================================================================
RCS file: /mit/zephyr/src/CVS/zephyr/server/class.c,v
retrieving revision 1.25
diff -c -r1.25 class.c
*** 1.25 1995/06/30 22:11:03
--- class.c 1995/07/06 19:25:54
***************
*** 151,157 ****
#endif
hashval = DEST_HASHVAL(*dest);
for (triplet = triplet_bucket[hashval]; triplet; triplet = triplet->next) {
! if (ZDest_eq(triplet->dest, client)) {
retval = remove_client(triplet, client);
if (retval != ZERR_NONE)
return retval;
--- 151,157 ----
#endif
hashval = DEST_HASHVAL(*dest);
for (triplet = triplet_bucket[hashval]; triplet; triplet = triplet->next) {
! if (ZDest_eq(triplet->dest, dest)) {
retval = remove_client(triplet, client);
if (retval != ZERR_NONE)
return retval;
***************
*** 319,324 ****
--- 319,325 ----
new_size * sizeof(Client *));
if (newclients == NULL)
return ENOMEM;
+ clientp = newclients + (clientp - triplet->clients);
triplet->clients = newclients;
triplet->clients_size = new_size;
}