diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-10-18 10:39:32 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-10-18 10:40:15 -0300 |
commit | bae42aaf13bd680f67a9b4f1a4325b03f80f86b4 (patch) | |
tree | 1ce52033f55235b189003117427f32edf99b09d4 /etc | |
parent | dd33fd4e8b3fb66f49ae8337823264ab0d13504c (diff) | |
download | pfsense-bae42aaf13bd680f67a9b4f1a4325b03f80f86b4.zip pfsense-bae42aaf13bd680f67a9b4f1a4325b03f80f86b4.tar.gz |
Make sure vlan interface exist when it's being configured, it fixes #3270
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 3d99dc2..7178a61 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -2803,6 +2803,18 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven // Need code to handle MLPPP if we ever use $realhwif for MLPPP handling $realhwif = $realhwif_array[0]; + if (!does_interface_exist($realif)) { + $matches = array(); + if (preg_match('/^(.*)_vlan([0-9]+)$/', $realif, $matches)) + if (is_array($config['vlans']['vlan'])) + foreach ($config['vlans']['vlan'] as $vlan) + if ($vlan['if'] == $matches[1] && $vlan['tag'] == $matches[2]) { + interface_vlan_configure($vlan); + break; + } + unset($matches); + } + /* Disable Accepting router advertisements unless specifically requested */ if ($g['debug']) log_error("Deny router advertisements for interface {$interface}"); |