diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-01-15 03:33:18 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-01-15 03:33:18 +0000 |
commit | 767a716ecd96105621e239633c04651a02bd8fb8 (patch) | |
tree | a9455173dba67b71599f611cb3eebb6aaa584745 /etc/inc/util.inc | |
parent | 3e789a8b1385cbd0ccc952b7eac5e1e01ff1a478 (diff) | |
download | pfsense-767a716ecd96105621e239633c04651a02bd8fb8.zip pfsense-767a716ecd96105621e239633c04651a02bd8fb8.tar.gz |
Correct warnings and errors found eclipse
Diffstat (limited to 'etc/inc/util.inc')
-rw-r--r-- | etc/inc/util.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index 14ead40..4235adf 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -273,6 +273,7 @@ function get_interface_list($mode = "active", $keyby = "physical", $vfaces = "") break; case "media": $intlist = explode(" ", trim(shell_exec("/sbin/ifconfig -l"))); + $ifconfig = ""; exec("/sbin/ifconfig -a", $ifconfig); $regexp = '/(' . implode('|', $intlist) . '):\s/'; $ifstatus = preg_grep('/status:/', $ifconfig); @@ -283,9 +284,11 @@ function get_interface_list($mode = "active", $keyby = "physical", $vfaces = "") break; } /* build interface list with netstat */ + $linkinfo = ""; exec("/usr/bin/netstat -inW -f link | awk '{ print $1, $4 }'", $linkinfo); array_shift($linkinfo); /* build ip address list with netstat */ + $ipinfo = ""; exec("/usr/bin/netstat -inW -f inet | awk '{ print $1, $4 }'", $ipinfo); array_shift($ipinfo); foreach($linkinfo as $link) { @@ -330,7 +333,8 @@ function get_interface_list($mode = "active", $keyby = "physical", $vfaces = "") function mwexec($command) { global $g; - + $oarr = ""; + $retval = ""; if ($g['debug']) { if (!$_SERVER['REMOTE_ADDR']) echo "mwexec(): $command\n"; @@ -490,6 +494,7 @@ function verify_digital_signature($fname) { /* obtain MAC address given an IP address by looking at the ARP table */ function arp_get_mac_by_ip($ip) { mwexec("/sbin/ping -c 1 -t 1 {$ip}"); + $arpoutput = ""; exec("/usr/sbin/arp -n {$ip}", $arpoutput); if ($arpoutput[0]) { |