Routing, gateways. make sure we don't return an invalid gateway (property could be set to 'dynamic') in Gateway class, for https://github.com/opnsense/core/issues/2279

This commit is contained in:
Ad Schellevis 2019-04-13 16:35:28 +02:00
parent 0c1f95b9b3
commit 26291b7fcd

View File

@ -239,6 +239,8 @@ class Gateways
} elseif (self::convertType($ipproto, $ifcfg) != null) {
// other predefined types, only bound by interface (e.g. openvpn)
$gwkey = $this->newKey($thisconf['priority'], !empty($thisconf['defaultgw']));
// gateway should only contain a valid address, make sure its empty
unset($thisconf['gateway']);
$this->cached_gateways[$gwkey] = $thisconf;
}
}