Fix linking interface to vlans function so it works correctly.

This commit is contained in:
Ermal Lui 2010-02-23 22:34:39 +00:00
parent 8478693681
commit 930595154c
2 changed files with 2 additions and 2 deletions

View File

@ -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");

View File

@ -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'])