aboutsummaryrefslogtreecommitdiffstats
path: root/src/hnbgw_rua.c
AgeCommit message (Collapse)AuthorFilesLines
2019-07-16spelling stuff found by lintianThorsten Alteholz1-1/+1
Change-Id: I8434640701746d5db8707472d1d26c313e0814e9
2018-01-15hnbgw_rua: fix dereference of unset pointerNeels Hofmeyr1-2/+2
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
2018-01-15hnbgw_rua.c: log: fix integer format for cN_DomainIndicatorNeels Hofmeyr1-1/+1
Fixes: CID#135219 Change-Id: I32c11100c87a59f34d7c1fefd2f0037e5d63f0e0
2017-12-25comments: hnbgw_rua.c: remove obsolete fixmes for asn1 freeNeels Hofmeyr1-3/+1
The comments are all right above the line that does the proper asn1 free step. Change-Id: I60e3be8c56ecc75c22e76f9e9dce8c72753e153b
2017-12-25rua_to_scu(): don't create a context map for UNITDATANeels Hofmeyr1-8/+16
UNITDATA is connection-less, and as can be observed further below, the 'map' doesn't get used in the N_UNIDATA case. Related: OS#2776 Change-Id: Ic35562e6d7bfa54b6be859860657f9a235ad5a50
2017-12-25rua: discard context maps on id-DisconnectNeels Hofmeyr1-0/+5
When an id-Disconnect is received, the RUA to SCCP user context becomes unused. Mark the context map as inactive in that case. It will be cleaned up by the context map garbage collector. Related: OS#2776 Change-Id: I9616f72bfa566de081098ee13e720ff0f5266c77
2017-11-21Fix various compiler warnings in hnb-gw codeHarald Welte1-2/+2
Since we finally started to use -Wall, the related warnings became visible. Change-Id: I516700eab2aa7c3412dd62775c4960aed9d4b682
2017-08-09make point codes configurable by SCCP address bookNeels Hofmeyr1-2/+2
In the vty config, use the SCCP address book to configure the local and remote SCCP addresses. Add VTY commands to set the remote SCCP addresses by name, derive the ss7 instance from these addresses: cs7 instance 1 point-code 0.23.0 sccp-address msc point-code 0.0.1 sccp-address sgsn point-code 0.0.2 hnbgw iucs remote-addr msc iups remote-addr sgsn Enforce that both IuCS and IuPS use the same ss7 instance. In the future, we may add the feature to use two separate instances. Depends: libosmo-sccp I75c67d289693f1c2a049ac61cf2b2097d6e5687d, Ie1aedd7894acd69ddc887cd65a8a0df4b888838c, I85b46269dbe7909e52873ace3f720f6292a4516c Change-Id: I33a7ba11eb7c2d9a5dc74d10fb0cf04bf664477b
2017-07-05rua_to_scu(): add debug log for calling/called addrNeels Hofmeyr1-0/+10
This might help in resolving whether we are conforming to SCCP specs regarding our calling/called address choices. Change-Id: Ie91953f7e9033419257d556d3a9f14e125f5c60d
2017-07-05rua_to_scu(), rua_rx_init_connect(): add debug loggingNeels Hofmeyr1-2/+21
In rua_to_scu(), log domain indicator and remote address. In rua_rx_init_connect(), add domain indicator to log. Change-Id: Ibe510bf0aca5eadbc0ce6031d3026e770de6559f
2017-07-05migrate osmo-hnbgw to libosmo-sigtran's SCCP/M3UANeels Hofmeyr1-10/+16
libosmo-sigtran now has a "proper" SCCP/M3UA stack, so we can make our hnb-gw 3GPP compliant by switching from the old SUA code to the new universal SCCP user API with support for (currently) M3UA and SUA. Main changes: Use one cn_link to STP: We will connect to the core network using an (Osmo)STP instance that routes to MSC and SGSN, so we want one SCCP link instead of two. The only difference between IuCS and IuPS is a different remote osmo_sccp_addr. This has various effects through the messaging code; the patch is a bit larger than I would like, but it is hard to separate out truly independent smaller changes. CS or PS domain was previously flagged in the separate cn_link, as ctx pointer for two separate sccp_sap_up()s. Now there's just one such ctx, so determine is_ps from the RANAP Domain Indicator, or from the conn's hnbgw_context_map: - Add is_ps to context_map_alloc_by_hnb(). - To find a matching context, the RUA ID alone is no longer sufficient, also match is_ps (possible optimization todo: separate lists). We would send separate CS or PS Reset messages based on the cn_link, instead send both CS and PS Reset at the same time for the single cn_link. This could be adjusted to detect presence of MSC or SGSN instead. Pending: adjust the VTY config to reflect that there is only one remote address. Place a TODO comment for that. Smaller changes: rua_to_scu(): populate called and calling addresses for N_CONNECT and N_UNITDATA. Remove DSUA. Don't build dummy_cn, which is still implemented on SUA. Mark todo to maybe re-include it based on M3UA later. In hnbgw_cnlink, place sccp related items in a separate sub-struct. Do not keep an llist of cn_links, just have the one. Remove iteration and list management. Change jenkins script to build libosmo-sccp master. Patch-by: hwelte, nhofmeyr Change-Id: I8ac15fa2fd25bedb26297177e416976a5389b573
2017-07-05cosmetic: move callers' common switch() into rua_to_scu()Neels Hofmeyr1-57/+25
Change-Id: If6274e3738dc04646d0dc18332c12237e6910d18
2016-12-07log: fix number format for domain indicatorNeels Hofmeyr1-2/+2
CN_DomainIndicator_t is a long, so use %l format. Error was introduced in recent 2b5021fd8d445f0ca4f28e0ea71a19cd52724e57. Fixes: CID#157119 Change-Id: I22f49d45bc87897beb24a6b1eee6c83da3e57b0f
2016-11-27hnbgw: rua rx: fix rc and log unhandled Private MsgNeels Hofmeyr1-0/+3
Fixes: CID#57949 Change-Id: I822888a3cf450e2787fc352e0352aed92236ddb7
2016-11-27fix error rc in various ASN.1 decoding functionsNeels Hofmeyr1-1/+1
Fixes: CID#57945, CID#57946, CID#57947, CID#57948, CID#57950, CID#57951 Change-Id: I2d9ee1aa79959c5973041393f4769faa13720898
2016-11-27hnbgw_rua: reject invalid domain indicatorNeels Hofmeyr1-0/+14
Fixes: CID#135226, CID#135227 Change-Id: I0c44179aac02772585214e528207e959ad168f3c
2016-09-09build: move headers to include/osmocom/*Neels Hofmeyr1-3/+3
This came up while fixing 'make distcheck'; this is certainly not the easiest way but it makes sense to have the headers in include/, like we do in openbsc. The easy alternative might be to add -I$(top_srcdir)/src to src/Makefile.am. Remove -I$(top_srcdir)/src from src/tests/Makefile.am, no longer needed. Change-Id: I5a82e029dcdc4df0a60a31271a4883393fe59234
2016-09-09build: fix ranap gen, use same for gen hnbap and rua genNeels Hofmeyr1-2/+2
fix extraneous rebuild for each make invocation: touch the ranap.stamp file in src/ as the make target suggests. fix for 'make distcheck': ranap gen: move generated sources to builddir, not srcdir. Thus we also -I the builddir include to pick up those headers. hnbap and rua have the same situation as ranap (they generate numerous files from a single make rule). Use the same makefile semantics for those two (commit for ranap gen omitted the same changes for hnbap and rua). The generated headers are thus moved to include/osmocom/*/, so adjust #include statements accordingly (*_common.h, *_ies_defs.h). Also move hnbap_common.h to include/osmocom/hnbap and rua_common.h to include/osmocom/rua, since the *_ies_defs.h want to include them; and since *_ies_defs.h are now in include/osmocom/*, we want a '<foo>' include now. Also adjust gitignore. Change-Id: I32213666fcdfc144008fa7d46497c0938d093e86
2016-01-07Free ies struct after use in tests and hnbgw_cn/ruaDaniel Willmann1-0/+6
2016-01-07hnbgw: Use libosmo-netif for SCCP connection handlingDaniel Willmann1-1/+3
2015-12-29more verbose logging in various placesHarald Welte1-0/+5
2015-12-26More verbose logging (CS/PS domain)Harald Welte1-2/+9
2015-12-25hnbgw_rua.c: Print RUA cause in error indicationHarald Welte1-1/+2
2015-12-24hnbgw_rua.c: Incoming context IDs are 24bit wide according to specHarald Welte1-3/+3
so don't try to decode them to u32, which expects 32bit input values.
2015-12-24improve logging, remove obsolete FIXMEs, return of non-void functionsHarald Welte1-7/+18
2015-12-24hnbgw: Bring all parts togetherHarald Welte1-21/+197
We now have the RUA and SUA parts interconnected by the context ID mapper, and should be able to pass messages back and forward between both sides. Unfortunately this touches a bit of everything, but the structures are all still very much in flux. Hopefully they will start to stabilize at some point soon...
2015-12-23hnbgw_rua: Don't use msgb as imput, allow more parametersHarald Welte1-9/+57
2015-12-23Introduce DRANAP/DRUA log categories to separate loggingHarald Welte1-1/+1
2015-12-23use msgb_sctp_ppid() from libosmo-netif, remove local declarationHarald Welte1-1/+2
2015-10-06add copyright statement and AGPLv3 headers to source code filesHarald Welte1-0/+21
2015-09-11RUA: hand off RANAP from all PDU types, not just UnitDataTransferHarald Welte1-1/+42
Also, we now offer a ranap_tx_dt() message for connection-oriented RANAP transfers. A far as I understand the RUA spec, on RUA layer, all operations are Class 2, i.e. without any response/confirmation.
2015-09-10Back RUA/RANAP integration until RANAP Reset works for cs+psHarald Welte1-63/+25
The hNodeB is now actively transmitting and we are getting up to the HNBAP UE-REGISTER.req with the IMSI of the MS.
2015-09-10first dispatch of RUA into RANAPHarald Welte1-18/+28
This is becoming more and more of a hack, as asn1c + asn1tostruct.py don't really deal well with the RANAP syntax :(
2015-09-10rua: dispatch different message types and print context/causeHarald Welte1-1/+146
2015-09-10actually dispatch RUA messages to RUA handling codeHarald Welte1-0/+102