summaryrefslogtreecommitdiffstats
path: root/etc/inc/gwlb.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r--etc/inc/gwlb.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index 53e69eb..70acf38 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -989,8 +989,10 @@ function lookup_gateway_interface_by_name($name) {
function get_interface_gateway($interface, &$dynamic = false) {
global $config, $g;
- $gw = NULL;
+ if (substr($interface, 0, 4) == 'vip')
+ $interface = get_configured_carp_interface_list($interface, 'inet6', 'iface');
+ $gw = NULL;
$gwcfg = $config['interfaces'][$interface];
if (!empty($gwcfg['gateway']) && is_array($config['gateways']['gateway_item'])) {
foreach($config['gateways']['gateway_item'] as $gateway) {
@@ -1020,6 +1022,9 @@ function get_interface_gateway($interface, &$dynamic = false) {
function get_interface_gateway_v6($interface, &$dynamic = false) {
global $config, $g;
+ if (substr($interface, 0, 4) == 'vip')
+ $interface = get_configured_carp_interface_list($interface, 'inet6', 'iface');
+
$gw = NULL;
$gwcfg = $config['interfaces'][$interface];
if (!empty($gwcfg['gatewayv6']) && is_array($config['gateways']['gateway_item'])) {
OpenPOWER on IntegriCloud