mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-08-10 13:20:33 +02:00
internal/router: use max-cache-ttl=0 on some routers
On some routers, dnsmasq config may change cache-size dynamically after ctrld starts, causing dnsmasq crashes. Fixing this by using max-cache-ttl, which have the same effect with setting cache-size=0 but won't conflict with existing routers config.
This commit is contained in:
@@ -65,11 +65,6 @@ 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)
|
||||
@@ -87,11 +82,6 @@ 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)
|
||||
|
||||
Reference in New Issue
Block a user