Code

Correct the source ip if 0.0.0.0
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Feb 2008 09:57:54 +0000 (09:57 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Feb 2008 09:57:54 +0000 (09:57 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8814 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/gosa-si-server

index b274921949b70676a7cc076ea82dfdda28ab6d3c..71500ad2ce7a3cd1493af149e0fdc14406fc9f03 100755 (executable)
@@ -667,6 +667,10 @@ sub send_msg_to_target {
         $header = "";
     }
 
+       # Patch the source ip
+       my $remote_ip = sprintf("%s", $address =~ /^([0-9\.]*?):.*$/);
+       $msg =~ s/<source>(0\.0\.0\.0):(\d*?)<\/source>/<source>$remote_ip:\2<\/source>/s;
+
     # encrypt xml msg
     my $crypted_msg = &encrypt_msg($msg, $encrypt_key);