dnsmasq + refactoring