diff options
-rw-r--r-- | etc/inc/captiveportal.inc | 7 | ||||
-rw-r--r-- | etc/inc/filter.inc | 2 | ||||
-rw-r--r-- | etc/inc/interfaces.inc | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index ae5386d..9aaa2b1 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -953,6 +953,8 @@ function captiveportal_write_elements() { function get_next_ipfw_ruleno($rulenos_start = 10000, $rulenos_range_max = 9899) { + $fwrules = ""; + $matches = ""; exec("/sbin/ipfw show", $fwrules); foreach ($fwrules as $fwrule) { preg_match("/^(\d+)\s+/", $fwrule, $matches); @@ -978,6 +980,8 @@ function get_next_ipfw_ruleno($rulenos_start = 10000, $rulenos_range_max = 9899) function captiveportal_get_next_ipfw_ruleno($rulenos_start = 10000, $rulenos_range_max = 9899) { + $fwrules = ""; + $matches = ""; exec("/sbin/ipfw show", $fwrules); foreach ($fwrules as $fwrule) { preg_match("/^(\d+)\s+/", $fwrule, $matches); @@ -1014,6 +1018,8 @@ function getVolume($ruleno) { $volume['input_pkts'] = $volume['input_bytes'] = $volume['output_pkts'] = $volume['output_bytes'] = 0 ; // Ingress + $ipfw = ""; + $matches = ""; exec("/sbin/ipfw show {$ruleno}", $ipfw); preg_match("/(\d+)\s+(\d+)\s+(\d+)\s+.*/", $ipfw[0], $matches); $volume['input_pkts'] = $matches[2]; @@ -1037,6 +1043,7 @@ function getVolume($ruleno) { */ function getNasID() { + $nasId = ""; exec("/bin/hostname", $nasId); if(!$nasId[0]) $nasId[0] = "pfSense"; diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 5213a25..2030de2 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -783,6 +783,7 @@ function filter_nat_rules_generate() { update_filter_reload_status("Creating NAT rule {$rule['descr']}"); /* if item is an alias, expand */ + $extport = ""; unset($extport); if(alias_expand($rule['external-port'])) $extport[0] = alias_expand_value($rule['external-port']); @@ -1253,6 +1254,7 @@ function generate_user_filter_rule($rule, $ngcounter) { if ($rule['source']['network'] && strstr($rule['source']['network'], "opt")) { if (!array_key_exists($rule['source']['network'], $optcfg)) { + $optmatch = ""; if(preg_match("/opt([0-999])/", $rule['source']['network'], $optmatch)) { $real_opt_int = convert_friendly_interface_to_real_interface_name("opt" . $optmatch[1]); $opt_ip = find_interface_ip($real_opt_int); diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 6ec1e29..cf8b7c9 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1594,6 +1594,7 @@ function get_wireless_modes($interface) function get_interface_mac($interface) { /* build interface list with netstat */ + $linkinfo = ""; exec("/usr/bin/netstat -I $interface -nW -f link", $linkinfo); array_shift($linkinfo); $alink = preg_split("/\s+/", $linkinfo[0]); |