Code

Updated control
[gosa.git] / gosa-si / modules / ArpHandler.pm
index 098a5bad94ac9e106b0f475a217d081aa8539cb6..bb2809fdb9e954beaf3c5eeff3be70a327cb01f2 100644 (file)
@@ -188,13 +188,14 @@ sub got_packet {
                my $ldap_result=&get_host_from_ldap($packet->{source_haddr});
                if(exists($ldap_result->{dn})) {
                        $hosts_database->{$packet->{source_haddr}}=$ldap_result;
+                       $hosts_database->{$packet->{source_haddr}}->{dnsname}= $dnsname;
                        if(!exists($ldap_result->{ipHostNumber})) {
                                $hosts_database->{$packet->{source_haddr}}->{ipHostNumber}=$packet->{source_ipaddr};
                        } else {
                                if(!($ldap_result->{ipHostNumber} eq $packet->{source_ipaddr})) {
                                        &main::daemon_log(
                                                "Current IP Address ".$packet->{source_ipaddr}.
-                                               " of host ".$ldap_result->{dnsname}.
+                                               " of host ".$hosts_database->{$packet->{source_haddr}}->{dnsname}.
                                                " differs from LDAP (".$ldap_result->{ipHostNumber}.")", 4);
                                }
                        }