summaryrefslogtreecommitdiffstats
path: root/etc/inc/shaper.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-10-30 19:23:34 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-10-30 19:23:34 +0000
commit95904542e6e0bd9f5b19c5e17103afd8666ca3a8 (patch)
tree9e817f76a80c3d77f61960c8bf6876d4fa449a8b /etc/inc/shaper.inc
parent81b338bd1db2bddb10fb75df9456fab84e00a913 (diff)
downloadpfsense-95904542e6e0bd9f5b19c5e17103afd8666ca3a8.zip
pfsense-95904542e6e0bd9f5b19c5e17103afd8666ca3a8.tar.gz
MFC 7242
If there's no bandwidth set on an interface, default the interface to 10Mbit This handles vitual interfaces such as vlan Submitted-by: Dan Swartzendruber
Diffstat (limited to 'etc/inc/shaper.inc')
-rw-r--r--etc/inc/shaper.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc
index 21d931a..138960e 100644
--- a/etc/inc/shaper.inc
+++ b/etc/inc/shaper.inc
@@ -207,6 +207,10 @@ function filter_setup_altq_interfaces() {
if($queue_names <> ""){
$altq_rules .= "altq on {$config['interfaces'][$ifname]['if']} ";
+ /* Default bandwidth to 10Mbit - this handles virtual interfaces (vlan) that have
+ * no bandwidth associated with them.
+ */
+ $bandwidth = "bandwidth 10Mb";
if($config['interfaces'][$ifname]['bandwidth'] <> "")
$bandwidth = "bandwidth {$config['interfaces'][$ifname]['bandwidth']}{$config['interfaces'][$ifname]['bandwidthtype']}";
$altq_rules .= "{$config['shaper']['schedulertype']} {$bandwidth} ";
OpenPOWER on IntegriCloud