summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-03-14 16:20:52 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-03-14 16:20:52 +0000
commita7f5febb4eb941e91a29a8402a8e8fb9607c0a2b (patch)
treea67f8c666eb318600c0f2a57ce34bb08368e550d /etc
parent9c0ad6b18fae2f896bd0fa2d8720c7ab3f2979ce (diff)
downloadpfsense-a7f5febb4eb941e91a29a8402a8e8fb9607c0a2b.zip
pfsense-a7f5febb4eb941e91a29a8402a8e8fb9607c0a2b.tar.gz
Correctly return lan or wan interface.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 7cf48f4..f2e4928 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -515,7 +515,7 @@ function execute_command_return_output($command) {
*/
function convert_friendly_interface_to_real_interface_name($interface) {
global $config;
- $interface = strtolower($interface);
+ $lc_interface = strtolower($interface);
if($config['interfaces'][$interface]['if'] <> "")
return $config['interfaces'][$interface]['if'];
$i = 0;
@@ -524,7 +524,8 @@ function convert_friendly_interface_to_real_interface_name($interface) {
$ifdescrs['opt' . $j] = "opt" . $j;
}
foreach ($ifdescrs as $ifdescr => $ifname) {
- if($config['interfaces'][$ifname]['descr'] == $interface)
+ if($config['interfaces'][$ifname]['descr'] == $lc_interface or
+ $config['interfaces'][$ifname]['descr'] == $interface)
return $config['interfaces'][$ifname]['if'];
}
return $interface;
OpenPOWER on IntegriCloud