aboutsummaryrefslogtreecommitdiffstats
path: root/config/bandwidthd
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-03-30 11:46:24 -0400
committerjim-p <jimp@pfsense.org>2011-03-30 11:47:56 -0400
commit4e13b60ff47996a94093fdb19761669de490b403 (patch)
treebf03d644147349cc35976c06aa764b42568b3ae4 /config/bandwidthd
parent8a6b3b5f5143af020b82cb062e27ad499f10cc86 (diff)
downloadpfsense-packages-4e13b60ff47996a94093fdb19761669de490b403.tar.gz
pfsense-packages-4e13b60ff47996a94093fdb19761669de490b403.tar.bz2
pfsense-packages-4e13b60ff47996a94093fdb19761669de490b403.zip
Only print a subnet line for bandwidthd if it's a valid subnet, to avoid generating an invalid configuration file.
Diffstat (limited to 'config/bandwidthd')
-rw-r--r--config/bandwidthd/bandwidthd.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/config/bandwidthd/bandwidthd.inc b/config/bandwidthd/bandwidthd.inc
index 6f61527b..3aa53694 100644
--- a/config/bandwidthd/bandwidthd.inc
+++ b/config/bandwidthd/bandwidthd.inc
@@ -103,7 +103,8 @@ function bandwidthd_install_config() {
if(is_array($subnets_custom)) {
foreach($subnets_custom as $sub) {
- $subnets .= "subnet {$sub}\n";
+ if (!empty($sub) && is_subnet($sub))
+ $subnets .= "subnet {$sub}\n";
}
}