The cause code no remaining rab should be only used when closing the
Iu connection on this specific reason. Change default to NAS Success
Release which is a usual release.
Change-Id: Icf3f06b0de7dcda9f967ae29863054ef813c75e5
This uses the (modified) Osmocom asn1c on the (modified) SABP ASN.1
syntax to generate C code + header files for SABP parsing/encoding.
It also adds some helper code for message encoding and decoding as well
as a new libosmo-sabp shared library which can be used by programs to
implement SABP related functionality.
Change-Id: Ib9580d1af96354398da4c9f97b28a0e23d56e275
Allow to free UE ctx when receiving a Iu Release Complete.
In preparation of ranap_iu_tx_release_free() it requires
a field to free the Iu ctx on it's own without depending
on the upstream user.
Change-Id: Iac41cd3cce3232d01b2f7ede0cc46226c2cfb6c0
ranap_iu_tx_release_free is a fire and forget function to release
gracefully if possible. It first sends a Iu Release Command. After
a certain timeout the connection will be released.
Change-Id: I349e2c61ba0131e233b7ab927dfced0bd461dd8f
The iu_client is informing the library user about global event.
In prepration to the tx_iu_release_free() call allow to
disable upstream notificatiosn
Change-Id: Ic93ef6fd54c995405e9c37a5e0c53f81a89850b7
As preparation to enable and disable notifications for a specific ue connection,
add a slim proxy before calling global_iu_event_cb
Change-Id: I49a3402a871d6dccd343cda49f8a7f82bffe150b
Otherwise the process hangs if the user enters:
$ show hnb NAME
hnbgw_vty.c: In function ‘show_one_hnb’:
hnbgw_vty.c:234:2: warning: passing argument 1 of
‘hnb_context_by_identity_info’
from incompatible pointer type
[enabled by default]
iuh/hnbgw.h:154:21: note: expected ‘struct hnb_gw *’
but argument is of type ‘struct hnb_gw **’
Change-Id: I42fdb10af5f6427886b5797325830dfc212af30f
Since March 15th 2017, libosmocore API logging_vty_add_cmds() had its
parameter removed (c65c5b4ea075ef6cef11fff9442ae0b15c1d6af7). However,
definition in C file doesn't contain "(void)", which means number of
parameters is undefined and thus compiler doesn't complain. Let's remove
parameters from all callers before enforcing "(void)" on it.
Change-Id: I31a286bebe3229671d9960ae32a753d260a26b1d
Related: OS#4138
Seveal of our RANAP messages were using criticality values at the
PDU level differing from what RANAP_PDU_Descriptions.asn states
for the respective procedures. Let's fix that.
This was discovered while working on the initial IuCS TTCN3 tests,
where the receive templates require the criticality to match.
Change-Id: I98eec0bdc0d0cb1b9284bd5d042b1f4403abef95
This ensures that the rpath of the generated binaries is set to use only
the just-compiled so-files and not any system-wide installed libraries
while avoiding the ugly shell script wrapper.
Change-Id: I92c7391631becc09d277981179c23f2e4dba3b54
Rationale: current osmo-msc refactoring introduces RESET handling on IuCS.
In particular, it makes osmo-hnbgw be able to operate with an (upcoming)
osmo-msc that has strict RESET handling: it will send a RESET and require a
RESET ACK if it sees a new IuCS peer sending messages without prior RESET.
Even though a workaround to ignore missing RESET messages on IuCS will also be
in place in the new osmo-msc, this is a first small step towards more sane
RESET handling in osmo-hnbgw.
Related: OS#3820
Change-Id: I02bc74ef9fef61f4490b4d4dc3ce6c0a6d965909
Un-jam the commandline option to disable color: it is so far stuck in
--disable-color and overrides everything so that we never see any colored
logging from osmo-hnbgw, whichever cmdline or cfg we pass.
Change-Id: I00400b626925fa9da707ad6679d8448941dbfa98
Add the 'show hnb NAME' VTY command which displays just
one specific HNB, addressed by its identity string.
This augments the functionality provided by 'show hnb all'.
Change-Id: Iab12aa4ab090b72c472358b84daf6919b30747f6
Related: OS#2774
The nano3G sends the RAB Assignment Response's Transport Layer Address in X.213
NSAP padded to 20 bytes (160bit). Do not interpret it as 4-byte IP address,
which currently breaks nano3G voice calls (wrong RTP IP address).
Recent commit I2cd1b2d8e1c1ae707cfc0dc7961a2b31ecdf29e0 fixed decoding of X.213
NSAP that is exactly seven bytes, but broke decoding of the padded version from
the nano3G.
A proper X.213 NSAP decoding would still be more welcome than this patching
back and forth, but this is (another) quick fix without spending too much time
on it.
Related: OS#3420
Change-Id: I0ad8bce6fcfd3829394c39490058c1ab85cdfde3
Fix ranap_transp_layer_addr_decode() to test == 7 instead of > 7: If a femto
cell sends its Transport Layer Address as X.213 NSAP IPv4, we receive 3 header
bytes and four IP-address bytes, so the length is exactly 7.
This function is very vague on numerous other decoding details, but this patch
only fixes the vital length check that makes 3G usable with X.213 NSAP.
Related: OS#3420
Change-Id: I2cd1b2d8e1c1ae707cfc0dc7961a2b31ecdf29e0
The read callback should catch all errors already.
Previous when a read fails it:
* hnb_context_release() -> osmo_stream_srv_destroy() -> hnb_context_release()
On the second hnb_context_release() the hnbgw will crash because calling
llist_del() twice on the same object.
Fixes: OS#3416
Change-Id: Ic84b2184b7fc850c0de2acacf179e86771e17510
It's cosmetic since the MCC and MNC in the PLMN aren't actually used,
currently. It makes sense to do it properly anyway, while I'm still in the
3-digit MNC topic, for the future.
Change-Id: I29ebcddd45fe3079f8883589a83cc7216a535475
If we receive a HNB-REGISTER-REQ with a cell ID which is already used
by another registered NNB, log an error and send HNB-REGISTER-REJECT.
Tested manually by running two 'hnb-test' programs concurrently (they
need to listen on different telnet ports; this port is hard-coded so
I compiled two different hnb-test binaries).
Then I issued the 'hnbap hnb register' command on the telnet interface
of each, and verified that the correct action is logged by osmo-hnbgw.
Both hnb-test programs can connect, but only one of them can register
at a time. Killing a registered 'hnb-test' program terminates its
connection and allows the previously rejected one to register.
The new rejection log message looks like this:
hnbgw_hnbap.c:429 rejecting HNB-REGISTER-REQ with duplicate cell
identity MCC=901,MNC=99,LAC=49406,RAC=66,SAC=43947,CID=182250155
from (r=127.0.0.1:42828<->l=127.0.0.1:29169)
This change depends on a new API in libosmo-netif, which is added in
https://gerrit.osmocom.org/#/c/6844/
Change-Id: Iffd441eb2b6b75dfbe001b49b01bea015ca6e11c
Depends: I8ed78fe39c463e9018756700d13ee5ebe003b57f
Related: OS#2789
HNBAP isn't really that important to osmo-hnbgw operation, all we do is service
the few requests so that the other side is happy and uses our Iuh.
Nevertheless, could at least log if an UnsuccessfulOutcome was received.
Change-Id: I3f309dc2d3436798e9e76bcc2ebd82403ea538a1
There don't seem to be any evaluations of the rc, nevertheless return
well-defined values.
Fixes: CID#181968
Change-Id: I59295388564e5d270da32db6e7488755231f8a11
In the UNITDATA case, there is no map, so a) initialize map as NULL and b)
print the RUA ctx id directly from local var context_id instead.
Fixes: CID#181969
Change-Id: I73f508b719b61a389e10cbad1bafad1650634abe
Add commands to get number of connected HNBs and identity string of
connected HNB based on Cell ID.
Change-Id: I3a2d6fa3d6d0829ccee4ecc0998d9299c97820e9
We have to use a format string, we cannot directly print "name".
Fixes a build error on our OBS builds:
hnbgw_vty.c:156:5: error: format not a string literal and no format arguments [-Werror=format-security]
which was introduced in Change-Id I3c937306a011715e163a40bc8ef8ec7e8d4e5d08
about one week ago.
Change-Id: I042989c2b7b379284b2ee5fea3bd8f8ce406b09e
This was introduced a week ago in Change-Id
I3c937306a011715e163a40bc8ef8ec7e8d4e5d08 and is now cleaned up.
Change-Id: Iaadf941aa7f1c5ae05eb02b51cc646b7b5587ba3