[GTPv1] Fix encoding of MM Context IE if NRSNRA bit not set

The len byte, describing the length of the field coming after it,
is always expected according to the struct definition.
This commit is contained in:
Pau Espin 2024-01-15 16:25:43 +01:00 committed by Sukchan Lee
parent afa2c2c9e0
commit feaa86fc9c
1 changed files with 3 additions and 0 deletions

View File

@ -504,6 +504,9 @@ int ogs_gtp1_build_mm_context(ogs_gtp1_tlv_mm_context_t *octet,
CHECK_SPACE_ERR(2);
*ptr++ = 1;
*ptr++ = 0x01;
} else {
CHECK_SPACE_ERR(1);
*ptr++ = 0;
}
octet->len = (ptr - data);