Routing-gateways: select current IPv6 field in getInterfaceGateway(), closes https://github.com/opnsense/core/issues/4494

This commit is contained in:
Ad Schellevis 2020-12-01 14:12:48 +01:00
parent c02155630e
commit 80d7eb0ea7

View File

@ -410,7 +410,8 @@ class Gateways
}
// The interface might have a gateway configured
if (isset($this->configHandle->interfaces->$interface)) {
$intf_gateway = $this->configHandle->interfaces->$interface->gateway;
$gwfield = $ipproto == "inet" ? "gateway" : "gatewayv6";
$intf_gateway = $this->configHandle->interfaces->$interface->$gwfield;
} else {
$intf_gateway = null;
}