Have a bash function to build each dependency with the same commands. There is
a tradeoff: having each dependency build with the same function means you can't
easily tweak one of the dependencies. OTOH having a unified function means a)
more readable script, b) that we're sure not to forget some steps and c) no
need to do the same edit n times.
Set the PKG_CONFIG_PATH globally. Also a tradeoff: if a future addition
wouldn't need the same PKG_CONFIG_PATH, this would make things ugly. But that
is actually quite unlikely, and the readability improvement is substantial.
Use env variables to remember local paths. That means we always are sure to cd
to the same absolute base path, which a 'cd ..' can't guarantee; also, we avoid
possible typos for e.g. "$deps/install".
Build sysmocom/sctp branch of libosmo-netif, as needed for libosmo-sccp's
sysmocom/iu branch.
Build aper-prefix branch of asn1c, as needed by 'regen'.
'make regen' first, to generate the .c from asn1, needed by the build.
Change-Id: Ia7b4b9788b9c951f8be00cc5ae72a9c0a776fe64
On FreeBSD, we use gmake, so calling 'make -C ...' won't work here.
We need to invoke $(MAKE) so gmake is used again.
Change-Id: If8d09889db2c101eca66675fff8f820d6d1d7a65
The formerly existing make rule caused a race condition in parallel builds and
wrongly stated the .c files as targets, which caused make to execute the
rule twice (once for each target). This was actually only fallout of the
attempt to express the fact that those two files are generated by the rule.
The generated file ranap_ies_defs.h was moved by one make job, another
job then tried to access the file in the old location and failed.
parallel build verified with:
$ for i in $(seq 1 10)
do
echo "XXXX iteration $i"
git clean -xfd
autoreconf -i
./configure
make -j${i} || break
done
Coauthored by Andreas Rottmann <mail@rotty.xx.vu>
Change-Id: I439edcb4b7742de861c99ed401114f51061f8088
Reviewed-on: https://gerrit.osmocom.org/65
Tested-by: Jenkins Builder
Reviewed-by: Harald Welte <laforge@gnumonks.org>
The decoding target pointer has to be NULL so that a new structure is allocated
by aper_decode(). Fixes a probable segmentation fault upon decoding at
test-ranap.c:77 or free of unallocated memory in test-ranap.c:81.
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.