mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-04-28 22:45:23 +00:00
fix #2267: delete address(6) and netmas(6) with cidr(6)
otherwise a user cannot delete an ip from an interface Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> (cherry picked from commit b350268a1b59ed6513d5ad7b05bee3f55ca5afab) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
e0505600dd
commit
ec4cd7ce25
@ -435,6 +435,13 @@ __PACKAGE__->register_method({
|
||||
delete $ifaces->{$iface}->{$k};
|
||||
@$families = grep(!/^inet$/, @$families) if $k eq 'address';
|
||||
@$families = grep(!/^inet6$/, @$families) if $k eq 'address6';
|
||||
if ($k eq 'cidr') {
|
||||
delete $ifaces->{$iface}->{netmask};
|
||||
delete $ifaces->{$iface}->{address};
|
||||
} elsif ($k eq 'cidr6') {
|
||||
delete $ifaces->{$iface}->{netmask6};
|
||||
delete $ifaces->{$iface}->{address6};
|
||||
}
|
||||
}
|
||||
|
||||
$map_cidr_to_address_netmask->($param);
|
||||
|
Loading…
Reference in New Issue
Block a user