core: include dnsmasq config files in shared connections

The dnsmasq process started as DHCP and DNS server for shared
connections now accepts additional configuration files at
/etc/NetworkManager/dnsmasq-shared.d/.

https://bugzilla.gnome.org/show_bug.cgi?id=761717
This commit is contained in:
chrysn 2016-02-12 07:53:55 +01:00 committed by Thomas Haller
parent 2835934244
commit a94fb97763

View file

@ -43,6 +43,8 @@ typedef struct {
#define NM_DNSMASQ_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DNSMASQ_MANAGER, NMDnsMasqManagerPrivate))
#define CONFDIR NMCONFDIR "/dnsmasq-shared.d"
G_DEFINE_TYPE (NMDnsMasqManager, nm_dnsmasq_manager, G_TYPE_OBJECT)
enum {
@ -292,6 +294,11 @@ create_dm_cmd_line (const char *iface,
nm_cmd_line_add_string (cmd, s->str);
g_string_free (s, TRUE);
/* dnsmasq exits if the conf dir is not present */
if (g_file_test (CONFDIR, G_FILE_TEST_IS_DIR)) {
nm_cmd_line_add_string (cmd, "--conf-dir=" CONFDIR);
}
return cmd;
}