mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-16 07:28:27 +02:00
dnsmasq: allow custom configuration via files in /etc/NetworkManager/dnsmasq.d (bgo #679628)
We don't use the default dnsmasq directory because packages often drop files there that don't take account of NM's specific use-case and end up conflicting with the specific local caching nameserver functionality that NM uses dnsmasq for. NM's private dnsmasq is orthogonal to whatever global dnsmasq daemon may be running, and with that daemons configuration. (dcbw: change directory to private one)
This commit is contained in:
parent
e0e804b30b
commit
ac152ece02
2 changed files with 6 additions and 3 deletions
|
|
@ -25,7 +25,8 @@ libdns_manager_la_CPPFLAGS = \
|
|||
$(LIBNL_CFLAGS) \
|
||||
$(DBUS_CFLAGS) \
|
||||
$(GLIB_CFLAGS) \
|
||||
-DLOCALSTATEDIR=\"$(localstatedir)\"
|
||||
-DLOCALSTATEDIR=\"$(localstatedir)\" \
|
||||
-DSYSCONFDIR=\"$(sysconfdir)\"
|
||||
|
||||
libdns_manager_la_LIBADD = \
|
||||
$(top_builddir)/src/logging/libnm-logging.la \
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ G_DEFINE_TYPE (NMDnsDnsmasq, nm_dns_dnsmasq, NM_TYPE_DNS_PLUGIN)
|
|||
|
||||
#define PIDFILE LOCALSTATEDIR "/run/nm-dns-dnsmasq.pid"
|
||||
#define CONFFILE LOCALSTATEDIR "/run/nm-dns-dnsmasq.conf"
|
||||
#define CONFDIR SYSCONFDIR "/NetworkManager/dnsmasq.d"
|
||||
|
||||
typedef struct {
|
||||
guint32 foo;
|
||||
|
|
@ -246,7 +247,7 @@ update (NMDnsPlugin *plugin,
|
|||
NMDnsDnsmasq *self = NM_DNS_DNSMASQ (plugin);
|
||||
GString *conf;
|
||||
GSList *iter;
|
||||
const char *argv[11];
|
||||
const char *argv[12];
|
||||
GError *error = NULL;
|
||||
int ignored;
|
||||
GPid pid = 0;
|
||||
|
|
@ -309,7 +310,8 @@ update (NMDnsPlugin *plugin,
|
|||
argv[7] = "--conf-file=" CONFFILE;
|
||||
argv[8] = "--cache-size=400";
|
||||
argv[9] = "--proxy-dnssec"; /* Allow DNSSEC to pass through */
|
||||
argv[10] = NULL;
|
||||
argv[10] = "--conf-dir=" CONFDIR;
|
||||
argv[11] = NULL;
|
||||
|
||||
/* And finally spawn dnsmasq */
|
||||
pid = nm_dns_plugin_child_spawn (NM_DNS_PLUGIN (self), argv, PIDFILE, "bin/dnsmasq");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue