mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 23:00:19 +01:00
dns: kill pending dnsmasq process when mode is not 'dnsmasq'
When NM starts, if `main.dns` is not `dnsmasq`, then the pending dnsmasq process should be killed by NM. https://bugzilla.redhat.com/show_bug.cgi?id=2120763 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1344
This commit is contained in:
parent
9b3a96f821
commit
6058445aea
3 changed files with 13 additions and 0 deletions
|
|
@ -668,6 +668,14 @@ _gl_pid_spawn(const char *dm_binary,
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
void
|
||||
nm_dnsmasq_kill_external(void)
|
||||
{
|
||||
_gl_pid_kill_external();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
typedef struct {
|
||||
GDBusConnection *dbus_connection;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,4 +25,6 @@ GType nm_dns_dnsmasq_get_type(void);
|
|||
|
||||
NMDnsPlugin *nm_dns_dnsmasq_new(void);
|
||||
|
||||
void nm_dnsmasq_kill_external(void);
|
||||
|
||||
#endif /* __NETWORKMANAGER_DNS_DNSMASQ_H__ */
|
||||
|
|
|
|||
|
|
@ -2506,6 +2506,9 @@ again:
|
|||
self);
|
||||
}
|
||||
|
||||
if (!NM_IS_DNS_DNSMASQ(priv->plugin))
|
||||
nm_dnsmasq_kill_external();
|
||||
|
||||
_update_pending_maybe_changed(self);
|
||||
|
||||
g_object_thaw_notify(G_OBJECT(self));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue