internal/router/dnsmasq: disable cache

So multiple upstreams config could work properly.
This commit is contained in:
Cuong Manh Le
2023-11-08 23:51:18 +07:00
committed by Cuong Manh Le
parent 4816a09e3a
commit 43ff2f648c
5 changed files with 97 additions and 36 deletions
+10
View File
@@ -65,6 +65,11 @@ func (f *Firewalla) Setup() error {
return fmt.Errorf("writing ctrld config: %w", err)
}
// Disable dnsmasq cache.
if err := dnsmasq.FirewallaDisableCache(); err != nil {
return err
}
// Restart dnsmasq service.
if err := restartDNSMasq(); err != nil {
return fmt.Errorf("restartDNSMasq: %w", err)
@@ -82,6 +87,11 @@ func (f *Firewalla) Cleanup() error {
return fmt.Errorf("removing ctrld config: %w", err)
}
// Enable dnsmasq cache.
if err := dnsmasq.FirewallaEnableCache(); err != nil {
return err
}
// Restart dnsmasq service.
if err := restartDNSMasq(); err != nil {
return fmt.Errorf("restartDNSMasq: %w", err)