aboutsummaryrefslogtreecommitdiff
path: root/src/dns/gnunet-service-dns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dns/gnunet-service-dns.c')
-rw-r--r--src/dns/gnunet-service-dns.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/dns/gnunet-service-dns.c b/src/dns/gnunet-service-dns.c
index a63205ebf..6666ff61a 100644
--- a/src/dns/gnunet-service-dns.c
+++ b/src/dns/gnunet-service-dns.c
@@ -1055,6 +1055,7 @@ run (void *cls,
1055 char *ipv6addr; 1055 char *ipv6addr;
1056 char *ipv6prefix; 1056 char *ipv6prefix;
1057 char *dns_exit; 1057 char *dns_exit;
1058 char *helper_path;
1058 char *binary; 1059 char *binary;
1059 int nortsetup; 1060 int nortsetup;
1060 1061
@@ -1082,7 +1083,13 @@ run (void *cls,
1082 _("need a valid IPv4 or IPv6 address\n")); 1083 _("need a valid IPv4 or IPv6 address\n"));
1083 GNUNET_free_non_null (dns_exit); 1084 GNUNET_free_non_null (dns_exit);
1084 } 1085 }
1085 binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-dns"); 1086 helper_path = NULL;
1087 GNUNET_CONFIGURATION_get_value_string (cfg,
1088 "DNS",
1089 "HELPER_PATH",
1090 &helper_path);
1091 binary = GNUNET_OS_get_binary_path ("gnunet-helper-dns", helper_path);
1092 GNUNET_free_non_null (helper_path);
1086 if (GNUNET_YES != 1093 if (GNUNET_YES !=
1087 GNUNET_OS_check_helper_binary (binary, 1094 GNUNET_OS_check_helper_binary (binary,
1088 GNUNET_YES, 1095 GNUNET_YES,
@@ -1095,7 +1102,6 @@ run (void *cls,
1095 GNUNET_free (binary); 1102 GNUNET_free (binary);
1096 return; 1103 return;
1097 } 1104 }
1098 GNUNET_free (binary);
1099 1105
1100 helper_argv[0] = GNUNET_strdup ("gnunet-dns"); 1106 helper_argv[0] = GNUNET_strdup ("gnunet-dns");
1101 if (GNUNET_SYSERR == 1107 if (GNUNET_SYSERR ==
@@ -1106,6 +1112,7 @@ run (void *cls,
1106 { 1112 {
1107 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1113 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1108 "No entry 'IFNAME' in configuration!\n"); 1114 "No entry 'IFNAME' in configuration!\n");
1115 GNUNET_free (binary);
1109 GNUNET_SCHEDULER_shutdown (); 1116 GNUNET_SCHEDULER_shutdown ();
1110 return; 1117 return;
1111 } 1118 }
@@ -1118,6 +1125,7 @@ run (void *cls,
1118 { 1125 {
1119 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1126 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1120 "No entry 'IPV6ADDR' in configuration!\n"); 1127 "No entry 'IPV6ADDR' in configuration!\n");
1128 GNUNET_free (binary);
1121 GNUNET_SCHEDULER_shutdown (); 1129 GNUNET_SCHEDULER_shutdown ();
1122 return; 1130 return;
1123 } 1131 }
@@ -1130,6 +1138,7 @@ run (void *cls,
1130 { 1138 {
1131 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1139 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1132 "No entry 'IPV6PREFIX' in configuration!\n"); 1140 "No entry 'IPV6PREFIX' in configuration!\n");
1141 GNUNET_free (binary);
1133 GNUNET_SCHEDULER_shutdown (); 1142 GNUNET_SCHEDULER_shutdown ();
1134 return; 1143 return;
1135 } 1144 }
@@ -1143,6 +1152,7 @@ run (void *cls,
1143 { 1152 {
1144 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1153 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1145 "No entry 'IPV4ADDR' in configuration!\n"); 1154 "No entry 'IPV4ADDR' in configuration!\n");
1155 GNUNET_free (binary);
1146 GNUNET_SCHEDULER_shutdown (); 1156 GNUNET_SCHEDULER_shutdown ();
1147 return; 1157 return;
1148 } 1158 }
@@ -1153,6 +1163,7 @@ run (void *cls,
1153 { 1163 {
1154 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1164 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1155 "No entry 'IPV4MASK' in configuration!\n"); 1165 "No entry 'IPV4MASK' in configuration!\n");
1166 GNUNET_free (binary);
1156 GNUNET_SCHEDULER_shutdown (); 1167 GNUNET_SCHEDULER_shutdown ();
1157 return; 1168 return;
1158 } 1169 }
@@ -1167,10 +1178,11 @@ run (void *cls,
1167 1178
1168 helper_argv[7] = NULL; 1179 helper_argv[7] = NULL;
1169 hijacker = GNUNET_HELPER_start (GNUNET_NO, 1180 hijacker = GNUNET_HELPER_start (GNUNET_NO,
1170 "gnunet-helper-dns", 1181 binary,
1171 helper_argv, 1182 helper_argv,
1172 &process_helper_messages, 1183 &process_helper_messages,
1173 NULL, NULL); 1184 NULL, NULL);
1185 GNUNET_free (binary);
1174} 1186}
1175 1187
1176 1188