diff options
| author | Michael Biebl <biebl@debian.org> | 2018-10-20 01:30:31 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-10-20 01:30:31 +0200 |
| commit | 6518e361171f64bcaaa4bf868139362ed95cc2e0 (patch) | |
| tree | d2d5b53faf80646a40ec2c0c7f2a42b3959612f5 /src/dnsmasq | |
| parent | e126f3e804c35480c4f075777430419d6ece23da (diff) | |
New upstream version 1.14.2 upstream/1.14.2
Diffstat (limited to 'src/dnsmasq')
| -rw-r--r-- | src/dnsmasq/nm-dnsmasq-manager.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/dnsmasq/nm-dnsmasq-manager.c b/src/dnsmasq/nm-dnsmasq-manager.c index 041e75ea..09889441 100644 --- a/src/dnsmasq/nm-dnsmasq-manager.c +++ b/src/dnsmasq/nm-dnsmasq-manager.c @@ -104,7 +104,7 @@ nm_cmd_line_to_str (NMCmdLine *cmd) char *str; g_ptr_array_add (cmd->array, NULL); - str = g_strjoinv (" ", (gchar **) cmd->array->pdata); + str = g_strjoinv (" ", (char **) cmd->array->pdata); g_ptr_array_remove_index (cmd->array, cmd->array->len - 1); return str; @@ -119,7 +119,7 @@ nm_cmd_line_add_string (NMCmdLine *cmd, const char *str) /*****************************************************************************/ static void -dm_watch_cb (GPid pid, gint status, gpointer user_data) +dm_watch_cb (GPid pid, int status, gpointer user_data) { NMDnsMasqManager *manager = NM_DNSMASQ_MANAGER (user_data); NMDnsMasqManagerPrivate *priv = NM_DNSMASQ_MANAGER_GET_PRIVATE (manager); @@ -187,7 +187,7 @@ create_dm_cmd_line (const char *iface, * as the gateway or whatever. So tell dnsmasq not to use any config file * at all. */ - nm_cmd_line_add_string (cmd, "--conf-file"); + nm_cmd_line_add_string (cmd, "--conf-file=/dev/null"); nm_cmd_line_add_string (cmd, "--no-hosts"); nm_cmd_line_add_string (cmd, "--keep-in-foreground"); @@ -249,6 +249,11 @@ create_dm_cmd_line (const char *iface, nm_cmd_line_add_string (cmd, "--dhcp-lease-max=50"); + g_string_append (s, "--dhcp-leasefile=" NMSTATEDIR); + g_string_append_printf (s, "/dnsmasq-%s.leases", iface); + nm_cmd_line_add_string (cmd, s->str); + g_string_truncate (s, 0); + g_string_append (s, "--pid-file="); g_string_append (s, pidfile); nm_cmd_line_add_string (cmd, s->str); |