summaryrefslogtreecommitdiffstats
path: root/etc/inc/gwlb.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-03-18 14:55:26 +0000
committerErmal <eri@pfsense.org>2013-03-18 14:55:26 +0000
commit909de4007e44529095aee760645918a6da12c9f7 (patch)
treeec5d23bfc940acb0d597ac6ccb4bffdb079b179c /etc/inc/gwlb.inc
parent6e46ff8670c352249f8c83c0f46723edfeb3a731 (diff)
downloadpfsense-909de4007e44529095aee760645918a6da12c9f7.zip
pfsense-909de4007e44529095aee760645918a6da12c9f7.tar.gz
Try to remove as much as possible _stf special case through the code
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r--etc/inc/gwlb.inc26
1 files changed, 5 insertions, 21 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index a8373a8..112d0f6 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -429,20 +429,10 @@ function return_gateways_array($disabled = false, $localhost = false) {
$gateway['friendlyiface'] = $gateway['interface'];
/* special treatment for tunnel interfaces */
- if($gateway['ipprotocol'] == "inet6") {
- switch($wancfg['ipaddrv6']) {
- case "6rd":
- case "6to4":
- $gateway['interface'] = "{$gateway['interface']}_stf";
- break;
- default:
- $gateway['interface'] = get_real_interface($gateway['interface']);
- break;
- }
- }
- if($gateway['ipprotocol'] == "inet") {
+ if ($gateway['ipprotocol'] == "inet6")
+ $gateway['interface'] = get_real_interface($gateway['interface'], "inet6");
+ else if ($gateway['ipprotocol'] == "inet")
$gateway['interface'] = get_real_interface($gateway['interface']);
- }
/* entry has a default flag, use it */
if (isset($gateway['defaultgw'])) {
@@ -584,18 +574,12 @@ function return_gateways_array($disabled = false, $localhost = false) {
$gateway['dynamic'] = false;
$gateway['ipprotocol'] = "inet6";
$gateway['gateway'] = get_interface_gateway_v6($ifname, $gateway['dynamic']);
+ $gateway['interface'] = get_real_interface($ifname, "inet6");
switch($ifcfg['ipaddrv6']) {
- case "6to4":
- $gateway['interface'] = "{$ifname}_stf";
- $gateway['dynamic'] = "default";
- break;
case "6rd":
- $gateway['interface'] = "{$ifname}_stf";
+ case "6to4":
$gateway['dynamic'] = "default";
break;
- default:
- $gateway['interface'] = get_real_interface($ifname);
- break;
}
$gateway['friendlyiface'] = $ifname;
$gateway['name'] = "{$friendly}{$ctype}";
OpenPOWER on IntegriCloud