summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@dds.nl>2011-03-06 20:44:18 +0100
committerSeth Mos <seth.mos@dds.nl>2011-03-06 20:44:18 +0100
commit283e918079536f7f5fda6cb4866fd82f4ec4421e (patch)
tree89b65fc703b5e4c7758ef83973f59fbb9b18a916 /etc/inc
parentde1407305813f8ea41a62775a023a4b70cb9f7da (diff)
downloadpfsense-283e918079536f7f5fda6cb4866fd82f4ec4421e.zip
pfsense-283e918079536f7f5fda6cb4866fd82f4ec4421e.tar.gz
More fixes to differentiate between v4 and v6 gateways on the same interface.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/interfaces.inc11
1 files changed, 9 insertions, 2 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index be86bac..3405838 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -735,7 +735,10 @@ function interface_gre_configure(&$gre, $grekey = "") {
if (isset($gre['link1']) && $gre['link1'])
mwexec("/sbin/route add {$gre['tunnel-remote-addr']}/{$gre['tunnel-remote-net']} {$gre['tunnel-local-addr']}");
- file_put_contents("{$g['tmp_path']}/{$greif}_router", $gre['tunnel-remote-addr']);
+ if(is_ipaddrv4($gre['tunnel-remote-addr']))
+ file_put_contents("{$g['tmp_path']}/{$greif}_router", $gre['tunnel-remote-addr']);
+ if(is_ipaddrv6($gre['tunnel-remote-addr']))
+ file_put_contents("{$g['tmp_path']}/{$greif}_routerv6", $gre['tunnel-remote-addr']);
return $greif;
}
@@ -794,7 +797,11 @@ function interface_gif_configure(&$gif, $gifkey = "") {
/* XXX: Needed?! Let them use the defined gateways instead */
//mwexec("/sbin/route add {$gif['tunnel-remote-addr']}/{$gif['tunnel-remote-net']} -iface {$gifif}");
- file_put_contents("{$g['tmp_path']}/{$gifif}_router", $gif['tunnel-remote-addr']);
+
+ if(is_ipaddrv4($gif['tunnel-remote-addr']))
+ file_put_contents("{$g['tmp_path']}/{$gifif}_router", $gif['tunnel-remote-addr']);
+ if(is_ipaddrv6($gif['tunnel-remote-addr']))
+ file_put_contents("{$g['tmp_path']}/{$gifif}_routerv6", $gif['tunnel-remote-addr']);
return $gifif;
}
OpenPOWER on IntegriCloud