mirror of
https://github.com/opnsense/core.git
synced 2026-10-12 02:20:36 +00:00
interfaces: retain empty fields also written by legacy GUI
This commit is contained in:
@@ -159,6 +159,10 @@ class AssignmentController extends ApiMutableModelControllerBase
|
||||
'lock',
|
||||
'promisc',
|
||||
];
|
||||
$legacyempties = [
|
||||
'descr',
|
||||
'spoofmac',
|
||||
];
|
||||
if ($this->request->isPost()) {
|
||||
$backend = new Backend();
|
||||
/***
|
||||
@@ -189,6 +193,11 @@ class AssignmentController extends ApiMutableModelControllerBase
|
||||
unset(Config::getInstance()->object()->interfaces->$key->$legacybool);
|
||||
}
|
||||
}
|
||||
foreach ($legacyempties as $legacyempty) {
|
||||
if (!strlen($pending[$legacyempty] ?? '')) {
|
||||
Config::getInstance()->object()->interfaces->$key->$legacyempty = '';
|
||||
}
|
||||
}
|
||||
/* advanced dhcp settings not supported, prevent settings being used */
|
||||
foreach (
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user