/**
* Command-line arguments we are giving to the hijacker process.
*/
-static char *helper_argv[7];
+static char *helper_argv[8];
/**
* Head of DLL of clients we consult.
* Task run during shutdown.
*
* @param cls unused
- * @param tc unused
*/
static void
-cleanup_task (void *cls GNUNET_UNUSED,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+cleanup_task (void *cls GNUNET_UNUSED)
{
unsigned int i;
GNUNET_HELPER_stop (hijacker, GNUNET_NO);
hijacker = NULL;
}
- for (i=0;i<7;i++)
+ for (i=0;i<8;i++)
GNUNET_free_non_null (helper_argv[i]);
for (i=0;i<=UINT16_MAX;i++)
cleanup_rr (&requests[i]);
struct in6_addr dns_exit6;
char *dns_exit;
char *binary;
+ int nortsetup;
cfg = cfg_;
stats = GNUNET_STATISTICS_create ("dns", cfg);
nc = GNUNET_SERVER_notification_context_create (server, 1);
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
- &cleanup_task,
- cls);
+ GNUNET_SCHEDULER_add_shutdown (&cleanup_task,
+ cls);
dns_exit = NULL;
if ( ( (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg,
return;
}
helper_argv[5] = ipv4mask;
- helper_argv[6] = NULL;
+
+ nortsetup = GNUNET_CONFIGURATION_get_value_yesno (cfg, "dns",
+ "SKIP_ROUTING_SETUP");
+ if (GNUNET_YES == nortsetup)
+ helper_argv[6] = GNUNET_strdup("1");
+ else
+ helper_argv[6] = GNUNET_strdup("0");
+
+ helper_argv[7] = NULL;
hijacker = GNUNET_HELPER_start (GNUNET_NO,
"gnunet-helper-dns",
helper_argv,