summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2008-09-02 21:23:01 +0000
committerSeth Mos <seth.mos@xs4all.nl>2008-09-02 21:23:01 +0000
commitbb345bba5f2f751440a0d3c4ad6e474791026426 (patch)
treead412da70ffde7290885b42b8967fdb71cd6e3c3
parenta9d8f977d8384d426e927e44c7574998dcf3ff72 (diff)
downloadpfsense-bb345bba5f2f751440a0d3c4ad6e474791026426.zip
pfsense-bb345bba5f2f751440a0d3c4ad6e474791026426.tar.gz
Make sure that convert_friendly_to_real also works for disabled interfaces.
-rw-r--r--etc/inc/pfsense-utils.inc41
1 files changed, 20 insertions, 21 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 2893354..0ed6db4 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1703,27 +1703,26 @@ function convert_friendly_interface_to_real_interface_name($interface) {
global $config;
$wanif = $interface;
-
switch ($interface) {
- case "pptp":
- $wanif = "pptp";
- break;
- case "pppoe":
- $wanif = "pppoe";
- break;
- case "openvpn":
- $wanif = "openvpn";
- break;
- case "enc0":
- $wanif = "enc0";
- break;
- /* XXX: dial in support?!
- case "ppp":
- $wanif = "ppp";
- break;
- */
- default:
- $iflist = get_configured_interface_with_descr();
+ case "pptp":
+ $wanif = "pptp";
+ break;
+ case "pppoe":
+ $wanif = "pppoe";
+ break;
+ case "openvpn":
+ $wanif = "openvpn";
+ break;
+ case "enc0":
+ $wanif = "enc0";
+ break;
+ /* XXX: dial in support?!
+ case "ppp":
+ $wanif = "ppp";
+ break;
+ */
+ default:
+ $iflist = get_configured_interface_with_descr(false,true);
foreach ($iflist as $if => $ifdesc) {
if ($interface == $if || $interface == $ifdesc) {
@@ -3974,4 +3973,4 @@ function read_body($ch, $string) {
return $length;
}
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud