fix(sdap): skip unmapped-QFI drop check on UE DL path#158
Conversation
When enable_sdap is true but the DL SDAP header is absent (sdap_dl_rx == false), the RX entity still reads the first byte of the buffer as a QFI. On the UE side that byte belongs to the IP payload, so the qfi2drb_table lookup returns SDAP_NO_MAPPING_RULE and the packet was silently dropped, causing ping failures. The drop guard is only meaningful on the gNB UL path, guard it with is_gnb so the UE DL path is unaffected. Signed-off-by: Alex Jiao <alex.jiao@keysight.com>
fa03e32 to
4dadeed
Compare
|
CI Build: #184 | Failed on the following stages: |
|
CI Build: #185 | Failed on the following stages: |
|
Hi @alexjiao2021, thanks for reporting this. We have a similar scenario in https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-upf/-/work_items/36 in the CN to gNB N3 path: the simple-switch UPF sends DL GTP-U with default qfi = 0x05 until an UL packet reclassifies the session. In this case, it also happen that QFI=5 is received but for a different reason: gNB sends DL without SDAP header, the UE SDAP sees raw IPv4 SDUs and QFI=5 comes from IPv4 header byte 0x45. This is actually a bug, since entity->enable_sdap, is true if either UL or DL header is present, and your capture shows that it can be not the case since we have UL header only. However, the fix is not enough, as it would still parse IP header as an SDAP header, so we have bogus qfi, and also parsing should be done only when RRC says header is present. I'll think about a more proper fix, which I believe should do the header parsing on a per-direction role. |
Thanks @GuidoCasati , once you have a more proper fix ready, I'll close this PR. |
hi @alexjiao2021, could you please test #249 and see if it solve the issue? |
Ping UE failed with 3rd-party gNB, UE will report error as below:
[SDAP] Dropping UL SDAP PDU with unmapped QFI=5 (ue=0 pdu_session=1 drb=2)gNB has configuration for SDAP as below:
Complete gNB RRC log in pcap format:
nr_rrc.zip
UE log:
nr_ue_ping_fail.log
This PR fixed the issue, details are in commit message.