diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-01-27 19:20:42 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-01-27 19:20:42 +0000 |
commit | eaa372599b29d34d4f2443922020fbb8e82c4008 (patch) | |
tree | 5c73df2f504fbc5c5dcc96172792fe9f9a4c7e0c /etc | |
parent | 56f9c164e2d60a3ae624d8c545b7a1c7a450c41b (diff) | |
download | pfsense-eaa372599b29d34d4f2443922020fbb8e82c4008.zip pfsense-eaa372599b29d34d4f2443922020fbb8e82c4008.tar.gz |
Change regex to match valid bandwidth to allow bandwidth with decimal point to be specified.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/util.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index 7c46eac..33cb2b1 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -244,7 +244,7 @@ function is_portrange($portrange) { /* returns true if $val is a valid shaper bandwidth value */ function is_valid_shaperbw($val) { - return (preg_match("/^[0-9]+(Kb|Mb|Gb|%)$/", $val)); + return (preg_match("/^(\d+(?:\.\d+)?)([MKG]?b|%)$/", $val)); } /* @@ -574,4 +574,4 @@ function resolve_retry($hostname, $retries = 5) { return false; } -?>
\ No newline at end of file +?> |