aboutsummaryrefslogtreecommitdiff
path: root/src/dns
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-01-04 08:15:38 +0000
committerChristian Grothoff <christian@grothoff.org>2012-01-04 08:15:38 +0000
commitd8c6f5c5bcf80cdbc48edf41d151b9395341036e (patch)
tree8469aaaa7d5843c7914ebbdab29e9e997e767f11 /src/dns
parent01dead22de07c2440200c2ca6b9b26c869e3d120 (diff)
downloadgnunet-d8c6f5c5bcf80cdbc48edf41d151b9395341036e.tar.gz
gnunet-d8c6f5c5bcf80cdbc48edf41d151b9395341036e.zip
-remove debugging code
Diffstat (limited to 'src/dns')
-rw-r--r--src/dns/gnunet-service-dns_new.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/dns/gnunet-service-dns_new.c b/src/dns/gnunet-service-dns_new.c
index 51580660f..8918039d1 100644
--- a/src/dns/gnunet-service-dns_new.c
+++ b/src/dns/gnunet-service-dns_new.c
@@ -465,10 +465,6 @@ request_done (struct RequestRecord *rr)
465 ip.checksum = 0; /* checksum is optional */ 465 ip.checksum = 0; /* checksum is optional */
466 ip.source_address = dst->sin_addr; 466 ip.source_address = dst->sin_addr;
467 ip.destination_address = src->sin_addr; 467 ip.destination_address = src->sin_addr;
468
469 inet_pton (AF_INET, "10.5.0.2", &ip.source_address);
470 //inet_pton (AF_INET, "10.5.0.1", &ip.destination_address);
471
472 ip.checksum = GNUNET_CRYPTO_crc16_n ((uint16_t*) &ip, sizeof (ip)); 468 ip.checksum = GNUNET_CRYPTO_crc16_n ((uint16_t*) &ip, sizeof (ip));
473 469
474 udp_crc_sum = GNUNET_CRYPTO_crc16_step (udp_crc_sum, 470 udp_crc_sum = GNUNET_CRYPTO_crc16_step (udp_crc_sum,
@@ -552,10 +548,6 @@ request_done (struct RequestRecord *rr)
552 { 548 {
553 memcpy (&buf[off], rr->payload, rr->payload_length); 549 memcpy (&buf[off], rr->payload, rr->payload_length);
554 off += rr->payload_length; 550 off += rr->payload_length;
555
556 fprintf (stderr,
557 "Sending %u bytes UDP packet to TUN\n",
558 (unsigned int) rr->payload_length);
559 } 551 }
560 /* final checks & sending */ 552 /* final checks & sending */
561 GNUNET_assert (off == reply_len); 553 GNUNET_assert (off == reply_len);
@@ -668,7 +660,6 @@ next_phase (struct RequestRecord *rr)
668 case AF_INET: 660 case AF_INET:
669 dnsout = dnsout4; 661 dnsout = dnsout4;
670 salen = sizeof (struct ip4_header); 662 salen = sizeof (struct ip4_header);
671 inet_pton (AF_INET, "8.8.8.8", &((struct sockaddr_in*) &rr->dst_addr)->sin_addr);
672 break; 663 break;
673 case AF_INET6: 664 case AF_INET6:
674 dnsout = dnsout6; 665 dnsout = dnsout6;
@@ -842,9 +833,6 @@ read_response (void *cls,
842 rr->payload = GNUNET_malloc (len); 833 rr->payload = GNUNET_malloc (len);
843 memcpy (rr->payload, buf, len); 834 memcpy (rr->payload, buf, len);
844 rr->payload_length = len; 835 rr->payload_length = len;
845 fprintf (stderr,
846 "Received %u bytes UDP packet from DNS server\n",
847 (unsigned int) len);
848 next_phase (rr); 836 next_phase (rr);
849 } 837 }
850} 838}
@@ -1118,6 +1106,7 @@ process_helper_messages (void *cls GNUNET_UNUSED, void *client,
1118 (ip4->protocol != IPPROTO_UDP) ) 1106 (ip4->protocol != IPPROTO_UDP) )
1119 { 1107 {
1120 /* non-IP/UDP packet received on TUN (or with options) */ 1108 /* non-IP/UDP packet received on TUN (or with options) */
1109 // FIXME: maybe just log with stats?
1121 GNUNET_break (0); 1110 GNUNET_break (0);
1122 return; 1111 return;
1123 } 1112 }
@@ -1132,6 +1121,7 @@ process_helper_messages (void *cls GNUNET_UNUSED, void *client,
1132 (ip6->next_header != IPPROTO_UDP) ) 1121 (ip6->next_header != IPPROTO_UDP) )
1133 { 1122 {
1134 /* non-IP/UDP packet received on TUN (or with extensions) */ 1123 /* non-IP/UDP packet received on TUN (or with extensions) */
1124 // FIXME: maybe just log with stats?
1135 GNUNET_break (0); 1125 GNUNET_break (0);
1136 return; 1126 return;
1137 } 1127 }