mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-23 01:40:40 +02:00
dns: don't update error when writing private resolv.conf
When update_dns() fails, callers expect 'error' argument to point to a
non-NULL error; but we are reusing the same variable when calling
update_resolv_conf() to update the private resolv.conf and thus the
function may return an empty error on failure.
Don't reuse the same error and pass a NULL argument instead, since we
don't care about errors when updating private resolv.conf.
Fixes: 5f9d348c20
This commit is contained in:
parent
045938074d
commit
8e46a737db
1 changed files with 2 additions and 4 deletions
|
|
@ -897,10 +897,8 @@ update_dns (NMDnsManager *self,
|
|||
|
||||
/* Unless we've already done it, update private resolv.conf in NMRUNDIR
|
||||
ignoring any errors */
|
||||
if (!(update && priv->rc_manager == NM_DNS_MANAGER_RESOLV_CONF_MAN_NONE)) {
|
||||
g_clear_error (error);
|
||||
update_resolv_conf (searches, nameservers, options, error, FALSE);
|
||||
}
|
||||
if (!(update && priv->rc_manager == NM_DNS_MANAGER_RESOLV_CONF_MAN_NONE))
|
||||
update_resolv_conf (searches, nameservers, options, NULL, FALSE);
|
||||
|
||||
/* signal that resolv.conf was changed */
|
||||
if (update && success)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue