diff options
author | Renato Botelho <garga@FreeBSD.org> | 2015-01-16 14:49:12 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-01-16 14:49:12 -0200 |
commit | b9ad208ca95918905a2fcdc53ab0daa7e238023c (patch) | |
tree | 9ba9b6688e3a1396c24d159a8571a47825bc0c00 | |
parent | 0a1f1301faf52c2189bc5532d4e5a87e1a9c3371 (diff) | |
download | pfsense-b9ad208ca95918905a2fcdc53ab0daa7e238023c.zip pfsense-b9ad208ca95918905a2fcdc53ab0daa7e238023c.tar.gz |
Fix some logic mistakes introduced in 89f171b052, spotted by phil-davis
-rw-r--r-- | etc/inc/gwlb.inc | 4 | ||||
-rw-r--r-- | etc/inc/interfaces.inc | 8 |
2 files changed, 4 insertions, 8 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 70acf38..e157e0e 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -989,7 +989,7 @@ function lookup_gateway_interface_by_name($name) { function get_interface_gateway($interface, &$dynamic = false) { global $config, $g; - if (substr($interface, 0, 4) == 'vip') + if (substr($interface, 0, 4) == '_vip') $interface = get_configured_carp_interface_list($interface, 'inet6', 'iface'); $gw = NULL; @@ -1022,7 +1022,7 @@ function get_interface_gateway($interface, &$dynamic = false) { function get_interface_gateway_v6($interface, &$dynamic = false) { global $config, $g; - if (substr($interface, 0, 4) == 'vip') + if (substr($interface, 0, 4) == '_vip') $interface = get_configured_carp_interface_list($interface, 'inet6', 'iface'); $gw = NULL; diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index d1c38c6..63c51a8 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -729,9 +729,7 @@ function interfaces_gre_configure($checkparent = 0, $realif = "") { continue; } else if ($checkparent == 2) { - if (substr($gre['if'], 0, 4) == '_vip') - continue; - if (substr($gre['if'], 0, 5) == '_lloc') + if (substr($gre['if'], 0, 4) != '_vip' && substr($gre['if'], 0, 5) != '_lloc') continue; if (empty($config['interfaces'][$gre['if']]) || $config['interfaces'][$gre['if']]['ipaddrv6'] != "track6") continue; @@ -814,9 +812,7 @@ function interfaces_gif_configure($checkparent = 0, $realif = "") { continue; } else if ($checkparent == 2) { - if (substr($gif['if'], 0, 4) == '_vip') - continue; - if (substr($gif['if'], 0, 5) == '_lloc') + if (substr($gif['if'], 0, 4) != '_vip' && substr($gif['if'], 0, 5) == '_lloc') continue; if (empty($config['interfaces'][$gif['if']]) || $config['interfaces'][$gif['if']]['ipaddrv6'] != "track6") continue; |