mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
Routing, gateways. ditch lookup_gateway_ip_by_name() usage from system_resolvconf_generate() in system.inc, for https://github.com/opnsense/core/issues/2279
This commit is contained in:
parent
a6340f8032
commit
bb1f0151d6
@ -185,13 +185,14 @@ function system_resolvconf_generate($verbose = false)
|
||||
chmod('/etc/resolv.conf', 0644);
|
||||
|
||||
/* setup static routes for DNS servers. */
|
||||
$gateways = new \OPNsense\Routing\Gateways(legacy_interfaces_details());
|
||||
for ($dnscounter = 1; $dnscounter < 9; $dnscounter++) {
|
||||
/* setup static routes for dns servers */
|
||||
$dnsgw = "dns{$dnscounter}gw";
|
||||
if (isset($syscfg[$dnsgw])) {
|
||||
$gwname = $syscfg[$dnsgw];
|
||||
if (($gwname != '') && ($gwname != 'none')) {
|
||||
$gatewayip = lookup_gateway_ip_by_name($gwname);
|
||||
$gatewayip = $gateways->getAddress($gwname);
|
||||
if (is_ipaddrv4($gatewayip)) {
|
||||
/* dns server array starts at 0 */
|
||||
$dnscountermo = $dnscounter - 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user