summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c850938)
raw | patch | inline | side by side (parent: c850938)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 30 Apr 2009 13:29:26 +0000 (13:29 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 30 Apr 2009 13:29:26 +0000 (13:29 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13597 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-client | patch | blob | history | |
gosa-si/gosa-si-server | patch | blob | history |
diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client
index cf352ac42c86df9398af9bbd960aa18c2cfed2e2..cb2f70efa88c5b91de3a145b052c985b061e6415 100755 (executable)
--- a/gosa-si/gosa-si-client
+++ b/gosa-si/gosa-si-client
my $server_ip= shift;
my $result= "00:00:00:00:00:00";
+ if($server_ip =~ /^[a-z][a-z0-9\.]$/i) {
+ my $ip_address = inet_ntoa(scalar gethostbyname($server_ip));
+ if(defined($ip_address) && $ip_address =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/) {
+ # Write ip address to $server_ip variable
+ $server_ip = $ip_address;
+ }
+ }
+
if($server_ip =~ /^(\d\d?\d?\.){3}\d\d?\d?$/) {
my $PROC_NET_ROUTE= ('/proc/net/route');
diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index fbb16fee507b9389f978d0bf958c9f2bf2cba107..7a7ea0870eb9dbcb973d2c4b8cc592fe9235fcd6 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
}
# Check if source contains hostname instead of ip address
- if(not $source =~ /^[a-z0-9\.]+:\d+$/i) {
+ if($source =~ /^[a-z][a-z0-9\.]+:\d+$/i) {
my ($hostname,$port) = split(/:/, $source);
my $ip_address = inet_ntoa(scalar gethostbyname($hostname));
if(defined($ip_address) && $ip_address =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/ && $port =~ /^\d+$/) {