about summary refs log tree commit diff
path: root/src/dnsmasq
diff options
context:
space:
mode:
Diffstat (limited to 'src/dnsmasq')
-rw-r--r--src/dnsmasq/nm-dnsmasq-manager.c11
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);