]> git.proxmox.com Git - pve-common.git/commitdiff
network: tap_rate_limit: fix uninitialized value
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 8 Mar 2016 11:32:51 +0000 (12:32 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 8 Mar 2016 14:50:03 +0000 (15:50 +0100)
src/PVE/Network.pm

index 0f92e30734d9d799400f63ad5ea8cbffc7756b2d..5d265299c5998683a3179c2139841e8f2d68d96e 100644 (file)
@@ -108,7 +108,7 @@ sub tap_rate_limit {
     my ($iface, $rate) = @_;
 
     my $debug = 0;
-    $rate = int($rate*1024*1024);
+    $rate = int($rate*1024*1024) if $rate;
     my $burst = 1024*1024;
 
     setup_tc_rate_limit($iface, $rate, $burst, $debug);