This commit is contained in:
2025-05-27 18:06:36 +02:00
parent 0b3bd9108c
commit bf81566b88
6 changed files with 216 additions and 88 deletions

View File

@ -1,4 +1,5 @@
<?php
require_once "common.php";
$conf_paths = [
"/etc/dnsmasq.d/ipam.conf",
@ -17,13 +18,4 @@ foreach($conf_paths as $path) {
$conf = array_merge($default, parse_ini_file($path, true, INI_SCANNER_TYPED));
break;
}
}
$namePtn = "[a-zA-Z_][\w-]*";
$ipPtn = "\d+\.\d+\.\d+\.\d+";
$macPtn = "[\da-f]{2}(?:[:-][\da-f]{2}){5}";
$domainPtn = "[\w-]+(\.[\w-]+)*";
$ifacePtn = "[\w,]+";
$modesPtn = "static|proxya-only|slaac|ra-names|ra-stateless|ra-advrouter|off-link";
$timePtn = "\d+[mhds]";
$commentPtn = "[ \t]*(?:# ?(?<comment>.*))?";
}