diff options
author | jim-p <jimp@pfsense.org> | 2011-03-30 11:46:24 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-03-30 11:47:56 -0400 |
commit | 4e13b60ff47996a94093fdb19761669de490b403 (patch) | |
tree | bf03d644147349cc35976c06aa764b42568b3ae4 /config/bandwidthd | |
parent | 8a6b3b5f5143af020b82cb062e27ad499f10cc86 (diff) | |
download | pfsense-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.inc | 3 |
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"; } } |