mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
GTP: check that packets are not larger than max UDP size
This commit is contained in:
@@ -224,6 +224,7 @@ static int gtpv1uCreateAndSendMsg(int h,
|
||||
uint8_t extensionHeader_length) {
|
||||
LOG_D(GTPU, "Peer IP:%u peer port:%u outgoing teid:%u \n", peerIp, peerPort, teid);
|
||||
|
||||
DevAssert(msgLen + HDR_MAX < 65536); // maximum size of UDP packet
|
||||
uint8_t buffer[msgLen+HDR_MAX];
|
||||
uint8_t *curPtr=buffer;
|
||||
Gtpv1uMsgHeaderT *msgHdr = (Gtpv1uMsgHeaderT *)buffer ;
|
||||
|
||||
Reference in New Issue
Block a user