Code

Allow get_local_mac_for_remote_ip to translate hostnames to ip addresses.
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 6 May 2009 14:36:07 +0000 (14:36 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 6 May 2009 14:36:07 +0000 (14:36 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13620 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/gosa-si-client

index cb2f70efa88c5b91de3a145b052c985b061e6415..e24b8d1194ef5f6b0b7e0523fb4c928442fe599e 100755 (executable)
@@ -329,7 +329,7 @@ sub get_local_mac_for_remote_ip {
        my $server_ip= shift;
        my $result= "00:00:00:00:00:00";
 
-       if($server_ip =~ /^[a-z][a-z0-9\.]$/i) {
+       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