Routing, gateways. temporrary disable adding tunnel endpoints for https://github.com/opnsense/core/issues/2279

This commit is contained in:
Ad Schellevis 2019-04-14 14:36:38 +02:00
parent 7a8b12f030
commit e053087280

View File

@ -225,17 +225,17 @@ class Gateways
}
$gwkey = $this->newKey($thisconf['priority'], !empty($thisconf['defaultgw']));
$this->cached_gateways[$gwkey] = $thisconf;
} elseif (!empty($this->ifconfig[$thisconf["if"]]["tunnel"]["dest_addr"])) {
// tunnel devices with a known endpoint
$thisconf['gateway'] = $this->ifconfig[$thisconf["if"]]["tunnel"]["dest_addr"];
$tunnel_ipproto = strpos($thisconf['gateway'], ":") != false ? "inet6" : "inet";
if ($tunnel_ipproto == $ipproto) {
if (empty($thisconf['monitor_disable']) && empty($thisconf['monitor'])) {
$thisconf['monitor'] = $thisconf['gateway'];
}
$gwkey = $this->newKey($thisconf['priority'], !empty($thisconf['defaultgw']));
$this->cached_gateways[$gwkey] = $thisconf;
}
// } elseif (!empty($this->ifconfig[$thisconf["if"]]["tunnel"]["dest_addr"])) {
// // tunnel devices with a known endpoint
// $thisconf['gateway'] = $this->ifconfig[$thisconf["if"]]["tunnel"]["dest_addr"];
// $tunnel_ipproto = strpos($thisconf['gateway'], ":") != false ? "inet6" : "inet";
// if ($tunnel_ipproto == $ipproto) {
// if (empty($thisconf['monitor_disable']) && empty($thisconf['monitor'])) {
// $thisconf['monitor'] = $thisconf['gateway'];
// }
// $gwkey = $this->newKey($thisconf['priority'], !empty($thisconf['defaultgw']));
// $this->cached_gateways[$gwkey] = $thisconf;
// }
} elseif (self::convertType($ipproto, $ifcfg) != null) {
// other predefined types, only bound by interface (e.g. openvpn)
$gwkey = $this->newKey($thisconf['priority'], !empty($thisconf['defaultgw']));