interfaces: put back DUID validity for faulty setup

Since DUID is part of interface settings it's better to not invalidate
existing values and/or rewrite them later on.
This commit is contained in:
Franco Fichtner 2026-05-11 17:37:04 +02:00
parent 59fc27d40e
commit 7c8a426bbe

View file

@ -50,7 +50,11 @@ class DUIDField extends TextField
$duid_length = count($values);
$test1 = hexdec($values[1]);
$test2 = hexdec($values[3]);
if (($test1 == 1 && $test2 == 1 ) || ($test1 == 3 && $test2 == 1 ) || ($test1 == 4) || ($test1 == 2)) {
if (($test1 == 1 && $test2 == 1) || ($test1 == 3 && $test2 == 1) || $test1 == 4 || $test1 == 2) {
$valid_duid = true;
}
if ($test1 == 0 && $test2 == 4) {
/* XXX accept these faulty DUIDs we accepted previously */
$valid_duid = true;
}