mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fix linking interface to vlans function so it works correctly.
This commit is contained in:
parent
8478693681
commit
930595154c
@ -520,7 +520,7 @@ function get_interface_gateway($interface, &$dynamic = false) {
|
||||
$gw = lookup_gateway_ip_by_name($gwcfg['gateway']);
|
||||
|
||||
// for dynamic interfaces we handle them through the $interface_router file.
|
||||
if (!is_ipaddr($gw)) {
|
||||
if (!is_ipaddr($gw) && !is_ipaddr($gwcfg['ipaddr'])) {
|
||||
$realif = get_real_interface($interface);
|
||||
if (file_exists("{$g['tmp_path']}/{$realif}_router")) {
|
||||
$gw = file_get_contents("{$g['tmp_path']}/{$realif}_router");
|
||||
|
||||
@ -2584,7 +2584,7 @@ function link_interface_to_vlans($int, $action = "") {
|
||||
$real_if = get_real_interface($int);
|
||||
if (is_array($config['vlans']['vlan'])) {
|
||||
foreach ($config['vlans']['vlan'] as $vlan) {
|
||||
if ($real_int == $vlan['if']) {
|
||||
if ($real_if == $vlan['if']) {
|
||||
if ($action == "update") {
|
||||
foreach ($config['interfaces'] as $ifname => $ifcfg) {
|
||||
if ($ifcfg['if'] == $vlan['vlanif'])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user