[GTPv1C] Fix outer message length field containing wrong value (#1373)

The mandatory part of the header must be excluded from the header, that
is flags(1)+type(1)+length(2)+teid(4) = 8 bytes.
This commit is contained in:
Pau Espin 2022-02-18 22:36:40 +01:00 committed by GitHub
parent 2056a5b500
commit f7999a2cad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -325,7 +325,7 @@ int ogs_gtp1_xact_update_tx(ogs_gtp_xact_t *xact,
h->s = 1;
h->sqn = OGS_GTP1_XID_TO_SQN(xact->xid);
}
h->length = htobe16(pkbuf->len - 4);
h->length = htobe16(pkbuf->len - 8);
/* Save Message type and packet of this step */
xact->seq[xact->step].type = h->type;