mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-29 04:10:31 +01:00
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:
parent
2835934244
commit
a94fb97763
1 changed files with 7 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue