feat: add logic to disable DHCP when enabling the firewall in Proxmox component for improved configuration management
This commit is contained in:
@@ -148,6 +148,11 @@ class Firewall extends Component
|
||||
$newState = $currentState ? 0 : 1;
|
||||
$payload = ['enable' => $newState];
|
||||
|
||||
// If enabling firewall, also disable DHCP
|
||||
if ($newState === 1) {
|
||||
$payload['dhcp'] = 0;
|
||||
}
|
||||
|
||||
$response = $this->firewallRequest(
|
||||
'/nodes/' . $this->server->node->name . '/qemu/' . $this->server->vm_id . '/firewall/options',
|
||||
'put',
|
||||
|
||||
Reference in New Issue
Block a user