aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-01-15 18:50:44 +0000
committerChristian Grothoff <christian@grothoff.org>2012-01-15 18:50:44 +0000
commitf60003d0485d2e0c1b1b4013801abb3ab080e811 (patch)
treed426b341b1681c4c6ef09aaca887440c27d71ce4 /src
parentca1ad221dc3b75841d7debfd5c9abc937845958a (diff)
downloadgnunet-f60003d0485d2e0c1b1b4013801abb3ab080e811.tar.gz
gnunet-f60003d0485d2e0c1b1b4013801abb3ab080e811.zip
-initialize len field
Diffstat (limited to 'src')
-rw-r--r--src/vpn/gnunet-service-vpn.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vpn/gnunet-service-vpn.c b/src/vpn/gnunet-service-vpn.c
index 1e7de025b..c9d5bb110 100644
--- a/src/vpn/gnunet-service-vpn.c
+++ b/src/vpn/gnunet-service-vpn.c
@@ -897,6 +897,7 @@ route_packet (struct DestinationEntry *destination,
897 return; 897 return;
898 } 898 }
899 tnq = GNUNET_malloc (sizeof (struct TunnelMessageQueueEntry) + mlen); 899 tnq = GNUNET_malloc (sizeof (struct TunnelMessageQueueEntry) + mlen);
900 tnq->len = mlen;
900 usm = (struct GNUNET_EXIT_UdpServiceMessage *) &tnq[1]; 901 usm = (struct GNUNET_EXIT_UdpServiceMessage *) &tnq[1];
901 usm->header.size = htons ((uint16_t) mlen); 902 usm->header.size = htons ((uint16_t) mlen);
902 usm->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_UDP_TO_SERVICE); 903 usm->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_UDP_TO_SERVICE);
@@ -925,6 +926,7 @@ route_packet (struct DestinationEntry *destination,
925 } 926 }
926 tnq = GNUNET_malloc (sizeof (struct TunnelMessageQueueEntry) + 927 tnq = GNUNET_malloc (sizeof (struct TunnelMessageQueueEntry) +
927 mlen); 928 mlen);
929 tnq->len = mlen;
928 uim = (struct GNUNET_EXIT_UdpInternetMessage *) &tnq[1]; 930 uim = (struct GNUNET_EXIT_UdpInternetMessage *) &tnq[1];
929 uim->header.size = htons ((uint16_t) mlen); 931 uim->header.size = htons ((uint16_t) mlen);
930 uim->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_UDP_TO_INTERNET); 932 uim->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_UDP_TO_INTERNET);
@@ -966,6 +968,7 @@ route_packet (struct DestinationEntry *destination,
966 return; 968 return;
967 } 969 }
968 tnq = GNUNET_malloc (sizeof (struct TunnelMessageQueueEntry) + mlen); 970 tnq = GNUNET_malloc (sizeof (struct TunnelMessageQueueEntry) + mlen);
971 tnq->len = mlen;
969 tsm = (struct GNUNET_EXIT_TcpServiceStartMessage *) &tnq[1]; 972 tsm = (struct GNUNET_EXIT_TcpServiceStartMessage *) &tnq[1];
970 tsm->header.size = htons ((uint16_t) mlen); 973 tsm->header.size = htons ((uint16_t) mlen);
971 tsm->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_TCP_TO_SERVICE_START); 974 tsm->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_TCP_TO_SERVICE_START);
@@ -991,6 +994,7 @@ route_packet (struct DestinationEntry *destination,
991 return; 994 return;
992 } 995 }
993 tnq = GNUNET_malloc (sizeof (struct TunnelMessageQueueEntry) + mlen); 996 tnq = GNUNET_malloc (sizeof (struct TunnelMessageQueueEntry) + mlen);
997 tnq->len = mlen;
994 tim = (struct GNUNET_EXIT_TcpInternetStartMessage *) &tnq[1]; 998 tim = (struct GNUNET_EXIT_TcpInternetStartMessage *) &tnq[1];
995 tim->header.size = htons ((uint16_t) mlen); 999 tim->header.size = htons ((uint16_t) mlen);
996 tim->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_TCP_TO_INTERNET_START); 1000 tim->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_TCP_TO_INTERNET_START);
@@ -1028,6 +1032,7 @@ route_packet (struct DestinationEntry *destination,
1028 return; 1032 return;
1029 } 1033 }
1030 tnq = GNUNET_malloc (sizeof (struct TunnelMessageQueueEntry) + mlen); 1034 tnq = GNUNET_malloc (sizeof (struct TunnelMessageQueueEntry) + mlen);
1035 tnq->len = mlen;
1031 tdm = (struct GNUNET_EXIT_TcpDataMessage *) &tnq[1]; 1036 tdm = (struct GNUNET_EXIT_TcpDataMessage *) &tnq[1];
1032 tdm->header.size = htons ((uint16_t) mlen); 1037 tdm->header.size = htons ((uint16_t) mlen);
1033 tdm->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_TCP_DATA); 1038 tdm->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_TCP_DATA);