Routing, gateways. replace get_interface_gateway() in interface_6rd_configure() for https://github.com/opnsense/core/issues/2279

This commit is contained in:
Ad Schellevis 2019-04-13 17:16:22 +02:00
parent be85768f6b
commit 2011da3800

View File

@ -2738,7 +2738,8 @@ function interface_6rd_configure($interface = 'wan', $wancfg)
file_put_contents("/tmp/{$stfiface}_routerv6", "{$rd6brgw}\n");
file_put_contents("/tmp/{$stfiface}_defaultgwv6", "{$rd6brgw}\n");
$ip4gateway = get_interface_gateway($interface);
$gateways = new \OPNsense\Routing\Gateways(legacy_interfaces_details());
$ip4gateway = $gateways->getInterfaceGateway($interface, "inet");
if (is_ipaddrv4($ip4gateway)) {
system_host_route($wancfg['gateway-6rd'], $ip4gateway);
}