diff --git a/Streaming.h b/Streaming.h index 13e93690..db4102e1 100644 --- a/Streaming.h +++ b/Streaming.h @@ -45,8 +45,8 @@ namespace stream struct Packet { - uint8_t buf[MAX_PACKET_SIZE]; size_t len, offset; + uint8_t buf[MAX_PACKET_SIZE]; int numResendAttempts; Packet (): len (0), offset (0), numResendAttempts (0) {}; diff --git a/TunnelGateway.cpp b/TunnelGateway.cpp index d2996b17..d2f26bd9 100644 --- a/TunnelGateway.cpp +++ b/TunnelGateway.cpp @@ -132,6 +132,7 @@ namespace tunnel void TunnelGatewayBuffer::CreateCurrentTunnelDataMessage () { m_CurrentTunnelDataMsg = NewI2NPMessage (); + m_CurrentTunnelDataMsg->Align (12); // we reserve space for padding m_CurrentTunnelDataMsg->offset += TUNNEL_DATA_MSG_SIZE + sizeof (I2NPHeader); m_CurrentTunnelDataMsg->len = m_CurrentTunnelDataMsg->offset;