[OpenAFS-devel] libadmin problem with ListCellsRPC().

Ken Aaker kenaaker@silverbacksystems.com
Thu, 03 Mar 2005 13:46:49 -0600


|I found a problem that is caused by a mismatch between what gets
returned from the rx call and the ListCellsRPC. It looks like
the rpc call returns a server list, and the util_CMListCellsBegin
iterator functions are expecting a simple 8 element array of
IP addresses.

A patch for my fix follows, but I don't think its a good fix yet.
I couldn't figure out if I could allocate memory to contain the
list of IP Addresses, and what I put in will overflow as soon
as there are more than 8 server addresses. What's the mechanism
that's supposed to be used to unmarshal varying length array from
an RX return packet?

Ken Aaker


Index: src/libadmin/adminutil/afs_utilAdmin.c
===================================================================
RCS file: /cvs/openafs/src/libadmin/adminutil/afs_utilAdmin.c,v
retrieving revision 1.8
diff -r1.8 afs_utilAdmin.c
21a22
 > #include <afs/afsint.h>
33d33
< #include <afs/afsint.h>
1993a1994
 >     t->cell[slot].servers.serverList_val = &t->cell[slot].serverIPAddrs;
2000c2001
<                             t->cell[slot].serverAddr);
---
 >                             &t->cell[slot].servers);
Index: src/libadmin/adminutil/afs_utilAdmin.h
===================================================================
RCS file: /cvs/openafs/src/libadmin/adminutil/afs_utilAdmin.h,v
retrieving revision 1.6
diff -r1.6 afs_utilAdmin.h
21d20
<
99c98,99
<     afs_int32 serverAddr[UTIL_MAX_CELL_HOSTS];
---
 >     serverList servers;

|