From 2eabec274f098d8aa0d91d63ff8320283b3b6da2 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Thu, 14 Feb 2019 10:29:45 +0100 Subject: [PATCH] temp fix for https://github.com/opnsense/core/issues/3222, partly revert https://github.com/opnsense/core/commit/adf314a4ab172d69a76f8d9fd78ed3ad8c30c698 --- src/etc/inc/interfaces.inc | 6 +++--- src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index f9afcbcfb..bcfc6d673 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -2729,7 +2729,7 @@ function interface_6rd_configure($interface = 'wan', $wancfg) $rd6brgw = "{$rd6prefix}{$wancfg['gateway-6rd']}"; - $stfiface = "{$wanif}_stf"; + $stfiface = "{$interface}_stf"; if (does_interface_exist($stfiface)) { legacy_interface_destroy($stfiface); } @@ -2825,7 +2825,7 @@ function interface_6to4_configure($interface = 'wan', $wancfg) } $stflan = Net_IPv6::compress(implode(":", $stflanarr)); - $stfiface = "{$wanif}_stf"; + $stfiface = "{$interface}_stf"; if (does_interface_exist($stfiface)) { legacy_interface_destroy($stfiface); } @@ -3656,7 +3656,7 @@ function get_real_interface($interface = 'wan', $family = 'all') switch (isset($cfg['ipaddrv6']) ? $cfg['ipaddrv6'] : '') { case '6rd': case '6to4': - $wanif = "{$cfg['if']}_stf"; + $wanif = "{$interface}_stf"; break; case 'pppoe': case 'ppp': diff --git a/src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php b/src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php index 33d8755d9..83c594c27 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php +++ b/src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php @@ -80,7 +80,7 @@ class Plugin // generate virtual IPv6 interfaces foreach ($this->interfaceMapping as $key => &$intf) { if (!empty($intf['ipaddrv6']) && ($intf['ipaddrv6'] == '6rd' || $intf['ipaddrv6'] == '6to4')) { - $realif = "{$intf['if']}_stf"; + $realif = "{$key}_stf"; // create new interface $this->interfaceMapping[$realif] = array(); $this->interfaceMapping[$realif]['ifconfig']['ipv6'] = $intf['ifconfig']['ipv6'];