From 2ebf39457d737bb6e901504a1318538a42b8c083 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 26 Oct 2009 01:26:22 -0400 Subject: Check to see if interface exists --- etc/inc/interfaces.inc | 10 ++++++---- 1 file 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']; -- cgit v1.1