From 7433f4dfc9ea4056871ef273368e9826ccf38517 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 22 Mar 2010 21:48:20 -0300 Subject: Introducing $max_in_bandwidth and $max_out_bandwidth --- manifests/firewall.pp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'manifests') diff --git a/manifests/firewall.pp b/manifests/firewall.pp index 6aea13d..765a59f 100644 --- a/manifests/firewall.pp +++ b/manifests/firewall.pp @@ -151,9 +151,19 @@ class firewall { # # Traffic shapping # + $in_bandwidth = $max_in_bandwidth ? { + '' => "2mbit", + default => "$max_in_bandwidth", + } + + $out_bandwidth = $max_out_bandwidth ? { + '' => "2mbit", + default => "$max_out_bandwidth", + } + shorewall::tcdevices { "eth0": - in_bandwidth => "2mbit", - out_bandwidth => "2mbit", + in_bandwidth => "$in_bandwidth", + out_bandwidth => "$out_bandwidth", } shorewall::tcrules { "ssh-tcp": -- cgit v1.2.3