From: <rsw...@us...> - 2010-03-03 22:14:36
|
Revision: 306 http://iscsitarget.svn.sourceforge.net/iscsitarget/?rev=306&view=rev Author: rswwalker Date: 2010-03-03 22:14:27 +0000 (Wed, 03 Mar 2010) Log Message: ----------- The loop construct in target.c wasn't correct which would cause an infinite loop if there is an interface without an address on it. Thanks go to, Andrei Tanas and Tim Westervoorde for pointing this out! Signed-off-by: Ross Walker <rsw...@gm...> Modified Paths: -------------- trunk/usr/target.c Modified: trunk/usr/target.c =================================================================== --- trunk/usr/target.c 2010-03-03 08:03:49 UTC (rev 305) +++ trunk/usr/target.c 2010-03-03 22:14:27 UTC (rev 306) @@ -72,9 +72,7 @@ getifaddrs(&ifaddr); - ifa = ifaddr; - - while (ifa) { + for (ifa = ifaddr; ifa; ifa = ifa->ifa_next) { if (!ifa->ifa_addr) continue; @@ -92,8 +90,6 @@ && cops->target_allow(tid, ifa->ifa_addr)) target_print_addr(conn, if_addr, family); } - - ifa = ifa->ifa_next; } freeifaddrs(ifaddr); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |