summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-12-11 17:10:11 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-12-11 17:10:11 +0000
commit84e5047da7fe2dba935ca55604d61542422e9b00 (patch)
tree3f766960310bf5618428278242bec57d9e3022c5
parent161a01bd32c389152de1e1417d7016812a209f1c (diff)
downloadpfsense-84e5047da7fe2dba935ca55604d61542422e9b00.zip
pfsense-84e5047da7fe2dba935ca55604d61542422e9b00.tar.gz
Silence eclipse warnings
-rw-r--r--etc/inc/captiveportal.inc7
-rw-r--r--etc/inc/filter.inc2
-rw-r--r--etc/inc/interfaces.inc1
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]);
OpenPOWER on IntegriCloud