aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/bandwidthd/bandwidthd.inc10
-rw-r--r--config/bandwidthd/bandwidthd.xml6
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>