summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: af7f1b2)
raw | patch | inline | side by side (parent: af7f1b2)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 18 May 2009 08:11:29 +0000 (08:11 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 18 May 2009 08:11:29 +0000 (08:11 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13652 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/modules/ArpHandler.pm | patch | blob | history |
index 7780d2adc68ea6cdb73440631baec7d0c186bd7a..144d72b55ac6824ce21db12a3311ddb562f8f5d0 100644 (file)
END{}
my ($timeout, $mailto, $mailfrom, $user, $group);
-my ($arp_enabled, $arp_interface, $ldap_uri, $ldap_base, $ldap_admin_dn, $ldap_admin_password);
+my ($arp_enabled, $arp_interface, $arp_update, $ldap_uri, $ldap_base, $ldap_admin_dn, $ldap_admin_password);
my $hosts_database={};
my $ldap;
"ArpHandler" => {
"enabled" => [\$arp_enabled, "true"],
"interface" => [\$arp_interface, "all"],
+ "update-entries" => [\$arp_update, "false"],
},
"server" => {
"ldap-uri" => [\$ldap_uri, ""],
if(!exists($hosts_database->{$packet->{source_haddr}})) {
my $dnsname= gethostbyaddr(inet_aton($packet->{source_ipaddr}), AF_INET) || $packet->{source_ipaddr};
my $ldap_result=&get_host_from_ldap($packet->{source_haddr});
- if(exists($ldap_result->{dn})) {
+ if(exists($ldap_result->{dn}) and $arp_update eq "true") {
$hosts_database->{$packet->{source_haddr}}=$ldap_result;
$hosts_database->{$packet->{source_haddr}}->{dnsname}= $dnsname;
if(!exists($ldap_result->{ipHostNumber})) {
}
$hosts_database->{$packet->{source_haddr}}->{device}= $capture_device;
} else {
- if(!($hosts_database->{$packet->{source_haddr}}->{ipHostNumber} eq $packet->{source_ipaddr})) {
+ if(($arp_update eq "true") and !($hosts_database->{$packet->{source_haddr}}->{ipHostNumber} eq $packet->{source_ipaddr})) {
&main::daemon_log(
"IP Address change of MAC ".$packet->{source_haddr}.
": ".$hosts_database->{$packet->{source_haddr}}->{ipHostNumber}.