]> git.proxmox.com Git - pve-manager.git/commit - PVE/API2/Network.pm
fix #3385: api: network: check for used ports before writing
authorStoiko Ivanov <s.ivanov@proxmox.com>
Mon, 19 Apr 2021 18:11:28 +0000 (20:11 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 22 Apr 2021 19:32:26 +0000 (21:32 +0200)
commit6cd854d8c76cdba6dc2e6dd3172dd3615d87155e
treea2a633dfd581db803da1ec3b66de2a7c8c897597
parent5d4faa4dd7d7bba35ad3359c288c64c184ec67f4
fix #3385: api: network: check for used ports before writing

Currently the check for used ports for bonds and bridges happens
while rendering '/etc/network/interfaces.new' in PVE::Inotify
(pve-common).
However at that stage the new/updated interface is already merged
with the old settings, making it impossible to indicate where a NIC
is currently used.

The code is adapted from the renderer in
PVE::Inotify::__write_etc_network_interfaces.

Tested on a virtual PVE instance.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/API2/Network.pm