Dnsmasq caches negative results if it starts before the network is up
Bug #1172467 reported by
Jérôme Poulin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dnsmasq (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Since NetworkManager uses dnsmasq to resolve its DNS names, it sometimes enables the system to use dnsmasq before the network connection has been successfully established. This causes dnsmasq to try and fail to resolve some hostnames, it then caches them to its negative DNS cache.
To prevent this from happening I had to add no-negcache to /etc/dnsmasq.
Should this be the default? I don't think any endpoint user benefits from negative DNS cache, not even network admins as the DNS system is robust enough to handle those.
affects: | ubuntu → network-manager (Ubuntu) |
affects: | network-manager (Ubuntu) → dnsmasq (Ubuntu) |
summary: |
- NetworkManager uses dnsmasq with negative DNS cache enabled + Dnsmasq caches negative results if it starts before the network is up |
To post a comment you must log in.
NetworkManager starts dnsmasq with caching completely disabled so that seems unlikely to be a problem with the NM spawned dnsmasq.
However the fact that adding the setting to /etc/dnsmasq. d/network- manager fixed it for you, shows that you're not using NetworkManager's dnsmasq but a system dnsmasq instead.
Can you confirm that you have the "dnsmasq" package installed and not only "dnsmasq-base"?
If so, then that bug is invalid as when you install "dnsmasq" on your system, that'll bypass NetworkManager's own instance and so will run with the default dnsmasq settings (including caching).