diff options
Diffstat (limited to 'src/dns')
-rw-r--r-- | src/dns/Makefile.am | 1 | ||||
-rw-r--r-- | src/dns/dns_api.c | 2 | ||||
-rw-r--r-- | src/dns/gnunet-dns-monitor.c | 21 | ||||
-rw-r--r-- | src/dns/gnunet-dns-redirector.c | 22 | ||||
-rw-r--r-- | src/dns/gnunet-helper-dns.c | 2 | ||||
-rw-r--r-- | src/dns/gnunet-service-dns.c | 7 |
6 files changed, 33 insertions, 22 deletions
diff --git a/src/dns/Makefile.am b/src/dns/Makefile.am index f74c41fc5..5af228121 100644 --- a/src/dns/Makefile.am +++ b/src/dns/Makefile.am | |||
@@ -106,6 +106,7 @@ libgnunetdns_la_LDFLAGS = \ | |||
106 | libgnunet_plugin_block_dns_la_SOURCES = \ | 106 | libgnunet_plugin_block_dns_la_SOURCES = \ |
107 | plugin_block_dns.c | 107 | plugin_block_dns.c |
108 | libgnunet_plugin_block_dns_la_LIBADD = \ | 108 | libgnunet_plugin_block_dns_la_LIBADD = \ |
109 | $(top_builddir)/src/block/libgnunetblockgroup.la \ | ||
109 | $(top_builddir)/src/util/libgnunetutil.la | 110 | $(top_builddir)/src/util/libgnunetutil.la |
110 | libgnunet_plugin_block_dns_la_LDFLAGS = \ | 111 | libgnunet_plugin_block_dns_la_LDFLAGS = \ |
111 | $(top_builddir)/src/block/$(GN_PLUGIN_LDFLAGS) | 112 | $(top_builddir)/src/block/$(GN_PLUGIN_LDFLAGS) |
diff --git a/src/dns/dns_api.c b/src/dns/dns_api.c index e7450a1d4..9f0dee9a9 100644 --- a/src/dns/dns_api.c +++ b/src/dns/dns_api.c | |||
@@ -317,7 +317,7 @@ GNUNET_DNS_request_answer (struct GNUNET_DNS_RequestHandle *rh, | |||
317 | return; | 317 | return; |
318 | } | 318 | } |
319 | if (reply_length + sizeof (struct GNUNET_DNS_Response) | 319 | if (reply_length + sizeof (struct GNUNET_DNS_Response) |
320 | >= GNUNET_SERVER_MAX_MESSAGE_SIZE) | 320 | >= GNUNET_MAX_MESSAGE_SIZE) |
321 | { | 321 | { |
322 | GNUNET_break (0); | 322 | GNUNET_break (0); |
323 | GNUNET_free (rh); | 323 | GNUNET_free (rh); |
diff --git a/src/dns/gnunet-dns-monitor.c b/src/dns/gnunet-dns-monitor.c index 5e6f90555..2436931fb 100644 --- a/src/dns/gnunet-dns-monitor.c +++ b/src/dns/gnunet-dns-monitor.c | |||
@@ -52,7 +52,7 @@ static int ret; | |||
52 | /** | 52 | /** |
53 | * Selected level of verbosity. | 53 | * Selected level of verbosity. |
54 | */ | 54 | */ |
55 | static int verbosity; | 55 | static unsigned int verbosity; |
56 | 56 | ||
57 | 57 | ||
58 | /** | 58 | /** |
@@ -346,13 +346,18 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
346 | int | 346 | int |
347 | main (int argc, char *const *argv) | 347 | main (int argc, char *const *argv) |
348 | { | 348 | { |
349 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | 349 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
350 | {'i', "inbound-only", NULL, | 350 | |
351 | gettext_noop ("only monitor DNS queries"), | 351 | GNUNET_GETOPT_OPTION_SET_ONE ('i', |
352 | 0, &GNUNET_GETOPT_set_one, &inbound_only}, | 352 | "inbound-only", |
353 | {'o', "outbound-only", NULL, | 353 | gettext_noop ("only monitor DNS queries"), |
354 | gettext_noop ("only monitor DNS replies"), | 354 | &inbound_only), |
355 | 0, &GNUNET_GETOPT_set_one, &outbound_only}, | 355 | |
356 | GNUNET_GETOPT_OPTION_SET_ONE ('o', | ||
357 | "outbound-only", | ||
358 | gettext_noop ("only monitor DNS queries"), | ||
359 | &outbound_only), | ||
360 | |||
356 | GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), | 361 | GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), |
357 | GNUNET_GETOPT_OPTION_END | 362 | GNUNET_GETOPT_OPTION_END |
358 | }; | 363 | }; |
diff --git a/src/dns/gnunet-dns-redirector.c b/src/dns/gnunet-dns-redirector.c index 89929815a..0469af732 100644 --- a/src/dns/gnunet-dns-redirector.c +++ b/src/dns/gnunet-dns-redirector.c | |||
@@ -52,7 +52,7 @@ static int ret; | |||
52 | /** | 52 | /** |
53 | * Selected level of verbosity. | 53 | * Selected level of verbosity. |
54 | */ | 54 | */ |
55 | static int verbosity; | 55 | static unsigned int verbosity; |
56 | 56 | ||
57 | 57 | ||
58 | /** | 58 | /** |
@@ -230,13 +230,19 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
230 | int | 230 | int |
231 | main (int argc, char *const *argv) | 231 | main (int argc, char *const *argv) |
232 | { | 232 | { |
233 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | 233 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
234 | {'4', "ipv4", "IPV4", | 234 | GNUNET_GETOPT_OPTION_STRING ('4', |
235 | gettext_noop ("set A records"), | 235 | "ipv4", |
236 | 1, &GNUNET_GETOPT_set_string, &n4}, | 236 | "IPV4", |
237 | {'6', "ipv4", "IPV6", | 237 | gettext_noop ("set A records"), |
238 | gettext_noop ("set AAAA records"), | 238 | &n4), |
239 | 1, &GNUNET_GETOPT_set_string, &n6}, | 239 | |
240 | GNUNET_GETOPT_OPTION_STRING ('6', | ||
241 | "ipv4", | ||
242 | "IPV6", | ||
243 | gettext_noop ("set AAAA records"), | ||
244 | &n6), | ||
245 | |||
240 | GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), | 246 | GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), |
241 | GNUNET_GETOPT_OPTION_END | 247 | GNUNET_GETOPT_OPTION_END |
242 | }; | 248 | }; |
diff --git a/src/dns/gnunet-helper-dns.c b/src/dns/gnunet-helper-dns.c index d083a9df2..5cf1967f5 100644 --- a/src/dns/gnunet-helper-dns.c +++ b/src/dns/gnunet-helper-dns.c | |||
@@ -79,7 +79,7 @@ | |||
79 | #include "gnunet_protocols.h" | 79 | #include "gnunet_protocols.h" |
80 | 80 | ||
81 | /** | 81 | /** |
82 | * Maximum size of a GNUnet message (GNUNET_SERVER_MAX_MESSAGE_SIZE) | 82 | * Maximum size of a GNUnet message (GNUNET_MAX_MESSAGE_SIZE) |
83 | */ | 83 | */ |
84 | #define MAX_SIZE 65536 | 84 | #define MAX_SIZE 65536 |
85 | 85 | ||
diff --git a/src/dns/gnunet-service-dns.c b/src/dns/gnunet-service-dns.c index 74f595c5e..ffc94afb7 100644 --- a/src/dns/gnunet-service-dns.c +++ b/src/dns/gnunet-service-dns.c | |||
@@ -347,7 +347,7 @@ request_done (struct RequestRecord *rr) | |||
347 | } | 347 | } |
348 | reply_len += sizeof (struct GNUNET_TUN_UdpHeader); | 348 | reply_len += sizeof (struct GNUNET_TUN_UdpHeader); |
349 | reply_len += rr->payload_length; | 349 | reply_len += rr->payload_length; |
350 | if (reply_len >= GNUNET_SERVER_MAX_MESSAGE_SIZE) | 350 | if (reply_len >= GNUNET_MAX_MESSAGE_SIZE) |
351 | { | 351 | { |
352 | /* response too big, drop */ | 352 | /* response too big, drop */ |
353 | GNUNET_break (0); /* how can this be? */ | 353 | GNUNET_break (0); /* how can this be? */ |
@@ -481,7 +481,7 @@ send_request_to_client (struct RequestRecord *rr, | |||
481 | struct GNUNET_MQ_Envelope *env; | 481 | struct GNUNET_MQ_Envelope *env; |
482 | struct GNUNET_DNS_Request *req; | 482 | struct GNUNET_DNS_Request *req; |
483 | 483 | ||
484 | if (sizeof (struct GNUNET_DNS_Request) + rr->payload_length >= GNUNET_SERVER_MAX_MESSAGE_SIZE) | 484 | if (sizeof (struct GNUNET_DNS_Request) + rr->payload_length >= GNUNET_MAX_MESSAGE_SIZE) |
485 | { | 485 | { |
486 | GNUNET_break (0); | 486 | GNUNET_break (0); |
487 | cleanup_rr (rr); | 487 | cleanup_rr (rr); |
@@ -882,11 +882,10 @@ handle_client_response (void *cls, | |||
882 | * message is received by the tokenizer from the DNS hijack process. | 882 | * message is received by the tokenizer from the DNS hijack process. |
883 | * | 883 | * |
884 | * @param cls closure | 884 | * @param cls closure |
885 | * @param client identification of the client | ||
886 | * @param message the actual message, a DNS request we should handle | 885 | * @param message the actual message, a DNS request we should handle |
887 | */ | 886 | */ |
888 | static int | 887 | static int |
889 | process_helper_messages (void *cls GNUNET_UNUSED, void *client, | 888 | process_helper_messages (void *cls, |
890 | const struct GNUNET_MessageHeader *message) | 889 | const struct GNUNET_MessageHeader *message) |
891 | { | 890 | { |
892 | uint16_t msize; | 891 | uint16_t msize; |