From 930595154ccc8702befdd880f1c424b78040af2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=E7i?= Date: Tue, 23 Feb 2010 22:34:39 +0000 Subject: [PATCH] Fix linking interface to vlans function so it works correctly. --- etc/inc/gwlb.inc | 2 +- etc/inc/interfaces.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 3cb47270f5..d27e0ec366 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -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"); diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 9941a564bf..767a9e2b48 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -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'])