diff options
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r-- | etc/inc/gwlb.inc | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 1e694cf..e87a7c1 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -877,14 +877,17 @@ function validate_address_family($ipaddr, $gwname) { $v4gw = true; if(is_ipaddrv6(lookup_gateway_ip_by_name($gwname))) $v6gw = true; - /* are they dynamic */ - switch($gwname) { - case "dynamic": - $v4gw = true; - break; - case "dynamic6": - $v6gw = true; - break; + + $gw_array = return_gateways_array(); + if(is_array($gw_array[$gwname])) { + switch($gw_array[$gwname]['ipprotocol']) { + case "inet": + $v4gw = true; + break; + case "inet6": + $v6gw = true; + break; + } } if($v4ip && $v4gw) |