summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4244398)
raw | patch | inline | side by side (parent: 4244398)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 30 Oct 2009 12:45:25 +0000 (12:45 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 30 Oct 2009 12:45:25 +0000 (12:45 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14716 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/modules/GosaSupportDaemon.pm | patch | blob | history |
index d6420a1424ac75ff010c9b204ab848f209786087..3cc769ba846e6dbe2ff53a7390588c5be7051516 100644 (file)
sub get_interface_for_ip {
my $result;
my $ip= shift;
+
+ if($ip =~ /^[a-z]/i) {
+ my $ip_address = inet_ntoa(scalar gethostbyname($ip));
+ if(defined($ip_address) && $ip_address =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/) {
+ # Write ip address to $source variable
+ $ip = $ip_address;
+ }
+ }
+
if ($ip && length($ip) > 0) {
my @ifs= &get_interfaces();
if($ip eq "0.0.0.0") {