aboutsummaryrefslogtreecommitdiff
path: root/src/exit/gnunet-daemon-exit.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-01-20 17:21:21 +0000
committerChristian Grothoff <christian@grothoff.org>2012-01-20 17:21:21 +0000
commit8154c9edf0d39e8fec6f199115b02e84e49bba0b (patch)
treeb923f8eb47c192f697f3292e6cbcf84e4f2504e0 /src/exit/gnunet-daemon-exit.c
parentcebfadaaefc873a8eae0d5db22173f616892ee52 (diff)
downloadgnunet-8154c9edf0d39e8fec6f199115b02e84e49bba0b.tar.gz
gnunet-8154c9edf0d39e8fec6f199115b02e84e49bba0b.zip
-use different message types for different directions for TCP DATA
Diffstat (limited to 'src/exit/gnunet-daemon-exit.c')
-rw-r--r--src/exit/gnunet-daemon-exit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c
index 316133a75..9bdfba7da 100644
--- a/src/exit/gnunet-daemon-exit.c
+++ b/src/exit/gnunet-daemon-exit.c
@@ -721,7 +721,7 @@ tcp_from_helper (const struct GNUNET_TUN_TcpHeader *tcp,
721 tnq->len = mlen; 721 tnq->len = mlen;
722 tdm = (struct GNUNET_EXIT_TcpDataMessage *) &tnq[1]; 722 tdm = (struct GNUNET_EXIT_TcpDataMessage *) &tnq[1];
723 tdm->header.size = htons ((uint16_t) mlen); 723 tdm->header.size = htons ((uint16_t) mlen);
724 tdm->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_TCP_DATA); 724 tdm->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_TCP_DATA_TO_VPN);
725 tdm->reserved = htonl (0); 725 tdm->reserved = htonl (0);
726 memcpy (&tdm->tcp_header, 726 memcpy (&tdm->tcp_header,
727 buf, 727 buf,
@@ -789,6 +789,7 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
789 _("IPv4 packet options received. Ignored.\n")); 789 _("IPv4 packet options received. Ignored.\n"));
790 return; 790 return;
791 } 791 }
792
792 size -= sizeof (struct GNUNET_TUN_IPv4Header); 793 size -= sizeof (struct GNUNET_TUN_IPv4Header);
793 switch (pkt4->protocol) 794 switch (pkt4->protocol)
794 { 795 {
@@ -2143,7 +2144,7 @@ run (void *cls, char *const *args GNUNET_UNUSED,
2143 {&receive_udp_remote, GNUNET_MESSAGE_TYPE_VPN_UDP_TO_INTERNET, 0}, 2144 {&receive_udp_remote, GNUNET_MESSAGE_TYPE_VPN_UDP_TO_INTERNET, 0},
2144 {&receive_tcp_service, GNUNET_MESSAGE_TYPE_VPN_TCP_TO_SERVICE_START, 0}, 2145 {&receive_tcp_service, GNUNET_MESSAGE_TYPE_VPN_TCP_TO_SERVICE_START, 0},
2145 {&receive_tcp_remote, GNUNET_MESSAGE_TYPE_VPN_TCP_TO_INTERNET_START, 0}, 2146 {&receive_tcp_remote, GNUNET_MESSAGE_TYPE_VPN_TCP_TO_INTERNET_START, 0},
2146 {&receive_tcp_data, GNUNET_MESSAGE_TYPE_VPN_TCP_DATA, 0}, 2147 {&receive_tcp_data, GNUNET_MESSAGE_TYPE_VPN_TCP_DATA_TO_EXIT, 0},
2147 {NULL, 0, 0} 2148 {NULL, 0, 0}
2148 }; 2149 };
2149 2150