diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2011-01-25 13:00:32 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2011-01-25 13:00:32 -0500 |
commit | 8b73cc7ee50b918c83b32ea3d664baf86d30692b (patch) | |
tree | 6d41c575c0d8404afc670abbe96d54ef857111c0 /etc/inc | |
parent | 0b108edab3c0fef7a1405142c6edfc0c505a82f4 (diff) | |
download | pfsense-8b73cc7ee50b918c83b32ea3d664baf86d30692b.zip pfsense-8b73cc7ee50b918c83b32ea3d664baf86d30692b.tar.gz |
Allowed hostname is now working. Make bw up and down checks a bit more strict using intval() and comparing >0. Fix bw and upload checks allowing either to be set.
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/captiveportal.inc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index ac36407..08e325d 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -979,9 +979,13 @@ function captiveportal_passthrumac_findbyname($username) { */ function captiveportal_allowedip_configure_entry($ipent) { + /* This function can deal with hostname or ipaddress */ if($ipent['ip']) $ipaddress = $ipent['ip']; + /* Instead of copying this entire function for something + * easy such as hostname vs ip address add this check + */ if($ipent['hostname']) { $ipaddress = gethostbyname($ipent['hostname']); if(!is_ipaddr($ipaddress)) @@ -996,7 +1000,7 @@ function captiveportal_allowedip_configure_entry($ipent) { $tablein = array(); $tableout = array(); - if ($enBwup or $enBwdown) + if (intval($enBwup) > 0 or intval($enBwdown) > 0) $ruleno = captiveportal_get_next_ipfw_ruleno(2000, 49899, true); else $ruleno = captiveportal_get_next_ipfw_ruleno(2000, 49899, false); |