aboutsummaryrefslogtreecommitdiffstats
path: root/config/bandwidthd/bandwidthd.inc
diff options
context:
space:
mode:
authorlgcosta <lgcosta@pfsense.org>2011-03-06 15:58:16 -0300
committerlgcosta <lgcosta@pfsense.org>2011-03-06 16:05:02 -0300
commit35f7b6d69c273c7a0336dcabef32bce62dd79f74 (patch)
tree341c760e1b1aed6770f9702bb005873dc3031c7b /config/bandwidthd/bandwidthd.inc
parent105ac0076928ae40662c6d81efc5f6831f917eab (diff)
downloadpfsense-packages-35f7b6d69c273c7a0336dcabef32bce62dd79f74.tar.gz
pfsense-packages-35f7b6d69c273c7a0336dcabef32bce62dd79f74.tar.bz2
pfsense-packages-35f7b6d69c273c7a0336dcabef32bce62dd79f74.zip
Add support for multiple subnets custom on config form
Diffstat (limited to 'config/bandwidthd/bandwidthd.inc')
-rw-r--r--config/bandwidthd/bandwidthd.inc10
1 files changed, 9 insertions, 1 deletions
diff --git a/config/bandwidthd/bandwidthd.inc b/config/bandwidthd/bandwidthd.inc
index 0bab93f8..6f61527b 100644
--- a/config/bandwidthd/bandwidthd.inc
+++ b/config/bandwidthd/bandwidthd.inc
@@ -76,6 +76,8 @@ function bandwidthd_install_config() {
log_error("You should specify a interface for bandwidthd to listen on. exiting.");
}
+ $subnets_custom = split(';',str_replace(' ','',$config['installedpackages']['bandwidthd']['config'][0]['subnets_custom']));
+
/* initialize to "" */
$subnets = "";
//$ifdescrs = array("lan", "wan");
@@ -99,6 +101,12 @@ function bandwidthd_install_config() {
}
}
+ if(is_array($subnets_custom)) {
+ foreach($subnets_custom as $sub) {
+ $subnets .= "subnet {$sub}\n";
+ }
+ }
+
/* initialize to "" */
$dev = "";
if(is_array($ifdescrs)) {
@@ -197,4 +205,4 @@ EOF;
}
-?> \ No newline at end of file
+?>