diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-08-05 23:16:21 +0000 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-08-05 23:16:21 +0000 |
commit | 3263144462870889845799da8516ef8b6a7eb99b (patch) | |
tree | 694aa91b6313909f7b4ab76f93f6b4a73fcc7dd0 /src/gns | |
parent | af7ad2182af66e9f1c1b7dc0a5f754196896bd3e (diff) | |
download | gnunet-3263144462870889845799da8516ef8b6a7eb99b.tar.gz gnunet-3263144462870889845799da8516ef8b6a7eb99b.zip |
-fix
Diffstat (limited to 'src/gns')
-rw-r--r-- | src/gns/gnunet-dns2gns.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/gns/gnunet-dns2gns.c b/src/gns/gnunet-dns2gns.c index 5c4247727..8ede2a18f 100644 --- a/src/gns/gnunet-dns2gns.c +++ b/src/gns/gnunet-dns2gns.c | |||
@@ -210,8 +210,9 @@ result_processor (void *cls, | |||
210 | packet->flags.zero = 0; | 210 | packet->flags.zero = 0; |
211 | packet->flags.recursion_available = 1; | 211 | packet->flags.recursion_available = 1; |
212 | packet->flags.message_truncated = 0; | 212 | packet->flags.message_truncated = 0; |
213 | packet->flags.authoritative_answer = 0; | 213 | packet->flags.authoritative_answer = 1; |
214 | packet->flags.opcode = GNUNET_DNSPARSER_OPCODE_STATUS; // ??? | 214 | packet->flags.opcode = GNUNET_DNSPARSER_OPCODE_QUERY; |
215 | packet->num_additional_records = 0; | ||
215 | for (i=0;i<rd_count;i++) | 216 | for (i=0;i<rd_count;i++) |
216 | { | 217 | { |
217 | switch (rd[i].record_type) | 218 | switch (rd[i].record_type) |
@@ -292,14 +293,19 @@ handle_request (struct GNUNET_NETWORK_Handle *lsock, | |||
292 | if (NULL == packet) | 293 | if (NULL == packet) |
293 | { | 294 | { |
294 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 295 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
295 | _("Received malformed DNS request from %s\n"), | 296 | _("Cannot parse DNS request from %s\n"), |
296 | GNUNET_a2s (addr, addr_len)); | 297 | GNUNET_a2s (addr, addr_len)); |
297 | return; | 298 | return; |
298 | } | 299 | } |
300 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | ||
301 | "%d, %d, %d, %d\n", | ||
302 | packet->flags.query_or_response, | ||
303 | packet->num_answers, | ||
304 | packet->num_authority_records, | ||
305 | packet->num_additional_records); | ||
299 | if ( (0 != packet->flags.query_or_response) || | 306 | if ( (0 != packet->flags.query_or_response) || |
300 | (0 != packet->num_answers) || | 307 | (0 != packet->num_answers) || |
301 | (0 != packet->num_authority_records) || | 308 | (0 != packet->num_authority_records)) |
302 | (0 != packet->num_additional_records) ) | ||
303 | { | 309 | { |
304 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 310 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
305 | _("Received malformed DNS request from %s\n"), | 311 | _("Received malformed DNS request from %s\n"), |