Thanks for sending this our way, Jason. The patch looks correct to me, but for the sake of building good code review discipline, I'd like to wait for an additional thumbs-up before committing it. Anyone out there feel like reviewing Jason's patch?
Also, if you haven't already done so, could you sign and send us a copy of the contribution agreement? You can find it here: http://open-vm-tools.sourceforge.net/files/vca.pdf. > When investigating why I wasn't getting nic info updates with an older > version of open-vm-tools, I discovered a couple of logic errors in > lib/guestInfo/guestInfoServer.c and wrote the patch below to fix it. > > thanks, > > Jason > > > diff -urN > open-vm-tools-2008.07.01-102166.vanilla/lib/guestInfo/guestInf > oServer.c > open-vm-tools-2008.07.01-102166/lib/guestInfo/guestInfoServer.c > --- > open-vm-tools-2008.07.01-102166.vanilla/lib/guestInfo/guestInf > oServer.c 2008-07-11 18:53:51.000000000 -0400 > +++ > open-vm-tools-2008.07.01-102166/lib/guestInfo/guestInfoServer. > c 2008-07-12 20:57:48.000000000 -0400 > @@ -828,17 +835,16 @@ > } > > /* Which IP addresses have been modified for this NIC? */ > - for (j = 0; j < matchedNic->ips.ips_len; j++) { > - VmIpAddress *cachedIp = &cachedNic->ips.ips_val[i]; > + for (j = 0; j < cachedNic->ips.ips_len; j++) { > + VmIpAddress *cachedIp = &cachedNic->ips.ips_val[j]; > Bool foundIP = FALSE; > u_int k; > > for (k = 0; k < matchedNic->ips.ips_len; k++) { > VmIpAddress *matchedIp = &matchedNic->ips.ips_val[k]; > - if (strncmp(cachedIp->ipAddress, > + if (0 == strncmp(cachedIp->ipAddress, > matchedIp->ipAddress, > NICINFO_MAX_IP_LEN)) { > foundIP = TRUE; > break; > } > } > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ open-vm-tools-devel mailing list open-vm-tools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-vm-tools-devel