diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2019-01-11 15:39:51 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2019-01-14 10:02:48 +0100 |
commit | e45636659b62ad8f19a03567269ea89e1252c9e3 (patch) | |
tree | 3f34ffa4740f58a5fa193ea932ad2a8f0e88d164 | |
parent | f2a201273307129b394d9b0bb9b58bec61f99d98 (diff) | |
download | NetworkManager-bg/dns-child-restart-issue105.tar.gz |
dns: fail the plugin when the rate limiter hitsbg/dns-child-restart-issue105
If the child is respawning too fast, consider the plugin failed so
that upstream servers are written to resolv.conf until the plugin gets
restarted after the delay.
-rw-r--r-- | src/dns/nm-dns-manager.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dns/nm-dns-manager.c b/src/dns/nm-dns-manager.c index 1f1fe21317..2a30a5407b 100644 --- a/src/dns/nm-dns-manager.c +++ b/src/dns/nm-dns-manager.c @@ -1608,6 +1608,7 @@ plugin_child_quit (NMDnsPlugin *plugin, int exit_status, gpointer user_data) } else { priv->plugin_ratelimit.num_restarts++; if (priv->plugin_ratelimit.num_restarts > PLUGIN_RATELIMIT_BURST) { + plugin_failed (plugin, self); _LOGW ("plugin %s child respawning too fast, delaying update for %u seconds", nm_dns_plugin_get_name (plugin), PLUGIN_RATELIMIT_DELAY); priv->plugin_ratelimit.timer = g_timeout_add_seconds (PLUGIN_RATELIMIT_DELAY, |