diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/gwlb.inc | 14 | ||||
-rw-r--r-- | etc/inc/interfaces.inc | 9 |
2 files changed, 18 insertions, 5 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 2956e5d..6e46592 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -344,8 +344,14 @@ function return_gateways_array($disabled = false) { * Some interface like wan might be default but have no info recorded * the config. if ($gateway['friendlyiface'] == "wan" && !isset($gateway['defaultgw'])) { - if (file_exists("{$g['tmp_path']}/{$gateway['interface']}_defaultgw")) + if (file_exists("{$g['tmp_path']}/{$gateway['interface']}_defaultgw")) { $gateway['defaultgw'] = true; + $gateway['ipprotocol'] = "inet"; + } + if (file_exists("{$g['tmp_path']}/{$gateway['interface']}_defaultgwv6")) + $gateway['defaultgwv6'] = true; + $gateway['ipprotocol'] = "inet6"; + } } */ /* include the gateway index as the attribute */ @@ -417,16 +423,20 @@ function return_gateways_array($disabled = false) { if(!empty($ifcfg['ipaddrv6']) && is_ipaddrv6($ifcfg['ipaddrv6'])) continue; + echo "process if $ifname for v6 gateway\n"; $gateway = array(); $gateway['dynamic'] = false; $gateway['ipprotocol'] = "inet6"; $gateway['gateway'] = get_interface_gateway_v6($ifname, $gateway['dynamic']); /* XXX Add stf and friends in the future ? */ switch($ifcfg['ipaddrv6']) { + case "6to4": + $gateway['interface'] = "stf0"; + $gateway['dynamic'] = "default"; + break; case "6rd": $gateway['interface'] = "srd0"; $gateway['dynamic'] = "default"; - $gateway['gateway'] = "::1"; break; default: $gateway['interface'] = get_real_interface($ifname); diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index b28c2da..ca18930 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -4315,16 +4315,19 @@ function interface_has_gatewayv6($friendly) { switch ($ifname['ipaddrv6']) { case "dhcp6": return true; - break; + break; + case "6to4": + return true; + break; case "6rd": return true; - break; + break; default: if (substr($ifname['if'], 0, 5) == "ovpnc") return true; if (!empty($ifname['gatewayv6'])) return true; - break; + break; } } |