[pve-devel] [stable-3 common] network: tap_rate_limit: fix uninitialized value

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Mar 8 14:14:55 CET 2016


---
 data/PVE/Network.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/data/PVE/Network.pm b/data/PVE/Network.pm
index 00639f6..80f3702 100644
--- a/data/PVE/Network.pm
+++ b/data/PVE/Network.pm
@@ -47,7 +47,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);
-- 
2.1.4





More information about the pve-devel mailing list