]> git.proxmox.com Git - qemu-server.git/commitdiff
fix net regex in qm cleanup
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 20 Sep 2022 14:50:43 +0000 (16:50 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 21 Sep 2022 07:12:47 +0000 (09:12 +0200)
the '+' needs to be in the brackets, otherwise '$1' is not the right id

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/CLI/qm.pm

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