summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Otavio O Souza <luiz@netgate.com>2016-02-21 13:05:12 -0600
committerLuiz Otavio O Souza <luiz@netgate.com>2016-02-21 16:38:24 -0600
commitc6555b1d9a1ffaa4d7216eb63e10b8a8c7c63df1 (patch)
treef69559b5bc1c4a9214cc19cd3c468580725656ff
parent4a3a45c430bfc797af1db683eebf05b1311ec800 (diff)
downloadpfsense-c6555b1d9a1ffaa4d7216eb63e10b8a8c7c63df1.zip
pfsense-c6555b1d9a1ffaa4d7216eb63e10b8a8c7c63df1.tar.gz
Makes get_real_interface() work with VLAN too.
This makes get_parent_interface() safe to use with VLANs.
-rw-r--r--src/etc/inc/interfaces.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc
index 387065f..3da46c8 100644
--- a/src/etc/inc/interfaces.inc
+++ b/src/etc/inc/interfaces.inc
@@ -4769,7 +4769,8 @@ function get_real_interface($interface = "wan", $family = "all", $realv6iface =
break;
} else if (substr($interface, 0, 5) == '_lloc') {
$interface = substr($interface, 5);
- } else if (does_interface_exist($interface, $flush)) {
+ } else if (strstr($interface, "_vlan") ||
+ does_interface_exist($interface, $flush)) {
/*
* If a real interface was already passed simply
* pass the real interface back. This encourages
OpenPOWER on IntegriCloud