[GTPv1C] Fix sequm not added to EchoResponse and VersionNotSupported (#1390)

According to TS 29.060 they should be added.

section 7.6:
"if it is a request for which a response has been defined, shall be sent
with a Sequence Number"

section 8.2:
"""
Sequence number flag (S) shall be set to "1"
...
For GTP-C messages not having a defined response message for a request
message, i.e. for messages Version Not Supported, RAN Information Relay
and Supported Extension Headers Notification, the Sequence Number shall
be ignored by the receiver.
"
This commit is contained in:
Pau Espin 2022-02-24 15:38:52 +01:00 committed by GitHub
parent dbd9e8bd78
commit 3b6da3ddb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 9 deletions

View File

@ -306,11 +306,8 @@ int ogs_gtp1_xact_update_tx(ogs_gtp_xact_t *xact,
return OGS_ERROR;
}
if (hdesc->type > OGS_GTP1_VERSION_NOT_SUPPORTED_TYPE) {
gtp_hlen = OGS_GTPV1C_HEADER_LEN;
} else {
gtp_hlen = OGS_GTPV1C_HEADER_LEN - 4;
}
gtp_hlen = OGS_GTPV1C_HEADER_LEN;
ogs_pkbuf_push(pkbuf, gtp_hlen);
h = (ogs_gtp1_header_t *)pkbuf->data;
@ -321,10 +318,8 @@ int ogs_gtp1_xact_update_tx(ogs_gtp_xact_t *xact,
h->pt = 1; /* GTP */
h->teid = htobe32(hdesc->teid);
if (hdesc->type > OGS_GTP1_VERSION_NOT_SUPPORTED_TYPE) {
h->s = 1;
h->sqn = OGS_GTP1_XID_TO_SQN(xact->xid);
}
h->s = 1;
h->sqn = OGS_GTP1_XID_TO_SQN(xact->xid);
h->length = htobe16(pkbuf->len - 8);
/* Save Message type and packet of this step */