diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-01-29 23:43:17 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-01-29 23:43:17 +0000 |
commit | 079712003cfaf135b5d14ff27ae25afbdc4923e9 (patch) | |
tree | af6939cbf5f7adfa5dffcac76f7c94c95e703c06 /etc/inc/shaper.inc | |
parent | 58664cc9fbc39de8273c90ea88330741d1c0eb95 (diff) | |
download | pfsense-079712003cfaf135b5d14ff27ae25afbdc4923e9.zip pfsense-079712003cfaf135b5d14ff27ae25afbdc4923e9.tar.gz |
Fix a bug with regex matching.
Diffstat (limited to 'etc/inc/shaper.inc')
-rw-r--r-- | etc/inc/shaper.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc index 6354f8f..88a504b 100644 --- a/etc/inc/shaper.inc +++ b/etc/inc/shaper.inc @@ -105,12 +105,12 @@ function get_bandwidthtype_scale($type) { function get_hfsc_bandwidth($object, $bw) { $pattern= "/[0-9]+/"; if (preg_match($pattern, $bw, $match)) - $bw_1 = $match[0]; + $bw_1 = $match[1]; else return 0; $pattern= "/(b|Kb|Mb|Gb|%)/"; if (preg_match($pattern, $bw, $match)) { - switch ($match[0]) { + switch ($match[1]) { case '%': $bw_1 = $bw_1 / 100 * get_interface_bandwidth($object); break; |