After aper_decode(), we still need to free the decoded struct.
This was introduced in 14da5411a4
("test-ranap: Add test case about constrained integer range decode")
Note, in that commit there is another test failure in expout (a reversed byte
order) which is "secretly" fixed in bb289e3b81
("RAB parameters: add Extended Max Bitrate").
This commit fixes:
@@ -213,6 +212,7 @@
</RANAP_IE>
00 0a 00 11 00 00 01 00 29 40 0a 00 00 01 00 28 40 03 05 c2 d0
report
-talloc report on 'asn1_context' (total 0 bytes in 1 blocks)
+talloc report on 'asn1_context' (total 40 bytes in 2 blocks)
+ constr_CHOICE.c:927 contains 40 bytes in 1 blocks (ref 0) 0x187e690
talloc report on 'msgb' (total 1 bytes in 1 blocks)
exit
Adjust test expectation in test-ranap.c.
This IE is seen in a "real life" pcap of hNodeB operation. We did not need it
so far, but add it to test the ip.access nano3G.
Comment from the future: the ip.access nano3G rebooted upon RAB Assignment
Request, and after adding/tweaking some IEs it stopped rebooting. This is one
of the changes that fixed the reboot issue. The changes have been tested
incrementally until reboots vanished, but it's not clear/hasn't been tested
whether omitting this change alone will cause reboots to re-appear.
There was a bug in the asn1c/libffasn1c APER patch that caused
constrained integer ranges to be decoded incorrectly. Add a test
case for that to avoid people falling into that trap...
Our version of asn1c/libasn1c used to have an INTEGER encoding but,
where the encoding of integers of > 2 bytes length was broken.
Add a test case to what we expect with the updated/fixed libasn1c.
If your compilation breaks, please upate to libasn1c with related
fix commited a few minutes ago.
This tests compilation, runs the tests, regenerates the ASN1 code,
compiles it and tests it as well. The make distcheck target is not
working right now.
Allow the *caller* of ranap_new_msg_rab_assign_data() to make the decision for
using 32 bit or longer IP addresses in RAB Assignment Request messages.
This requires a follow-up change in openbsc branch sysmocom/iu.
Fix log typo 'REGSITER' and add some comments on UE Register with TMSI.
The container_pair struct starts with 'list', so passing the container_pair
pointer is equivalent to passing the list; but instead, explicitly mention the
list member to avoid confusion.
To test CSCN, I want dummy-cn to listen on 127.0.0.2 and mock IuPS instead of
the hardcoded 127.0.0.1 to mock IuCS.
Add commandline option parsing and the --bind option to set the local bind
address.
As soon as possible, clarify that slink is an osmo_sua_link*. Immediately
obtain the priv as hnbgw_cnlink and pass that to all the static functions.
Thus remove code dup and clarify argument typing.
Allow Iu Release Command decoding and freeing.
Add Paging decoding and freeing.
These are all needed by hnb-test, which still uses the CN parsing functions,
still to be fixed, as commented in the code.
Add the Security Mode Command procedure code to cn_ranap_rx_initiating_msg_co()
and cn_ranap_free_initiating_msg_co(), for hnb-test (see comments in the code).
Adding the Security Mode Control command would break the current scheme of
callbacks across layers. This brought to my attention that the scheme is indeed
unnecessarily complex, so simplify it.
Instead of passing callbacks, call functions directly. Add hnb-test-layers.h to
declare those functions that cross from main to rua, to ranap and back to main
and remove the callback type definitions.
Instead of copying the NAS PDU to a newly allocated msgb, pass the data and len
directly to hnb_test_nas_rx_dtap().
Instead of repeatedly checking the gsm48_hdr length, just pass the struct
gsm48_hdr* and len around and assume the basic header length has been checked.
In some places, rename 'length' to 'len' for cosmetic consistency.
Previously the SRES was hardcoded, but the CN changed to generate the SRES.
So now, generate the SRES while still using the hardcoded Ki.
Fixes the Authentication Response message when testing IuCS Location Update.
Fix the ranap_parse_lai() part that decodes the MNC: place the *10 at the
proper MNC digit.
Add a comprehensive test for ranap_parse_lai() in test-helpers.c. Because
ranap_parse_lai() logs things, add test_common.c to test-helpers compilation
and an expected stderr output to test-helpers' testsuite.at def.