Andrei G has uploaded this change for review.
hnb-test: decode CO messages as the RAN side
hnb-test plays the RNC, but decoded the RANAP carried in a RUA
DirectTransfer with ranap_cn_rx_co(), the decoder for messages a CN
receives. That table has DirectTransfer, SecurityModeControl and Iu
Release, but no RAB Assignment, so the request an SGSN sends after a
successful Create PDP Context ended in
Received RANAP Procedure RAB Assignment (CO, IM) from RNC. Decode not
implemented
and no RAB Assignment Response was ever sent.
Decode connection oriented messages with ranap_ran_rx_co() instead.
Its table in ranap_common_ran.c has the RAB Assignment procedure code
along with Common ID, Security Mode Control, Iu Release and Direct
Transfer, which is what a CN sends to a RAN.
libosmo-ranap has no RAN-side connectionless decoder, so Paging and
Reset Acknowledge keep using ranap_cn_rx_cl().
Change-Id: Ibdf7fa518d15ebdb247fa349ee4df7b3888ca455
Signed-off-by: Andrei Gosman <andrei.gosman@gmail.com>
---
M tests/hnb-test-rua.c
1 file changed, 9 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/94/43594/1
diff --git a/tests/hnb-test-rua.c b/tests/hnb-test-rua.c
index b84087c..6030555 100644
--- a/tests/hnb-test-rua.c
+++ b/tests/hnb-test-rua.c
@@ -2,6 +2,7 @@
#include <asn1c/ANY.h>
#include <osmocom/core/talloc.h>
#include <osmocom/ranap/ranap_common_cn.h>
+#include <osmocom/ranap/ranap_common_ran.h>
#include <osmocom/rua/rua_ies_defs.h>
#include "hnb-test.h"
@@ -25,7 +26,14 @@
else
hnb->cur_chan = hnb->cs.chan;
- rc = ranap_cn_rx_co(hnb_test_rua_dt_handle_ranap, hnb, ies.ranaP_Message.buf, ies.ranaP_Message.size);
+ /* hnb-test is the RAN side of Iu: decode the connection oriented
+ * messages the CN sends to an RNC (RAB Assignment, Security Mode
+ * Command, Common ID, Iu Release Command, Direct Transfer). The
+ * CN-side decoder used before knows only what a CN receives and
+ * dropped RAB Assignment as "Decode not implemented". There is no
+ * RAN-side connectionless decoder in libosmo-ranap, so the
+ * connectionless path keeps the CN-side one. */
+ rc = ranap_ran_rx_co(hnb_test_rua_dt_handle_ranap, hnb, ies.ranaP_Message.buf, ies.ranaP_Message.size);
hnb->cur_chan = NULL;
To view, visit change 43594. To unsubscribe, or for help writing mail filters, visit settings.