diff options
author | lgcosta <lgcosta@pfsense.org> | 2011-03-06 15:58:16 -0300 |
---|---|---|
committer | lgcosta <lgcosta@pfsense.org> | 2011-03-06 16:05:02 -0300 |
commit | 35f7b6d69c273c7a0336dcabef32bce62dd79f74 (patch) | |
tree | 341c760e1b1aed6770f9702bb005873dc3031c7b /config/bandwidthd | |
parent | 105ac0076928ae40662c6d81efc5f6831f917eab (diff) | |
download | pfsense-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')
-rw-r--r-- | config/bandwidthd/bandwidthd.inc | 10 | ||||
-rw-r--r-- | config/bandwidthd/bandwidthd.xml | 6 |
2 files changed, 15 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 +?> diff --git a/config/bandwidthd/bandwidthd.xml b/config/bandwidthd/bandwidthd.xml index 699907ef..f716a144 100644 --- a/config/bandwidthd/bandwidthd.xml +++ b/config/bandwidthd/bandwidthd.xml @@ -88,6 +88,12 @@ <default_value>lan</default_value> </field> <field> + <fielddescr>Subnet</fielddescr> + <fieldname>subnets_custom</fieldname> + <description>The subnet that bandwidthd will bind to. (separe with ';' for multiple subnets)</description> + <type>input</type> + </field> + <field> <fielddescr>Skip intervals</fielddescr> <fieldname>skipintervals</fieldname> <description></description> |