free5gc / upf

Apache License 2.0
32 stars 51 forks source link

fix GTP Tunnel sequence number issue #186 #23

Closed frankieky888 closed 3 years ago

frankieky888 commented 3 years ago

Describe the bug - GTP Tunnel sequence number issue

According to 3GPP TS 29.281 GTP Tunnel sequence number should be same "The Sequence Number in a signalling response message shall be copied from the signalling request message that the GTP-U entity is replying to" image

In your implementation, upf/src/up/up_path.c. line 105 ._seqNum = (gtpRespHrd.flags & 0x02) ? htons(ntohs(opthrd->_seqNum) + 1) : 0,

there are something wrong for the seqNum +1

We are tying to attach a 5G SA UE to free5GC UPF (via one of the vendor's RAN & Core), the PDU session will be deleted by SMF, and the reason seems to be incorrect sequence number in GTP_Echo_Response.

after remove +1 for the sequence number, our UE attach is success and with internet access

Environment (please complete the following information):