Commit eec53f12 authored by Lionel Gauthier's avatar Lionel Gauthier

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5960 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 4d15a8f5
......@@ -510,20 +510,22 @@ nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz,
gpduLen,
&hMsg);
payload_len = ntohs(msgHdr->msgLength);
hdr_len = NW_GTPV1U_EPC_MIN_HEADER_SIZE;
if (msgHdr->S || msgHdr->PN || msgHdr->E ) {
hdr_len = NW_GTPV1U_EPC_SPECIFIC_HEADER_SIZE;
payload_len = payload_len - (NW_GTPV1U_EPC_SPECIFIC_HEADER_SIZE - NW_GTPV1U_EPC_MIN_HEADER_SIZE);
}
AssertFatal(gpduLen == (payload_len + hdr_len),
"Mismatch gpduLen %d / hdr_len %d / payload_len %d",
gpduLen, hdr_len, payload_len);
if(NW_GTPV1U_OK == rc) {
NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
GTPU_DEBUG("Received T-PDU over tunnel end-point '%x' of size %u from "NW_IPV4_ADDR"\n",
ntohl(msgHdr->teid), pMsg->msgLen, NW_IPV4_ADDR_FORMAT((peerIp)));
payload_len = ntohs(msgHdr->msgLength);
hdr_len = NW_GTPV1U_EPC_MIN_HEADER_SIZE;
if (msgHdr->S || msgHdr->PN || msgHdr->E ) {
hdr_len = NW_GTPV1U_EPC_SPECIFIC_HEADER_SIZE;
payload_len = payload_len - (NW_GTPV1U_EPC_SPECIFIC_HEADER_SIZE - NW_GTPV1U_EPC_MIN_HEADER_SIZE);
}
AssertFatal(gpduLen == (payload_len + hdr_len),
"Mismatch gpduLen %d / hdr_len %d / payload_len %d",
gpduLen, hdr_len, payload_len);
rc = nwGtpSessionSendMsgApiToUlpEntity(pTunnelEndPoint, pMsg);
}
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment