FortiCarrier
FortiCarrier is a High-Scale Carrier-Grade Network Service Applicance (CGN)
maydin
Staff
Staff
Article Id 410168
Description This article describes the conditions under which FortiGate may deny a GTP packet with the log message deny_cause: invalid-msg-length.
It explains how FortiCarrier checks the GTP length field and message size, and outlines the common scenarios where mismatches or out-of-range values lead to packet rejection.
Scope All FortiCarrier.
Solution

invalid-msg-length deny can occur in two cases:

 

Case 1: Mismatch between GTP length field and actual packet size.

This happens when the length field inside the GTP header does not match the real size of the message. According to the GTP RFCs:

For GTPv1, the length covers everything after the first 8 bytes of the header (including sequence numbers, N-PDU, and any extension headers).

For GTPv2, the length covers everything after the first 4 bytes of the header (including TEID if present, sequence numbers, and the payload).

 

In the below example, the Length parameter in the GTP payload is 8 bytes, but the actual payload is 6 bytes:

 

 
 
gtp_length.PNG

 

This GTP message is denied with the following log: 

 

gtp_length_log.PNG

 

Case 2: GTP message size outside the allowed range.

FortiCarrier uses the GTP profile to define acceptable message size limits through two parameters:

  • min-message-length (default: 0).
  • max-message-length (default: 1452).

 

If a GTP message is smaller than the minimum or larger than the maximum, FortiCarrier will reject it and log invalid-msg-length.

For example, if a packet arrives with a payload length of 3465, it exceeds the default maximum (1452) and will be denied :

 

GTP_large_range.PNG

 

This packet is denied with the following log: 

 

GTP_large_range_log.PNG