two small resolved fixups (#41337)
This commit is contained in:
@@ -72,7 +72,8 @@ void etc_hosts_clear(EtcHosts *hosts) {
|
||||
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;
|
||||
/* NB: We do not reset m->etc_hosts_last here, because manager_etc_hosts_read() calls us and needs it
|
||||
* to stay in effect for the reload suppression to work */
|
||||
}
|
||||
|
||||
static int parse_line(EtcHosts *hosts, unsigned nr, const char *line) {
|
||||
|
||||
@@ -664,6 +664,9 @@ static int manager_dispatch_reload_signal(sd_event_source *s, const struct signa
|
||||
manager_etc_hosts_flush(m);
|
||||
manager_static_records_flush(m);
|
||||
|
||||
m->etc_hosts_last = USEC_INFINITY;
|
||||
m->static_records_last = USEC_INFINITY;
|
||||
|
||||
manager_set_defaults(m);
|
||||
|
||||
r = dns_trust_anchor_load(&m->trust_anchor);
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
* serializations of DNS RRs. Also note the semantics are different from DNS zone file format, for example
|
||||
* regarding delegation (i.e. the RRs defined here have no effect on subdomains), which is probably nicer for
|
||||
* one-off mappings of domains to specific resources. Or in other words, this is supposed to be a drop-in
|
||||
* based alternative to /etc/hosts, not a one to DNS zone files. (The JSON format is also a lot more
|
||||
* based alternative to /etc/hosts, not one to DNS zone files. (The JSON format is also a lot more
|
||||
* extensible to us, for example we could teach it to map certain lookups to specific DNS errors, or extend
|
||||
* it so that subdomains always get NXDOMAIN or similar).
|
||||
*
|
||||
@@ -222,5 +222,4 @@ void manager_static_records_flush(Manager *m) {
|
||||
|
||||
m->static_records = hashmap_free(m->static_records);
|
||||
m->static_records_stat = set_free(m->static_records_stat);
|
||||
m->static_records_last = USEC_INFINITY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user