Project

General

Profile

Actions

Bug #5505

closed

services_dnsmasq.php - Saving does not prompt to Apply, applies automatically, unless an override was edited

Added by Jim Pingle about 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
DNS Forwarder
Target version:
Start date:
11/20/2015
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.3
Affected Architecture:
All

Description

The behavior of saving and applying on services_dnsmasq.php is inconsistent with itself and with the behavior in Unbound. Ideally it should always prompt to apply and then only run the apply action when apply is clicked. This isn't a regression, it's been like this for years but it's a good time to clean it up.

The Save action on the main page should:
  • Mark the "hosts" subsystem dirty so that "Apply" shows up
  • Perform a write_config()

The Apply action should run the following:

            // Reload filter (we might need to sync to CARP hosts)
            filter_configure();
            /* Update resolv.conf in case the interface bindings exclude localhost. */
            system_resolvconf_generate();
            /* Start or restart dhcpleases when it's necessary */
            system_dhcpleases_configure();
            if ($retval == 0) {
                clear_subsystem_dirty('hosts');
            }

Which is currently run during the Save action (and by consequence of how Apply is coded to work on that page, also on Apply)

This will also stop the extra write from happening on "Apply" which is unexpected/unnecessary.

Actions

Also available in: Atom PDF