summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-09-20 13:11:48 +0000
committerErmal Luçi <eri@pfsense.org>2008-09-20 13:11:48 +0000
commit7f04301d11b27b3071ed81c8cd6be4813af3b15c (patch)
treed5b2f70f02c3baf9c6d98642e63fbac4f6657acc /etc/inc
parent30c1b51e4794b0c0d048e4bf52bafa0bc8ec5f8c (diff)
downloadpfsense-7f04301d11b27b3071ed81c8cd6be4813af3b15c.zip
pfsense-7f04301d11b27b3071ed81c8cd6be4813af3b15c.tar.gz
Remove unrelated code from function. Add some style(9) to code so readability is improved.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/pfsense-utils.inc9
1 files changed, 4 insertions, 5 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 49ce3a6..1b95667 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1392,10 +1392,6 @@ function does_interface_exist($interface) {
$ints = get_interface_arr();
- if(strtolower($interface) == "lan")
- if(!$config['interfaces']['lan'])
- return false;
-
if(stristr($ints, $interface) !== false)
return true;
else
@@ -1416,8 +1412,11 @@ function convert_ip_to_network_format($ip, $subnet) {
*/
function find_interface_ip($interface, $flush = false) {
global $interface_ip_arr_cache;
+
$interface = str_replace("\n", "", $interface);
- if(does_interface_exist($interface) == false) return;
+ if(does_interface_exist($interface) == false)
+ return;
+
/* Setup IP cache */
if (!isset($interface_ip_arr_cache[$interface]) or $flush) {
$interface_ip_arr_cache[$interface] = exec_command("/sbin/ifconfig {$interface} | /usr/bin/grep -w \"inet\" | /usr/bin/cut -d\" \" -f 2| /usr/bin/head -1");
OpenPOWER on IntegriCloud