When we are told to reload our configuration also flush out /etc/hosts
explicitly. This is particularly relevant since we suppress too frequent
reloads, and hence a synchronous way to force a reload is very useful.
void manager_etc_hosts_flush(Manager *m) {
etc_hosts_clear(&m->etc_hosts);
m->etc_hosts_stat = (struct stat) {};
+ m->etc_hosts_last = USEC_INFINITY;
}
static int parse_line(EtcHosts *hosts, unsigned nr, const char *line) {
m->unicast_scope = dns_scope_free(m->unicast_scope);
m->delegates = hashmap_free(m->delegates);
dns_trust_anchor_flush(&m->trust_anchor);
+ manager_etc_hosts_flush(m);
manager_set_defaults(m);