]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE12-ubik-dont-copy-stack-garbage-when-netinfo-forces-primary-address-change...
authorDerrick Brashear <shadow@dementia.org>
Thu, 15 May 2003 16:46:13 +0000 (16:46 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 15 May 2003 16:46:13 +0000 (16:46 +0000)
don't mess up count by reusing it

(cherry picked from commit 6cb978478120614f0f9df21a08a3be9decc89435)

src/ubik/beacon.c

index 629a16ab099ded03c21927d303bee859ac709544..25411aa0563ecf2103edf17c4dcba186d344fe1a 100644 (file)
@@ -456,7 +456,7 @@ static verifyInterfaceAddress(ame, info, aservers)
 {
     afs_uint32 myAddr[UBIK_MAX_INTERFACE_ADDR], *servList, tmpAddr;
     afs_uint32  myAddr2[UBIK_MAX_INTERFACE_ADDR];
-    int        count, found, i, j, totalServers, start, end, usednetfiles = 0;
+    int tcount,        count, found, i, j, totalServers, start, end, usednetfiles = 0;
 
     if (info)
         totalServers = info->numServers;
@@ -520,15 +520,15 @@ static verifyInterfaceAddress(ame, info, aservers)
        if (usednetfiles) {
            /* take the address we did get, then see if ame was masked */
            *ame=myAddr[0];
-           count = rx_getAllAddr(myAddr2, UBIK_MAX_INTERFACE_ADDR); 
-           if ( count <= 0 )           /* no address found */
+           tcount = rx_getAllAddr(myAddr2, UBIK_MAX_INTERFACE_ADDR); 
+           if ( tcount <= 0 )           /* no address found */
            {
                ubik_print("ubik: No network addresses found, aborting..");
                return UBADHOST;
            }
            
            /* verify that the My-address passed in by ubik is correct */
-           for ( j=0, found = 0; j < count; j++)
+           for ( j=0, found = 0; j < tcount; j++)
            {
                if ( *ame == myAddr2[j] ) /* both in net byte order */
                {