summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d33f9e1)
raw | patch | inline | side by side (parent: d33f9e1)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 5 Feb 2008 13:44:24 +0000 (13:44 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 5 Feb 2008 13:44:24 +0000 (13:44 +0000) |
Clients Mac Address will now be detected correctly.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8748 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8748 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-client | patch | blob | history | |
gosa-si/modules/GosaPackages.pm | patch | blob | history |
diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client
index 128b2a16a2c16f69416f2ec3106b8b55ae83a438..b87220450a2ad42ae3c1d419859a683ff086b9cd 100755 (executable)
--- a/gosa-si/gosa-si-client
+++ b/gosa-si/gosa-si-client
"client" =>
{"client_port" => [\$client_port, "20083"],
"client_ip" => [\$client_ip, "0.0.0.0"],
- "client_mac_address" => [\$client_mac_address, "00:00:00:00:00:00:00"],
+ "client_mac_address" => [\$client_mac_address, "00:00:00:00:00:00"],
"ldap" => [\$ldap_enabled, 1],
"ldap_config" => [\$ldap_config, "/etc/ldap/ldap.conf"],
"pam_config" => [\$pam_config, "/etc/pam_ldap.conf"],
if(defined($server_ip)) {
$result = &get_local_mac_for_remote_ip($server_ip);
}
- elsif ($client_mac_address && length($client_mac_address) > 0){
+ elsif ($client_mac_address && length($client_mac_address) > 0 && !($client_mac_address eq "00:00:00:00:00:00")){
$result = &client_mac_address;
}
else {
my $SIOCGIFHWADDR= 0x8927; # man 2 ioctl_list
# A configured MAC Address should always override a guessed value
- if ($client_mac_address and length($client_mac_address) > 0) {
+ if ($client_mac_address and length($client_mac_address) > 0 and not($client_mac_address eq "00:00:00:00:00:00")) {
$result= $client_mac_address;
}
else {
# matches (defaultroute last).
#===============================================================================
sub get_local_mac_for_remote_ip {
- my $ifreq= shift;
+ my $server_ip= shift;
my $result= "00:00:00:00:00:00";
my $PROC_NET_ROUTE= ('/proc/net/route');
}
}
-
return $result;
}
# create registration msg
my $register_hash = &create_xml_hash("here_i_am", $client_address, $server);
&add_content2xml_hash($register_hash, "new_passwd", $server_key);
- &add_content2xml_hash($register_hash, "mac_address", $client_mac_address);
+ &add_content2xml_hash($register_hash, "mac_address", &get_local_mac_for_remote_ip(sprintf("%s", $server =~ /^([0-9\.]*?):.*$/)));
&add_content2xml_hash($register_hash, "events", $events);
&add_content2xml_hash($register_hash, "gotoHardwareChecksum", $gotoHardwareChecksum);
index 1a219a9899e3fe3e16819cf0de95535a4826b0ff..0123e90e74b5de6655238cb810ca9df10581fda7 100644 (file)
eval{ require $event; };
if( $@ ) {
- daemon_log("import of event module '$event' failed", 1);
- daemon_log("$@", 8);
+ &main::daemon_log("import of event module '$event' failed", 1);
+ &main::daemon_log("$@", 8);
next;
}