summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-04-01 09:41:01 +0200
committersmos <seth.mos@dds.nl>2012-04-01 09:41:01 +0200
commita11a839d6e132bef65a03a2520fe389b5199f9b9 (patch)
tree45365b40e337d2defe3b4d517a0a5dceca9aff7a /etc
parent20a7cb157425395035300b1047d2d3f0a10efaed (diff)
downloadpfsense-a11a839d6e132bef65a03a2520fe389b5199f9b9.zip
pfsense-a11a839d6e132bef65a03a2520fe389b5199f9b9.tar.gz
Add the stf0 interface to interface_has_gateway_v6() for 6to4
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/gwlb.inc14
-rw-r--r--etc/inc/interfaces.inc9
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;
}
}
OpenPOWER on IntegriCloud