manager: also restart stub listner on reload
Previously, the extra stub listners were stopped but new ones were not started. Also, the main stub listners were not restarted, hence the new settings were not applied. This fixes the above two issues. Note, to fix the issue, we need to keep CAP_NET_BIND_SERVICE capability to make it allow to bind stub listner later. Fixes #37843.
This commit is contained in:
@@ -653,6 +653,7 @@ static int manager_dispatch_reload_signal(sd_event_source *s, const struct signa
|
||||
dns_server_unlink_on_reload(m->dns_servers);
|
||||
dns_server_unlink_on_reload(m->fallback_dns_servers);
|
||||
m->dns_extra_stub_listeners = ordered_set_free(m->dns_extra_stub_listeners);
|
||||
manager_dns_stub_stop(m);
|
||||
dnssd_service_clear_on_reload(m->dnssd_services);
|
||||
m->unicast_scope = dns_scope_free(m->unicast_scope);
|
||||
m->delegates = hashmap_free(m->delegates);
|
||||
@@ -691,6 +692,10 @@ static int manager_dispatch_reload_signal(sd_event_source *s, const struct signa
|
||||
manager_flush_caches(m, LOG_INFO);
|
||||
manager_verify_all(m);
|
||||
|
||||
r = manager_dns_stub_start(m);
|
||||
if (r < 0)
|
||||
return sd_event_exit(sd_event_source_get_event(s), r);
|
||||
|
||||
(void) sd_notify(/* unset_environment= */ false, NOTIFY_READY_MESSAGE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user