interfaces: requiring dhcp6-ia-pd-len will punch it into LAN config, too

While here add some style and proper parenthesis.
This commit is contained in:
Franco Fichtner
2026-09-18 12:53:46 +02:00
parent 3fad5a0504
commit abb50eaaef
2 changed files with 3 additions and 4 deletions
@@ -131,7 +131,7 @@ class NetworkInterface extends BaseModel
/* flush actions that need to be applied, for which we need history (config reflects running config) */
$todo = [
'pending' => $this->interface->$key->toLegacy(),
'pending_action' => 'update'
'pending_action' => 'update',
];
$changed = false;
if ($intf->if != $interfaces[$key]['if']) {
@@ -141,7 +141,7 @@ class NetworkInterface extends BaseModel
if ($prop === 'dhcp6_norequest_dns' && !isset($intf->$prop)) {
$curval = '0'; /* actually stored as dhcp6_request_dns in our model */
} elseif (!isset($intf->$prop)) {
$curval = $this->interface->$key->$prop instanceof BooleanField ? '0' : '';
$curval = ($this->interface->$key->$prop instanceof BooleanField) ? '0' : '';
} else {
$curval = $intf->$prop;
}
@@ -174,7 +174,7 @@ class NetworkInterface extends BaseModel
if ($node !== null) {
$this->store_if_todo($newIdentifier, [
'pending' => $node->toLegacy(),
'pending_action' => 'update'
'pending_action' => 'update',
]);
/* We want the node to return the new network identifier as the uuid not
@@ -149,7 +149,6 @@
</OptionValues>
</dhcp6vlanprio>
<dhcp6-ia-pd-len type="OptionField">
<Required>Y</Required>
<Default>0</Default>
<OptionValues>
<pcp0 value="0">64</pcp0>