mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
getcbi-limit-addresses-20070208
FIXES 36643 don't write addresses (if we have too many) over random memory
This commit is contained in:
parent
a4d52ee772
commit
8ecad072df
@ -520,7 +520,7 @@ shutdown_rxkernel(void)
|
|||||||
int
|
int
|
||||||
rxi_GetcbiInfo(void)
|
rxi_GetcbiInfo(void)
|
||||||
{
|
{
|
||||||
int i, j, different = 0;
|
int i, j, different = 0, num = ADDRSPERSITE;
|
||||||
int rxmtu, maxmtu;
|
int rxmtu, maxmtu;
|
||||||
afs_uint32 ifinaddr;
|
afs_uint32 ifinaddr;
|
||||||
afs_uint32 addrs[ADDRSPERSITE];
|
afs_uint32 addrs[ADDRSPERSITE];
|
||||||
@ -529,7 +529,9 @@ rxi_GetcbiInfo(void)
|
|||||||
memset((void *)addrs, 0, sizeof(addrs));
|
memset((void *)addrs, 0, sizeof(addrs));
|
||||||
memset((void *)mtus, 0, sizeof(mtus));
|
memset((void *)mtus, 0, sizeof(mtus));
|
||||||
|
|
||||||
for (i = 0; i < afs_cb_interface.numberOfInterfaces; i++) {
|
if (afs_cb_interface.numberOfInterfaces < num)
|
||||||
|
num = afs_cb_interface.numberOfInterfaces;
|
||||||
|
for (i = 0; i < num; i++) {
|
||||||
if (!afs_cb_interface.mtu[i])
|
if (!afs_cb_interface.mtu[i])
|
||||||
afs_cb_interface.mtu[i] = htonl(1500);
|
afs_cb_interface.mtu[i] = htonl(1500);
|
||||||
rxmtu = (ntohl(afs_cb_interface.mtu[i]) - RX_IPUDP_SIZE);
|
rxmtu = (ntohl(afs_cb_interface.mtu[i]) - RX_IPUDP_SIZE);
|
||||||
|
Loading…
Reference in New Issue
Block a user