ranap_cause_str() already had a const input argument, but the
HNBAP and RUA equivalents for some reason had a non-const input.
Change-Id: I7db92b51847c282d23d568970dfd2bedecdea486
This looked like a copy+paste mistake in Change-Id I4fc88402a863bc1482947985f759d3a26eea4164
Related: OS#5152
Change-Id: I16286c6f13dc4e8d5c6a7f0efacd22bafe04b0a5
This function is analogous to existing ranap_decode_*_itemies_fromlist()
which we already had.
This is needed in an upcoming osmo-hnbgw patchset where we need to parse
the ReleasedItems in order to track RAB release progess in order to
gather KPIs on RAB release.
Change-Id: I328819c650fc6cefe735093a846277b4f03e6b29
I'm not sure why one files (written by Philipp)
did contain a GPLv2+ header, instead of the AGPLv3+ which is the
actual overall project license. I consider it a mistake.
In any case, any copyrightable contribution to those files was done by
sysmocom employees, so I as managing directory can legally make a
license change, whther or not it was a mistake early on or not.
Change-Id: Ie28c32022a9cbc42b55195f7dbb513228857a3cd
It was found in the field that some peers sends an X.213 IP address
consisting of 7 bytes (1byte IDP/AFI, 2byte ICP, 4 byte IPv4 address) insetad
of 20 bytes.
This is indeed possible when reading ITU Rec X.213 A.5.2.3, where it
states that Table A5 defining the 17 bytes DSP len for IANA ICP
"gives the maximum length of the DSP". So smaller values are still
possible/acceptable.
Related: SYS#6623
Change-Id: I507fb1605d976bd8573162e4fa81721245330184
So far we are omitting the GlobalRNC-ID from all of our RANAP RESET
messages, because clearly, in 3GPP TS 25.413 9.1.39, the Global RNC-ID
is listed as optional.
OTOH, section 8.26.2.1 says
"The RNC shall include the Global RNC-ID IE in the RESET message."
Apparently an RNC must include this ID, while a CN omits it.
Related: SYS#6441
Change-Id: Iec70c3054333f01bc27ca0e69bfa325bbe36edd0
Like BIT_STRING_fromBuf(), free any buffer previously kept in the target
BIT_STRING_t.
Context: osmo-hnbgw calls ranap_new_transp_layer_addr() to replace an
address in a decoded message, before re-encoding it. So far doing so
leaked the previous buffer.
Change-Id: Ic92fa317644c3a1f2be9badf455d34fe0b8ea2a4
Use msgb_ctx from test_common.c instead, which is the same pointer after
test_common_init() ran. tall_msgb_ctx from libosmocore is no longer
getting exported since I13169c00a59fb59513dfc598de5a71d094492422.
Fix for:
/usr/bin/ld: test-ranap.o: in function `main':
/build/src/tests/test-ranap.c:201: undefined reference to `tall_msgb_ctx'
/usr/bin/ld: /build/src/tests/test-ranap.c:201: undefined reference to `tall_msgb_ctx'
Change-Id: I7d0b3068760c2cd7067e2a5d929f03c7e7d1decb
Fix for:
../../../src/osmo-iuh/src/hnbap_common.c:85:9: error: enumeration value ‘HNBAP_Cause_PR_NOTHING’ not handled in switch [-Werror=switch]
Change-Id: Icab3052e27d1951129e3809e61357ee23c4cb588
Adjust the first argument of hnb_test_rua_dt_handle_ranap and
hnb_test_rua_cl_handle_ranap to be "void *priv", as it is private user
data.
Fix for:
../../../../src/osmo-iuh/src/tests/hnb-test-rua.c:19:29: error: passing argument 1 of ‘ranap_cn_rx_co’ from incompatible pointer type [-Werror=incompatible-pointer-types]
19 | rc = ranap_cn_rx_co(hnb_test_rua_dt_handle_ranap, hnb, ies.ranaP_Message.buf, ies.ranaP_Message.size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| void (*)(struct hnb_test *, struct ranap_message_s *)
Change-Id: Id930a7f0d3d05cfcc8ba9734dd922de885853c8c
Rename the "ctx" argument of ranap_cn_rx_co and ranap_cn_rx_cl to "priv"
as it is private user data passed to the callback.
Change-Id: I929548e9224298be94f7d3ed4cdca0580147721d
ranap_cn_rx_co and ranap_cn_rx_cl both have a void *ctx argument, that
gets passed to:
* a callback function and
* to various decode functions in the same file.
As it is named "ctx", it looks like a talloc context. But the decode
functions don't use ctx at all and so in reality it is private userdata
for the callback. It is used as such by test/hnb-test-rua and in
osmo-msc.
Start cleaning this up by removing the unused ctx args, a future patch
will rename it to priv and yet another patch will fix a compiler warning
in test/hnb-test-rua by properly using it as userdata arg.
Change-Id: I8936197d7ae7ffddbe8ee99d909d74ac5b3ab227
Use the function like everywhere else in the code.
Fix for:
tests/test-ranap.c:73:49: error: passing argument 3 of ‘aper_decode’ from incompatible pointer type [-Werror=incompati
ble-pointer-types]
Change-Id: I9d8a3ab70accc6a1401fe11a6d2ceef96d3b8c22
Fix warnings from generated asn1 code in order to build osmo-iuh with
werror in a future patch:
../../include/osmocom/hnbap/HNBAP_CriticalityDiagnostics-IE-List.h:29:23: error: ‘struct HNBAP_CriticalityDiagnostics_IE_List__Member’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
These visibility warnings come from "SEQUENCE … OF SEQUENCE" definitions
in the asn1 source files, as described in detail here:
https://github.com/vlm/asn1c/issues/430
It is not possible to tell gcc to just ignore these warnings since they
don't have their own type (unlike e.g. -Wuninitialized). Also it seems
like a huge effort to patch this in asn1c.
So work around the problem the same way the author of the issue worked
around it by rewriting the lines to "SEQUENCE … OF …-Value" and adding
a "…-Value ::= SEQUENCE" line below. Add a script in
asn1/utils/asn1_restructure_sequence_of_sequence.py for the
transformation and apply it.
Related: OS#4462
Change-Id: If84445ed2e0df604b581684dcf83f8520b7da84c
The message being used previously seemed to indicate something was
wrong with the message. The reality is that we are simply not handling
most of them, and they will end up being forwarded as they come in
osmo-hnbgw.
Related: SYS#5573
Change-Id: If63d942496491f1e9ee454034ec97d25764fde65
Some of the custom ranap decoders use RANAP_DEBUG to log decoding
errors. This is a problem since decoder errors usually mean that a RANAP
message was somehow incompatible or wrongly formatted, which is a
serious problem. Lets log those messages to LOGL_ERROR instead.
Change-Id: Ic94cbba65719df7618c650a394e53cc59ab4e0b9
Related: OS#5152
There is currently no decoder to decode RAB-ReleaseList objects properly.
Lets add one.
Change-Id: I4fc88402a863bc1482947985f759d3a26eea4164
Related: OS#5152
There is currently no decoder to decode RAB-FailedList objects properly.
Lets add one.
Change-Id: I0f42487968f2a39f2425068c001950509a3bd28f
Related: OS#5152
Lets add a counterpart for ranap_common_cn that works the same, but
decodes CN/MSC originated messages.
Change-Id: Iad4c2743d4d1ddf8ad49002d1fe6866f22eb9e98
Related: OS#5152
The message encoder functions that decode a message to a struct
ranap_message are only accessible via a callback function that is passed
to ranap_cn_rx_cx The decoded ranap_message only lives inside the callback
since it is freed by ranap_cn_rx_cx when the callback is done. In some
situations this might make using the decoder incredibly difficult since
it is not possible to keep the decoding results for an extended amount
of time. Lets put the decoding into a separate function and use this
function in ranap_cn_rx_cx. Then lets make the decoder and the free
function public so that the decoder can be used in a more open way.
Change-Id: I14d2ed8e597a5d12024a6a6c72ff011dbeb2549d
Related: OS#5152
This unit test generats a lot of ranap messages for test, but the code
for that is in the main() function. Lets seperate this test code into
its own function like we do it in all other unit tests.
Change-Id: I7021e48b051afb6f13fdd54843d4cd92a499de2a
in ranap_transp_layer_addr_decode() we access the buffer buf before
checking the length field. This can lead to a segfault when the buffer
has a length of 0.
Change-Id: I983f6e5e4cee47b3f5719829e1310b8e2e33ffaf
The functions new_transp_info_rtp and new_transp_info_gtp are needed to
generate the transport layer information struct. The functions are currently
not public since they are only used in ranap_msg_factory.c but to
reqwrite the RANAP RAB AssignmentReqtest / AssignmentResponse messages we
can reuse this code, so lets make them public.
Change-Id: I1e369718de8c4c7db1f1af1e6864562164ada6cf
Related: OS#5152
The RAB SetupOrModifyItemFirst is contained in the RAB Assignment
Request. We currently have no decoder for it, so lets add one.
Change-Id: Id7293c1035cf6de34b7a416fa9265a5a32ed3216
Related: OS#5152
This one was unspotted during last patches dropping hnbgw since this
file is actually not compiled currently.
Change-Id: I94ed20c42bcc9619d80757c6ff4a661c360bfb4f