Code

Updated IP recognition
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 18 Sep 2009 07:54:40 +0000 (07:54 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 18 Sep 2009 07:54:40 +0000 (07:54 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14288 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/class_termDNS.inc

index 37553c2ab71616d248b226bc2a1b6303ea2a6f90..df1944d3eb519a0095a8a05ce9b8c1e6224186e9 100644 (file)
@@ -1123,9 +1123,11 @@ class termDNS extends plugin
       "(objectClass=gotoPrinter)".
       "(objectClass=ipHost)";
     $list = array();
-    $ldap->search("(&(|{$ocs})(ipHostNumber={$net}*))",array("ipHostNumber"));
+    $ldap->search("(&(|{$ocs})(ipHostNumber=*))",array("ipHostNumber"));
     while($attrs = $ldap->fetch()){
-      $list[] = $attrs['ipHostNumber'][0];
+      if (preg_match("/^$net\./", $attrs['ipHostNumber'][0])) {
+        $list[] = $attrs['ipHostNumber'][0];
+      }
     }
 
     // Set starting ip.