aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-08-09add /debian package supportpre_releaseAlexander Couzens9-0/+142
Change-Id: I985805aea0e48fe70619de8b81206098e4e37613
2017-08-09make point codes configurable by SCCP address bookNeels Hofmeyr6-97/+117
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-08-08add .gitreview to support git review pluginAlexander Couzens1-0/+3
Change-Id: If8ebdb687f41911f55679472a0c87f9734264e80
2017-07-31move openbsc.git's iu.h, iu.c, iu_vty.c here as iu_clientNeels Hofmeyr5-1/+999
To help split openbsc.git to separate MSC and SGSN repositories, place the common Iu interface related code here in libosmo-ranap. Also apply various improvements while moving (from intermittent code review). The code depends on libosmo-ranap tightly. One reason to want this separate from libosmo-ranap could be that it uses libosmo-sigtran, accepting an sccp instance. However, including in libosmo-ranap is the simplest way to go. The osmo-iuh build depends on libosmo-sigtran anyway because of OsmoHNBGW, and all current users of libosmo-ranap also naturally link libosmo-sigtran already. Apply prefix ranap_iu_ and RANAP_IU_ to allow smooth transition from the openbsc.git iu_ to the libranap ranap_iu_ implementations. Prune unneeded #include statements. Instead of sccp_addr, store an rnc pointer in the ue_conn_ctx. To facilitate, also: - Move iu_rnc struct to iu_client.h (as ranap_iu_rnc). - Instead of sccp_addr, pass rnc to ue_conn_ctx_alloc(). - Pass a local struct new_ue_conn_ctx containing the sccp_addr and conn_id up the RANAP handling stack in case of an InitialUE message. - Separate the InitialUE message handling from cn_ranap_handle_co(), by moving to new and separate cn_ranap_handle_co_initial(), so we can still pass a looked-up ue_conn_ctx to all other cn_ranap_handle_co() code paths. - Allocate the ue_conn_ctx only in ranap_handle_co_initial_ue(), not as early as before. Note that we are not actually ever using the rnc pointer now present in ue_conn_ctx. It could be used for more concise paging, to first page only the RNC where we last saw the subscriber. So far we page all matching LAC/RACs. Tweak error logging: use __func__ instead of writing the function names as string constants. In iu_client_vty.c: - Move the asn.1 debug commands from logging over to the iu node. They are not specific to the logging target. They could qualify for an entirely separate 'asn1' root node, but for simplicity place under 'iu'. - Add the 'asn1' commands to ranap_iu_vty_config_write(), so far missing. - remove the legacy "net." from a VTY error message, it is not known which name the parent node of 'iu' has. Depends: libosmo-sccp I85b46269dbe7909e52873ace3f720f6292a4516c, libosmo-sccp Ie1aedd7894acd69ddc887cd65a8a0df4b888838c Change-Id: I6a3f7ad15be03fb94689b4af6ccfa828c25f45c0
2017-07-31ranap_common.h: fix include of asn1c/asn_application.hNeels Hofmeyr1-1/+1
Change-Id: I152377813cdcfef73e2c4309b0f8c97807d7d4f8
2017-07-27cn unitdata: verify correct remote addrNeels Hofmeyr1-0/+28
When receiving unitdata from the CN, verify that it is indeed coming from the remote address that matches our CS/PS domain settings. This patch came from an earlier stage where the is_ps out-parameter was actually used. While it currently isn't, it doesn't hurt to leave it there. Change-Id: I7190b4c3a05e8bac0eeffa1eab18c9e47429cb17
2017-07-06set RANAP msgb headroom to 512 (times two)Neels Hofmeyr1-1/+1
With a headroom of 256, the SGSN crashes with: msgb(0x6e3b90): Not enough headroom msgb_push (256 < 264) I'm not perfectly sure what amount of headroom is strictly necessary. The only reason to pick 512 is that it is twice the amount of 256. Change-Id: I9a193846902a0477af0873f78283c4f2bedaf5dd
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-05sccp_sap_up(): guard against NULL pointersNeels Hofmeyr1-1/+16
Change-Id: Icd64b92b00461cace5c476c8bcf69eec3fdbbdd3
2017-07-05migrate osmo-hnbgw to libosmo-sigtran's SCCP/M3UANeels Hofmeyr10-134/+133
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
2017-07-05jenkins: build from libosmo-netif masterNeels Hofmeyr1-1/+1
After merge of the sysmocom/sctp branch to master, it was forgotten to change this build script to move along to master. Change-Id: I473d1361b99ff0ff8adba9326b0e2dfbc48a3aef
2017-05-04contrib: Add systemd service file for osmo-hnbgwold_suaDaniel Willmann1-0/+11
Change-Id: I650bb5650b6d4f474e2040b57e6f78ee9d013825
2017-05-04examples: Adjust IP address of example configDaniel Willmann1-1/+1
Change-Id: Ide4f1592c314f7a764bef30b76bdb21ce0fb6dc2
2017-04-06hnbgw: Fix crash if cnlink fails to connectPau Espin Pedrol1-0/+1
Return NULL in the error code path, otherwise an uninitialized pointer is returned and later accessed when a UE tries to register using the cnlink. Change-Id: I4f3e2e0680de3216e2e569958bd64f70dc30c2a3
2017-04-05asn1tostruct.py: specify python version in shebangPau Espin Pedrol1-1/+1
The script is expected to be run using python 2.x, but nowadays some distros are already using python 3 as default, which will fail to run this script. This change fixes compilation in my Archlinux box. Change-Id: I6eb95351538a64f2b23d638824972818591b1b66
2017-03-29doc: fix osmo-hnbgw.cfg exampleNeels Hofmeyr1-25/+18
'bind' was changed to local-ip in 39ee92606213a9fd36b10183bb461fa6e2d3a407 The 'logging all everything' is known to not work, use 'all debug' instead. Fix indenting of the 'log' items. Change-Id: Ie7828073a4b4a5555f418246b20588e903ef4135
2017-03-17Update README with project related information and convert to MarkdownHarald Welte3-47/+104
Also, include it in 'make dist' tarballs. Change-Id: Ia28743b7ea3510097f841f83d2eca2669b4d73ea
2017-03-16jenkins: add value_string termination checkNeels Hofmeyr1-0/+2
Change-Id: I54ede7b120953c233c0e10cc88e9fd448c961308 Depends: libosmocore change-id I2bc93ab4781487e7685cfb63091a489cd126b1a8
2017-03-08doc: OsmoMSC + HLR instead of CSCNNeels Hofmeyr1-11/+16
Change-Id: I498446fd0e432968eb26faf1b2f64825c9eec5d5
2017-02-02new_rab_par_voice(): add bitrate params, call with (6700, 12200)Neels Hofmeyr2-8/+9
The guaranteedBitrate lowers from 12200 to 6700, which is mimicking the values found in a trace from a production 3G environment. So far we have no reason to choose these values other than knowing that other operators seem to do this. This came up while trying to fix voice RAB for the nano3G, but this patch had no effect on that. Now that it's here, we might as well keep it. Change-Id: Ia7eecca43d62a6a020466e9b8dc8b566ca988f9f
2017-02-02ranap: make X.213 NSAP 160 bits long, zero paddedNeels Hofmeyr2-12/+16
For IPv4 addresses, only 56bit of X.213 NSAP are used. The sysmocell5000 accepts such a field that is 56bits long, but the ip.access nano3G does not (and crashes instead). Both work when zero-padded to 160bits size. So far we used to send the IPv4 address as "raw" 32bits to the nano3G to avoid the crash. With this zero padding we no longer need such a workaround and can use identical config for both cells. Change-Id: I070bbfe887ab93d08322df30571050a381d082d5
2017-02-01cs RAB: add nAS_SynchronisationIndicatorNeels Hofmeyr2-11/+19
This is mimicking the IEs found in a trace from a production 3G environment. We have no reason to add this other than knowing that other operators seem to do this. This came up while trying to fix voice RAB for the nano3G, but this patch had no effect on that. Now that it's here, we might as well keep it. Change-Id: I14c22b0befb308bac2eded662fe13a58c8478743
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 Hofmeyr5-6/+6
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-11-26ue_context_alloc(): Avoid ue->imsi without NULL terminationHarald Welte1-2/+3
Change-Id: I152e84206e0b2b80fa79956f5adbbe84ff10b4ab Fixes: Coverity CID 57625
2016-10-27hnbgw: parameterize IuCS and IuPS ips and ports: add vty cmdsNeels Hofmeyr4-2/+139
Basically copy-paste the Iuh local-ip and local-port code to provide parameterization of the IuCS and IuPS remote addresses. Add IUCS and IUPS nodes, enhance go_parent_cb and config writing accordingly. Change-Id: I2c28977011009df4e1fa472290bbbc359e406971
2016-10-27hnbgw: vty: set explicit go_parent_cbNeels Hofmeyr3-0/+23
A second level of depth will be added to the hnbgw node soon, which will need explicit go-parent logic. Change-Id: I8d1c18a396c215e8425ae49872b5c73316087d7d
2016-10-27hnbgw: parameterize iuh local port: add vty cmdNeels Hofmeyr1-0/+14
For completeness' sake, add VTY command to set the local Iuh port, to go with the command that sets the local IP. Change-Id: I4b5e9fe9fcfa489069a0728d47899ef4a61f7ce5
2016-10-27hnbgw: cosmetic: local-ip config: drop getter functionNeels Hofmeyr2-16/+5
Use the g_hnb_gw->config.iuh_local_ip directly, drop hnbgw_get_iuh_local_ip(). Change-Id: Ie91aea82ae5d128ad735a0857ea814b440c3232c Suggested-by: hwelte
2016-10-13cosmetic: hnbgw: addr related renames, move define, move commentNeels Hofmeyr3-22/+22
Prepare for parameterization of IuCS and IuPS addresses: Conform internal variable naming to local-ip, local-port, remote-ip, remote-port (instead of bind-ip). Rename HNBGW_IUH_LOCAL_IP_DEFAULT to HNGGW_LOCAL_IP_DEFAULT to be more general and move it to the top. Move a function doc comment to the .c file. Change-Id: Ice85941c978498e3ddf41d151248507e7f56cb5d
2016-10-13fix msgb talloc context initializationNeels Hofmeyr4-3/+3
Properly initialize msgb talloc context in hnbgw and all tests, using the new msgb_talloc_ctx_init(). test-ranap.c: since msgb talloc ctx is now in test_common_init(), remove msgb talloc init here. Change-Id: I807c799aff1239184728551ed77fdafa73bd683f
2016-10-12jenkins.sh: use osmo-build-dep.shNeels Hofmeyr1-43/+17
Like in libosmo-abis' and other jenkins.sh Change-Id: I24f5a04abdf986eee4358bb3327b8d8b9b27e8f2
2016-10-10fix build: look for generated sources in builddir, not srcdirNeels Hofmeyr1-3/+3
Fixes 'make check' from a different dir than the source tree. Change-Id: I97606dadef3c2184f9538b0198029047cc3af71c
2016-10-01configure: check for pkg-config presenceNeels Hofmeyr1-0/+7
Change-Id: I940558e1b53b0d42291077eba0568f9974df6957
2016-10-01build: be robust against install-sh files above the root dirNeels Hofmeyr1-0/+3
Explicitly set AC_CONFIG_AUX_DIR. To reproduce the error avoided by this patch: rm install-sh # in case it was already generated. touch ../install-sh # yes, outside this source tree autoreconf -fi This will produce an error like ... configure.ac:16: error: required file '../ltmain.sh' not found configure.ac:5: installing '../missing' src/Makefile.am: installing '../depcomp' autoreconf: automake failed with exit status: 1 See also automake (vim `which automake`) and look for 'sub locate_aux_dir'. Change-Id: I5aad87b7d4c043f890f4ae2bc5d68cbad6d2c5c7
2016-09-30jenkins.sh: output all test logs when 'make check' failedNeels Hofmeyr1-2/+5
Assume that cat-testlogs.sh from osmo-ci is installed in $HOME/osmo-ci/scripts, and call from jenkins.sh upon 'make check' failure. Change-Id: I6ee37ae638aa0b95222e5c0ec78474fab1f8cfae
2016-09-27fix: apply rename of osmo_sua_link_get_user_priv()3G_2016_09Neels Hofmeyr1-1/+1
In the course of a rebase in libosmo-sccp, osmo_sua_link_get_user_priv() was renamed to osmo_sccp_link_get_user_priv(). Apply this rename here to fix the build. Change-Id: I09603f5eb983f17c1e4a1232967fc43c7ceea12a
2016-09-27hnbgw: vty conformance: rename iuh 'bind' command to 'local-ip'Neels Hofmeyr3-7/+7
The standard osmo VTY terminology is 'remote-ip', 'remote-port', 'local-ip', 'local-port'. Conform to that. osmo-hnbgw is so far not rolled out widely, so it makes sense to do this now. Change-Id: Ifda2653bf58044552a5f1477cd7008dec3fb9100
2016-09-27log: hnbgw: add hnbap UE context allocation info logNeels Hofmeyr1-0/+3
Change-Id: Iac0ca948d6e699d984c6e424afe7106dcaf2ab1e
2016-09-27hnbap: accept UE Register Requests with TMSI and pTMSINeels Hofmeyr3-4/+130
Add the option to allow UE Register Requests with a TMSI identity. Add VTY command to enable this option, 'hnbap-allow-tmsi'. Add hnbgw_tx_ue_register_acc_tmsi(). HNBGW so far keeps track of UEs that have registered, with their IMSI. When a UE registers with only a TMSI, we obviously can't store an IMSI. However, since we're so far never *using* the list of UEs in osmo-hnbgw, we might as well just accept the TMSI registration and carry on as usual. All that is needed for proper operation is a valid UE context. This is aimed at the ip.access nano3G femto cell, as it apparently feeds whichever identification the UE sends through to HNBAP (TMSI+LAI, pTMSI+RAI), instead of an IMSI as expected. So far this caused failures and the need to make the UE clear its TMSI (wait several minutes or attempt to subscribe to a different network), so that UE registration switched back to IMSI. When simply accepting the TMSI in osmo-hngw, no problems are apparent in our current code state. For example, a Samsung Galaxy S4 seems to send a UE_Identity_PR_tMSILAI (CS identity), and a GT-I9100 seems to send a UE_Identity_PR_pTMSIRAI (PS identity) upon first registration to the network. Recording the IMSI in hnbgw: we could use the subscriber list during paging, to page a UE on only its last seen HNB. On the other hand, it doesn't hurt to anyway always page to all HNBs connected to osmo-hnbgw. The paging procedure does include a page-to-all-HNBs in case the first HNB paging fails. But we must be aware that UEs that register by TMSI will simply not have an IMSI recorded in the list of UE contexts, so a lookup based on IMSI may fail. Patch-by: Harald Welte <laforge@gnumonks.org>, me Change-Id: I87bc1aa3e85815ded7ac1dbdca48f1680b468589
2016-09-27hnbgw: UE context: add handling by tmsi identificationNeels Hofmeyr3-6/+23
To prepare for an upcoming commit that accepts TMSI identification upon UE Register Requests: Add tmsi arg to ue_context_alloc(). Add ue_context_by_tmsi(). This is aimed at the ip.access nano3G femto cell, as it apparently feeds whichever identification the UE sends through to HNBAP (TMSI+LAI, pTMSI+RAI), instead of an IMSI as expected. See the upcoming commit that enables accepting TMSI identities for further detail. Change-Id: I138458443319cc4cbea5ee7906cf5dd72d582130
2016-09-27hnbap: add UE Register Reject for pTMSIRAI identityNeels Hofmeyr1-32/+99
This is aimed at the ip.access nano3G femto cell, as it apparently feeds whichever identification the UE sends through to HNBAP (TMSI+LAI, pTMSI+RAI), instead of an IMSI as expected. Sending a proper registration reject speeds up the response seen on the UE and avoids needless waiting. See the upcoming commit that enables accepting TMSI identities for further detail. Change-Id: I03b69613e6ddd8a08d9358ffc2f74954c231fd2c
2016-09-26log VTY telnet bind only onceNeels Hofmeyr2-3/+0
After libosmocore 55dc2edc89c1a85187ef8aafc09f7d922383231f which outputs 'telnet at <ip> <port>' from telnet_init_dynif(), there's no need to log the telnet VTY bind here anymore. Change-Id: Icd9e670c1d30c156f7bd5d0d34892150aeba95e9
2016-09-22comment: note RAB assignment spec referenceNeels Hofmeyr1-1/+4
Change-Id: Ifef8da82a01cd781ef560d1ec21cbfb23efb1495
2016-09-16ranap: include port in RTP TransportLayerInformationNeels Hofmeyr2-9/+4
Remove an #if 0 to properly include the port information (verified to work). Adjust test expectations. Change-Id: I45fb134959dea9bcdfbfd9d8a061e67c3cc80fb7
2016-09-09jenkins.sh: enable make distcheckNeels Hofmeyr1-2/+1
Change-Id: I967d4de9682cb2a45210f689ec076ef457841179