summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@G5.local>2009-10-26 01:26:22 -0400
committerScott Ullrich <sullrich@G5.local>2009-10-26 01:26:22 -0400
commit2ebf39457d737bb6e901504a1318538a42b8c083 (patch)
tree52f98905e99f41b4c56b8904cb20671b2e67fbd0
parenta6bce4360cd45149612c3ed2d1ee6407d57115bd (diff)
downloadpfsense-2ebf39457d737bb6e901504a1318538a42b8c083.zip
pfsense-2ebf39457d737bb6e901504a1318538a42b8c083.tar.gz
Check to see if interface exists
-rw-r--r--etc/inc/interfaces.inc10
1 files changed, 6 insertions, 4 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 7dae9a0..023d8e3 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -2297,17 +2297,19 @@ function get_real_interface($interface = "wan") {
$iflist = get_configured_interface_with_descr(false, true);
foreach ($iflist as $if => $ifdesc) {
- if ($interface == $if || $interface == $ifdesc) {
-
// If a real interface was alread passed simply
// pass the real interface back. This encourages
// the usage of this function in more cases so that
// we can combine logic for more flexibility.
if($config['interfaces'][$if]['if'] == $interface) {
- $wanif = $interface;
- break;
+ if(does_interface_exist($interface)) {
+ $wanif = $interface;
+ break;
+ }
}
+ if ($interface == $if || $interface == $ifdesc) {
+
// PPP Support
if($config['interfaces'][$if]['serialport']) {
$dev = $config['interfaces'][$if]['serialport'];
OpenPOWER on IntegriCloud