add the issubnet and isconflicting code checks for ipv6
[PHPIPManager.git] / lib / www.php
index f38f5e8..3e23621 100644 (file)
@@ -267,10 +267,11 @@ function www_ip_allocateSubRange()
        $desc = $_REQUEST["subdesc"];
        
        $myip = new ip();
-       if($myip->addSubnet($name, $subip, $mask, $desc, $superid)) {
+       $err = $myip->addSubnet($name, $subip, $mask, $desc, $superid);
+       if($err ===true) {
                header("Location: index.php?notice=range added");
        } else {
-               header("Location: index.php?error=invalid ipaddress");
+               header("Location: index.php?error=$err");
        }
 }