mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fixes #3484. Provide a dynamic gateway for gif v6 tunnels so it can be used on firewall rules etc. The guide for setting up this tunnels on docs need to change to leave the gif interface as none type. People upgrading need to fix this themselves with a not on release notes. This can be fixed if the kernel condition is relaxed to allow setting the prefixlen on the tunnel as ipv4
This commit is contained in:
parent
95281343a4
commit
ddb30ebfc6
@ -555,6 +555,8 @@ function return_gateways_array($disabled = false, $localhost = false) {
|
||||
default:
|
||||
if (substr($ifcfg['if'], 0, 4) == "ovpn")
|
||||
$ctype = "VPNv6";
|
||||
else if (substr($ifcfg['if'], 0, 3) == "gif")
|
||||
$ctype = "TUNNELv6";
|
||||
break;
|
||||
}
|
||||
$ctype = "_". strtoupper($ctype);
|
||||
@ -879,7 +881,7 @@ function get_interface_gateway($interface, &$dynamic = false) {
|
||||
if (!is_ipaddrv4($gw) && !is_ipaddrv4($gwcfg['ipaddr'])) {
|
||||
$realif = get_real_interface($interface);
|
||||
if (file_exists("{$g['tmp_path']}/{$realif}_router")) {
|
||||
$gw = trim(file_get_contents("{$g['tmp_path']}/{$realif}_router"), " \n");
|
||||
$gw = trim(file_get_contents("{$g['tmp_path']}/{$realif}_router"), " \n");
|
||||
$dynamic = true;
|
||||
}
|
||||
if (file_exists("{$g['tmp_path']}/{$realif}_defaultgw"))
|
||||
|
||||
@ -4641,6 +4641,8 @@ function interface_has_gatewayv6($friendly) {
|
||||
default:
|
||||
if (substr($ifname['if'], 0, 4) == "ovpn")
|
||||
return true;
|
||||
if (substr($ifname['if'], 0, 3) == "gif")
|
||||
return true;
|
||||
if (!empty($ifname['gatewayv6']))
|
||||
return true;
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user