RAN_Emulation: Don't decode L3 if g_ran_ops.decode_dtap == false

We must respect this flag not only in "normal" PDUs but also
in the code path processing the "expect" handling.

Change-Id: I04a9197ac0b68c2dcb7542d035dc70c9f2b90473
This commit is contained in:
Harald Welte 2022-01-11 23:02:38 +01:00 committed by Daniel Willmann
parent cb3e2d75b8
commit 0af7615981
1 changed files with 1 additions and 1 deletions

View File

@ -569,7 +569,7 @@ private function f_handle_userData_RANAP(RAN_ConnHdlr client, RANAP_PDU ranap)
runs on RAN_Emulation_CT {
/* decode + send decoded RANAP to client */
var template (omit) octetstring l3 := f_ranap_extract_l3(ranap);
if (istemplatekind(l3, "omit")) {
if (istemplatekind(l3, "omit") or not g_ran_ops.decode_dtap) {
CLIENT.send(ranap) to client;
} else {
var template (omit) SAPI sapi := f_ranap_extract_sapi(ranap);