diff options
-rw-r--r-- | src/dns/gnunet-helper-dns.c | 4 | ||||
-rw-r--r-- | src/exit/gnunet-daemon-exit.c | 6 | ||||
-rw-r--r-- | src/exit/gnunet-helper-exit.c | 4 | ||||
-rw-r--r-- | src/util/server_mst.c | 2 |
4 files changed, 14 insertions, 2 deletions
diff --git a/src/dns/gnunet-helper-dns.c b/src/dns/gnunet-helper-dns.c index 73536c252..22c6ef359 100644 --- a/src/dns/gnunet-helper-dns.c +++ b/src/dns/gnunet-helper-dns.c | |||
@@ -173,6 +173,10 @@ fork_and_exec (const char *file, | |||
173 | if (0 == pid) | 173 | if (0 == pid) |
174 | { | 174 | { |
175 | /* we are the child process */ | 175 | /* we are the child process */ |
176 | /* close stdin/stdout to not cause interference | ||
177 | with the helper's main protocol! */ | ||
178 | (void) close (0); | ||
179 | (void) close (1); | ||
176 | (void) execv (file, cmd); | 180 | (void) execv (file, cmd); |
177 | /* can only get here on error */ | 181 | /* can only get here on error */ |
178 | fprintf (stderr, | 182 | fprintf (stderr, |
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c index 9bdfba7da..8e29351f8 100644 --- a/src/exit/gnunet-daemon-exit.c +++ b/src/exit/gnunet-daemon-exit.c | |||
@@ -678,7 +678,7 @@ tcp_from_helper (const struct GNUNET_TUN_TcpHeader *tcp, | |||
678 | sbuf, sizeof (sbuf)), | 678 | sbuf, sizeof (sbuf)), |
679 | (unsigned int) ntohs (tcp->spt), | 679 | (unsigned int) ntohs (tcp->spt), |
680 | inet_ntop (af, | 680 | inet_ntop (af, |
681 | source_ip, | 681 | destination_ip, |
682 | dbuf, sizeof (dbuf)), | 682 | dbuf, sizeof (dbuf)), |
683 | (unsigned int) ntohs (tcp->dpt)); | 683 | (unsigned int) ntohs (tcp->dpt)); |
684 | } | 684 | } |
@@ -745,6 +745,10 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED, | |||
745 | const struct GNUNET_TUN_Layer2PacketHeader *pkt_tun; | 745 | const struct GNUNET_TUN_Layer2PacketHeader *pkt_tun; |
746 | size_t size; | 746 | size_t size; |
747 | 747 | ||
748 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
749 | "Got %u-byte message of type %u from gnunet-helper-exit\n", | ||
750 | ntohs (message->size), | ||
751 | ntohs (message->type)); | ||
748 | GNUNET_STATISTICS_update (stats, | 752 | GNUNET_STATISTICS_update (stats, |
749 | gettext_noop ("# Packets received from TUN"), | 753 | gettext_noop ("# Packets received from TUN"), |
750 | 1, GNUNET_NO); | 754 | 1, GNUNET_NO); |
diff --git a/src/exit/gnunet-helper-exit.c b/src/exit/gnunet-helper-exit.c index 57944cf61..5a9be473c 100644 --- a/src/exit/gnunet-helper-exit.c +++ b/src/exit/gnunet-helper-exit.c | |||
@@ -110,6 +110,10 @@ fork_and_exec (const char *file, | |||
110 | if (0 == pid) | 110 | if (0 == pid) |
111 | { | 111 | { |
112 | /* we are the child process */ | 112 | /* we are the child process */ |
113 | /* close stdin/stdout to not cause interference | ||
114 | with the helper's main protocol! */ | ||
115 | (void) close (0); | ||
116 | (void) close (1); | ||
113 | (void) execv (file, cmd); | 117 | (void) execv (file, cmd); |
114 | /* can only get here on error */ | 118 | /* can only get here on error */ |
115 | fprintf (stderr, | 119 | fprintf (stderr, |
diff --git a/src/util/server_mst.c b/src/util/server_mst.c index dcb8c4810..026601eb9 100644 --- a/src/util/server_mst.c +++ b/src/util/server_mst.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include "gnunet_server_lib.h" | 31 | #include "gnunet_server_lib.h" |
32 | #include "gnunet_time_lib.h" | 32 | #include "gnunet_time_lib.h" |
33 | 33 | ||
34 | #define DEBUG_SERVER_MST GNUNET_EXTRA_LOGGING | 34 | #define DEBUG_SERVER_MST GNUNET_EXTRA_LOGGING |
35 | 35 | ||
36 | #if HAVE_UNALIGNED_64_ACCESS | 36 | #if HAVE_UNALIGNED_64_ACCESS |
37 | #define ALIGN_FACTOR 4 | 37 | #define ALIGN_FACTOR 4 |