You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by ar...@apache.org on 2009/06/10 00:04:05 UTC
svn commit: r783148 -
/incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod.pm
Author: arkurth
Date: Tue Jun 9 22:04:05 2009
New Revision: 783148
URL: http://svn.apache.org/viewvc?rev=783148&view=rev
Log:
VCL-23
Fixed bug in Windows_mod.pm::get_network_configuration() where it was returning the wrong interface if the public adapther is listed first in ipconfig output.
Modified:
incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod.pm
Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod.pm
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod.pm?rev=783148&r1=783147&r2=783148&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod.pm Tue Jun 9 22:04:05 2009
@@ -4499,7 +4499,9 @@
notify($ERRORS{'DEBUG'}, 0, "interface does not have an ip address: $interface_name");
next;
}
- elsif (grep(/$computer_private_ip_address/, @ip_addresses)) {
+
+ # Check if interface has private IP address assigned to it
+ if (grep(/$computer_private_ip_address/, @ip_addresses)) {
# If private interface information was requested, return a hash containing only this interface
notify($ERRORS{'DEBUG'}, 0, "private interface found: $interface_name, description: $description, address(es): " . join (", ", @ip_addresses));
if ($network_type =~ /private/i) {
@@ -4550,9 +4552,14 @@
}
else {
notify($ERRORS{'DEBUG'}, 0, "public interface found: $interface_name, description: $description, address(es): " . join (", ", @ip_addresses));
- my %return_hash = ($interface_name => $network_configuration{$interface_name});
- notify($ERRORS{'DEBUG'}, 0, "returning data for public interface: $interface_name (" . join (", ", @ip_addresses) . ")");
- return \%return_hash;
+ if ($network_type =~ /public/i) {
+ my %return_hash = ($interface_name => $network_configuration{$interface_name});
+ notify($ERRORS{'DEBUG'}, 0, "returning data for public interface: $interface_name (" . join (", ", @ip_addresses) . ")");
+ return \%return_hash;
+ }
+ else {
+ next;
+ }
}
}
}