From: rettenbe Date: Tue, 2 Sep 2008 13:31:13 +0000 (+0000) Subject: bugfix: get opsi hosts reports correct local mac address X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=51276271903e3fcaf8178f430f67434276b0fa05;p=gosa.git bugfix: get opsi hosts reports correct local mac address git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12346 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/server/events/gosaTriggered.pm b/gosa-si/server/events/gosaTriggered.pm index 1e3b3c4ea..e18e0b4a7 100644 --- a/gosa-si/server/events/gosaTriggered.pm +++ b/gosa-si/server/events/gosaTriggered.pm @@ -1139,8 +1139,9 @@ sub get_hosts_with_module { # Check localhost for module_name if (exists @{$main::known_modules->{'GosaPackages'}}[2]->{$module_name}) { - my ($remote_ip, $remote_port) = split(/:/, $source); - my $local_mac = &get_local_mac_for_remote_ip($remote_ip); + my ($local_ip, $local_port) = split(/:/, $target); + my $network_interface= &get_interface_for_ip($local_ip); + my $local_mac = &get_mac_for_interface($network_interface); &add_content2xml_hash($out_hash, "host", $local_mac); } diff --git a/gosa-si/tests/client.php b/gosa-si/tests/client.php index cc509f506..b9ebc4264 100755 --- a/gosa-si/tests/client.php +++ b/gosa-si/tests/client.php @@ -77,7 +77,7 @@ for($count = 1; $count <= $zahl; $count++) #$data = "
gosa_get_client_for_login_usr
GOSA GOSA harald
"; # List all si-server providing opsi - $data = "
gosa_get_hosts_with_module
GOSA GOSA opsi_com
"; + $data = "
gosa_get_hosts_with_module
GOSA 10.89.1.31:20081 opsi_com
"; ################## # recreate fai dbs @@ -180,7 +180,7 @@ for($count = 1; $count <= $zahl; $count++) ######################### # Mailqueue communication - #$data = "
gosa_mailqueue_query
GOSA 00:01:6c:9d:b9:fa
"; + $data = "
gosa_mailqueue_query
GOSA 00:01:6c:9d:b9:fa
"; # multiple xml tags msg_id are allowed #$data = "
gosa_mailqueue_hold
GOSA 00:01:6c:9d:b9:fa 99C8ABEF23
";