5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-03-11 16:58:28 +03:00

fix net regex in qm cleanup

the '+' needs to be in the brackets, otherwise '$1' is not the right id

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2022-09-20 16:50:43 +02:00 committed by Fabian Grünbichler
parent b4415a5253
commit 702c2f6ebe

View File

@ -809,7 +809,7 @@ __PACKAGE__->register_method({
# we have to cleanup the tap devices after a crash # we have to cleanup the tap devices after a crash
foreach my $opt (keys %$conf) { foreach my $opt (keys %$conf) {
next if $opt !~ m/^net(\d)+$/; next if $opt !~ m/^net(\d+)$/;
my $interface = $1; my $interface = $1;
PVE::Network::tap_unplug("tap${vmid}i${interface}"); PVE::Network::tap_unplug("tap${vmid}i${interface}");
} }