AgeCommit message (Collapse)AuthorFilesLines
2017-09-19libmgcp: Pass the pointer to the mgcp list on inituser/max/mscsplitDaniel Willmann7-14/+13
Adjusted by Max <> Ticket: SYS#3208 Sponsored-by: On-Waves ehf. Change-Id: I2d51589670bb602422ec98521eec620948752e36
2017-09-19osmo-bsc_nat: Attempt to make bsc_mgcp_find_con aware of multiple MGCPDaniel Willmann3-6/+8
Change-Id: I508562d48e2a0733ea53fe7adaae828286f791a2
2017-09-19osmo-bsc_nat: Handle multiple mgcp configs in SCCP connDaniel Willmann4-6/+12
Change-Id: Ifb6efa8339b749ab588a5ea37f0b48bc8086ae46
2017-09-19osmo-bsc_nat: Handle multiple mgcp configs in MGCP NAT codeDaniel Willmann1-38/+58
Change-Id: Icbf2951cfc550f75580e95a05804e479c59ec1df
2017-09-19osmo-bsc_nat: Modify nat init to work with multiple mgcp_configsDaniel Willmann4-62/+75
Change-Id: I53ac858952ee15f897160b3a32483c5c91b862f6
2017-09-19libmgcp: Allow to get the mgcp_config by numberDaniel Willmann2-9/+10
Adjusted by Max <> Change-Id: I9567b168696bc43c8f74cf0da9a4c647e8bdd822
2017-09-19Add warnings in places missing supportDaniel Willmann5-11/+33
Change-Id: Ic3de69792b2cd8e19cd140402bc1f5fbf9a00021
2017-09-19osmo-bsc_mgcp: support multiple MGCPDaniel Willmann1-11/+14
osmo-bsc_mgcp will still only use the first mgcp instance, but this copes with the API changes in mgcp_parse_config. Adjusted by Max <> Change-Id: I52ea74103acef374212e276dfa8122b00ca4562a
2017-09-19libmgcp: allow multiple MGCP instancesDaniel Willmann3-192/+392
Adjusted by Max <> Ticket: SYS#3208 Sponsored-by: On-Waves ehf. Change-Id: I820839e46f56bdaaf6b05df434829c3eee21e5b9
2017-09-19osmo-bsc_nat: Remove unused MSC elements in struct bsc_natDaniel Willmann1-6/+0
Change-Id: Ied1bdead94ba2737293fb1ac2411771a8b8ffd68 Ticket: SYS#3208 Sponsored-by: On-Waves ehf.
2017-09-19libfilter: Also handle detach indicationsDaniel Willmann2-1/+31
Change-Id: Iad4e2861f42d5275e2b3057ab2bc43ef43b61cfe Ticket: SYS#3208 Sponsored-by: On-Waves ehf.
2017-09-19osmo-bsc_nat: Change the way bsc_nat_msc_is_connected() worksDaniel Willmann4-13/+19
The function now takes a struct msc_config and returns true if that MSC is connected. The vty command show msc connection now shows a line per connected MSC. In bsc_nat.c where osmo-bsc_nat previously hung up on a BSC connection if the (one) MSC was not connected it now checks for the default MSC connection. Change-Id: I95fbe1b8ad6621aba9b4bd6b581abfde0cb31fd0 Ticket: SYS#3208 Sponsored-by: On-Waves ehf.
2017-09-19tests: Test IMSI routing with multiple MSCsDaniel Willmann2-0/+50
Change-Id: Iab46d45aa8ba708282debcd7b9d704fc40e6ff1f Ticket: SYS#3208 Sponsored-by: On-Waves ehf.
2017-09-19osmo-bsc_nat: Implement access lists for MSC connsDaniel Willmann4-1/+85
Use default MSC for BSC's messages. Adjusted by Max <> Change-Id: Iedcf492ff8bb86e7ac68d8909634525e7b0648ea Ticket: SYS#3208 Sponsored-by: On-Waves ehf.
2017-09-19osmo-bsc_nat: Change some functions to work with multiple MSC connsDaniel Willmann2-2/+11
Change-Id: Iab6f23f6f010f34876e37852cafa53e3a641478e Ticket: SYS#3208 Sponsored-by: On-Waves ehf.
2017-09-19osmo-bsc_nat: Support multiple MSCs in VTY/configDaniel Willmann4-68/+119
Adjusted by Max <> Change-Id: I2e9009b52c6ecc17fc2da8402736412b9093ce19 Ticket: SYS#3208 Sponsored-by: On-Waves ehf.
2017-09-19osmo-bsc_nat: Remove MSC IP cmdline optionDaniel Willmann1-8/+0
This no longer makes sense for multiple MSCs Adjusted by Max <> Change-Id: I6f348dd5c7bdb2530081a1d609d03a6b0d13d0b2 Ticket: SYS#3208 Sponsored-by: On-Waves ehf.
2017-09-19osmo-bsc_nat: Add functions for MSC config structDaniel Willmann2-0/+64
Add functions to alloc/find/free MSC config structs. Change-Id: I5879d4d9ee0e1a0a6424ee3e9b214afb07319071 Ticket: SYS#3208 Sponsored-by: On-Waves ehf.
2017-09-19osmo-bsc_nat: Add infrastructure for multiple MSCDaniel Willmann4-0/+29
* add config structs * add vty node Adjusted by Max <> Change-Id: I9cdfc5b32f2500f47be8caaa281bcca3231db5ea Ticket: SYS#3208 Sponsored-by: On-Waves ehf.
2017-09-14libmsc: Log Rx DELIVER-SM RESP before calling gsm411_send_rp_ackKeith1-4/+4
This patch just makes the log match chronologically what is happening. We receive the deliver_sm_resp before we send the RP ACK to the MS. Change-Id: I29270652957f58093be8bf7f2e898b0b4933bd93
2017-09-13libmsc: sms_route_mt_sms() may return uninitialized return valuePablo Neira Ayuso1-20/+21
If smpp_first is set off and there is a local receiver for this sms, then return 0. Without this patch, we return 'rc' which is uninitialized in the scenario that I'm describing above. Change-Id: I0c0bcd919cc3275d491995d17c6a32bb61c6afe1
2017-09-13fix vty tests: vty no longer goes to parent node implicitlyNeels Hofmeyr2-22/+1
Fix four instances of VTY tests working because it used to include implicit 'exit' commands to the parent node. Since libosmocore change-id Id73cba2dd34676bad8a130e9c45e67a272f19588 = commit d64b6aed235f6e4d84a2cb8e84b32c3179260254, we no longer do this implicit-exit in interactive VTY shells. *) the nitb node lacked the default command set (including 'end' and 'exit'), so it was impossible to leave the nitb node. This hit in testSubscriberCreateDelete. Add vty_install_default(NITB_NODE). *) in testPingPongConfiguration, the intention is to enter the /msc 0 node. Drop prior entry of the 'network' node, which looks like an oversight. So far the 'msc 0' caused an implicit 'exit' and thus worked, now fails. *) Two instances following comments "# Check searching for outer node's commands", which look like they are intended to check for this implicit-exit behavior. This is obsolete, drop those parts of the tests. Change-Id: I77931d6a09c42c443c6936000592f22a7fd06cab
2017-09-11libmsc: annotate esme route in the sms object from deliver_to_esme()Pablo Neira Ayuso2-3/+12
Annotate this esme route, so we can use it to return -EINPROGRESS to skip sending premature RP-ACK to the mobile station, in case we're handling sms routes through SMPP. Now that we have this information in place, we use it wherever possible to avoid kludgy checks on sms->receiver. sms_free() already releases references to this object, so we should be fine with this. Fixes: 4e5b90a594f9 ("libmsc: remove 'deferred' parameter in sms_route_mt_sms()") Change-Id: Ib8a8fd9bbb0d3b6aff7931e4bacbea99d000e484
2017-09-05Make use of to use dependency artifacts for builds.André Boddenberg1-46/+45
Change-Id: I8a2ff700bbe3806bb2c1d561c6f2249fae3d8dd8 Note: this patchset depends on
2017-09-04handover_decision: Fix condition for power budget handover attemptIvan Kluchnikov1-1/+1
Handover attempt for power budget case should be performed every N SACCH frames, where N = Power Budget Interval. First measurement report with mr->nr = 0 was used for the first handover attempt in this case, which is not correct, because first usable report should have mr->nr = net->handover.pwr_interval-1. Moreover using the first measurement report with mr->nr = 0 for handover attempt could lead to unnecessary handover, because usually av_rxlev for first measurement report from MS is worse than for following reports. Change-Id: If7f54a4cb179eaa9e5eb147b9477633ac618e69e
2017-08-30SI13: drop PBCCH-related bitsMax3-69/+20
According to 3GPP TS 44.018 §1.8 the "network shall never enable PBCCH and PCCCH". Change-Id: I319e71a4b0c682361529e9c21377398a826b934b Related: OS#2400
2017-08-29Use release helper from libosmocoreMax2-0/+7
See for details. Change-Id: I460fd73230facbba3e326214e46c0b98b7491628 Related: OS#1861
2017-08-28Remove common_cs.h from .debMax1-1/+0
It's not required by gsm_data_shared.h anymore. Change-Id: I22004af84244936ca431f3bf901059f366be8bca Related: OS#2272
2017-08-27Use verify_value_string_arrays_are_terminated from osmo-ciHarald Welte1-3/+2
verify_value_string_arrays_are_terminated has recently been moved from libosmocore.git to osmo-ci.git and the person doing this seems to have forgotten to update openbsc.git Change-Id: Ibe4a7f71d2557dfee94803e909dabb00d2ce10af
2017-08-21Revert "factor out & introduce struct gsm_encr, in common_cs.h"Neels Hofmeyr2-11/+6
This reverts commit ac1f1436e9d380f632dd850fcd253d3480f0fc2d. common_cs.h added to gsm_data_shared.h was a mistake, i.e. I added the dependency by accident. Including common_cs.h in the debian installation may have seemed like the logical consequence but was not intended. AFAICT for osmo-msc, the need for struct gsm_encr is obsoleted by libvlr, gsm_encr will only be used in osmo-bsc and can just stay an inline struct. Related: OS#2272 Change-Id: I15d60441c6c6f053486c0482258a8759bdd92df1
2017-08-20Treat SIGTERM just like SIGINT in our programsHarald Welte5-0/+10
When somebody kills the process, it's best to handle the signal and to use the opportunity for some cleanup. We always did this in the NITB on SIGINT, but never on SIGTERM. Let's change it. Change-Id: Iea6804325a6575ceab5edfd28dd20249462f143b
2017-08-18NITB: remove 'help' output about '-a' option that is removed for agesHarald Welte1-2/+0
This option was present in very early versions of the NITB, but at least since 2011 it is no longer supported. It's still listed in --help output, which is wrong. Change-Id: I1d2cceb588ec5fb34ec5e2c05a7d8c93310bee88
2017-08-18libmsc: Use actual delivery time in delivery reports.Keith3-2/+4
Set the time on the status report to the time the message was delivered, as this may not be the same as the time when we are delivering the report to the originating MS. Change-Id: I9056429d40bf02731f004b7833f1de45a0d1add8
2017-08-18gbproxy: log signal value as textMax1-6/+4
Change-Id: I6ed923f5c60a8d64305f4b8e90d1362d6510e1c5
2017-08-18gbproxy: log unhandled BSSGP PDU as textMax1-2/+1
Change-Id: Ibe3c8bd353b3a178e26b0936f25b2e1959f9990c
2017-08-18libmsc: Fix wrong handling of user_message_reference parameterPau Espin Pedrol1-2/+2
libsmpp34 already converts received TLV integer values to native endianess in libsmpp34_(un)pack. Converting them again at receive time swaps the 2 bytes of user_message_reference, then using a wrong value. As GSM03.40 spec uses only 1 byte for the id, then only the high byte of the initial value is used and eventually sent back to the ESME. Again, at that time, htons() is not needed because libsmpp34 already handles that part. See OS-#2429 for more details. Change-Id: If748548a4a223e529a1110c89e483b599b406e8b
2017-08-16smpp: Fix compilation warningPau Espin Pedrol1-1/+1
I already stumbled into 2 compilation environments which had Werror enabled for -Wmaybe-uninitialized and the build failed, so let's workaround this warning. | smpp_openbsc.c: In function 'handle_smpp_submit': | smpp_openbsc.c:216:9: error: 'sms_msg_len' may be used uninitialized in this function [-Werror=maybe-uninitialized] | memcpy(sms->user_data, sms_msg, sms_msg_len); | ^ | smpp_openbsc.c:100:15: note: 'sms_msg_len' was declared here | unsigned int sms_msg_len; | ^ | cc1: some warnings being treated as errors Change-Id: I0901ddadb5f72e1585cb1797ac22c8ab95e83146
2017-08-16sgsn_test: Fix wrong definition of wrap funcPau Espin Pedrol1-5/+5
Commit 058cd573d8 added 2 new pointer parameters to gprs_subscr_request_auth_info, but forgot to update wraps of the function in sgsn_test. I catched this today because openbsc build test sgsn_test was failing. Closed look up to the logs showed: Assert failed (auts != NULL) == (auts_rand != NULL) openbsc/openbsc/src/gprs/gprs_subscriber.c:791 Change-Id: Ie9e4af6da0339536fb20ca0b7bbcf6f485bd522c
2017-08-15LIBMSC: Use sms->text, not sms->user_data to construct report bodyKeith1-1/+1
gsm_04_11.c sms_report_alloc() Use the sms->text, not the sms->user_data to construct the report body. This also prevents the potential output of non printable characters to the log and or vty. Change-Id: Id51bc9483ad6f52d6da74135605cfd12434c7c96
2017-08-15LIBMSC: Place correct dst address in status reportKeith1-1/+1
gsm_04_11.c: gsm340_gen_sms_status_report_tpdu() When we construct the status report PDU, use sms->src instead of sms->dst as the destination address This way we tell the MS that the message was delivered to the destination and not to itself. This is relevant for phones that display a textual representation of the delivery report. Change-Id: I2d4f87ac777465de9bfb5a775a789a2691755ee9
2017-08-15libmsc: use SMPP34_DELIVERY_RECEIPT_* in libsmpp34Pablo Neira Ayuso1-7/+1
Use new definitions in libsmpp34 to set the registered_delivery field accordingly, as provided by I5b3afff1b3b77cccd949e0606914c7ac3ba6114c. Moreover, do not set this header field to zero if status reports are off, the deliver_t structure has been already zeroed so this not required. Change-Id: Ie78e17323796120f576b9c0e1bc5ccc32da8ee12
2017-08-14increase libsmpp34 version requirement to 1.12Harald Welte1-1/+1
Only 1.12 contains some of the #defines that we're using with recent commits. Change-Id: I3743b10a1a5d2f1d42a61204273c1d00dc22b600
2017-08-14Migrate from gprs_apn_to_str() to libosmocore osmo_apn_to_str()Harald Welte11-148/+19
In 2015, Jacob moved/copied related functions to libosmocore, but for some reason didn't remove the copies here. Let's follow-up on that and remove duplicated code. The libosmocore commit introducing osmo_apn_to_str() was 8114294bf29ac6e44822c0ae43d4b0819f11b022 Change-Id: I7315ffcbed8a54cca2056f313bb7783ad82d0ee9
2017-08-14sgsn_vty: Don't assume pdp->lib is always validHarald Welte1-14/+16
We can only print libgtp pdp information if a library context is attached to this pdp context. This is not always the case, particuarly during some teardown scenarios. Change-Id: Ia3184877f9709db65f5f93a98403f2ef5b04a8ca
2017-08-14Fix gsm_pchan2chan_nr() to use RSL_CHAN_OSMO_PDCHHarald Welte2-2/+5
When converting from GSM_PCHAN_PDCH, we should generate a RSL channel number IE with the osmocom extension RSL_CHAN_OSMO_PDCH rather than claiming it is a regular TCH/F channel. This is important as this function is used by osmo-bts, too - and it decides which channel number IE is put in the GSMTAP header for both GSMTAP tracing as well as the GSMTAP based osmo-bts-virtual. In order to avoid any unintended effect on libbsc, we make sure to modify rsl_ipacc_pdch_activate() to always use GSM_PCHAN_TCH_F in related RSL message. Change-Id: Ie34219e64a6d89da4a79f2db8ec73d1909fb8280
2017-08-14SGSN: Fix RAN information exposed on GTP during PDP CTX CREATEHarald Welte1-4/+14
In the PDP Context Create from SGSN to GGSN, we include information about the RAN type (GERAN/UTRAN) and the Cell of the MS. This was all hard-coded to GERAN, and wasn't updated when we added UTRAN support to the SGSN. Change-Id: I6c79e42c5e08b28fe8182555302a5505fbbaa313
2017-08-14mgcp: Fix uplink activation of Osmux streamPau Espin Pedrol1-2/+4
Commit 575420637981828b64c1292ada015d7170b89390 introduced OSMUX_STATE_NEGOTIATING to fix a race condition present in osmo-bsc_nat. However, after this change osmo-bsc_mgcp cannot switch to OSMUX_STATE_ACTIVATING anymore, which means during osmux_send_dummy time it won't call osmux_enable_endpoint(), which in turn won't set endp type to MGCP_OSMUX_BSC. If MGCP_OSMUX_BSC is not set, uplink streams are sent using regular RTP instead of Osmux not matter it is enabled in config or not. Change-Id: Ibcb59aa1ca25408f82cc88c2d5b81177b5f276dc
2017-08-13handover_logic: set correct link to bts for subscriber_connection in case of ↵Ivan Kluchnikov1-0/+1
moving this connection to another bts In case of successful completion of handover gsm_subscriber_connection could be moved from one bts to another, so connection link to bts should be replaced by link to bts, which owns new_lchan. This bug was detected, because conn->bts->nr is used in call control log messages and wrong number of bts was observed in these messages after handover. Change-Id: Idc7dd412b7580c451e716b73ef7549826c60b0d9
2017-08-13mgcp_osmux: Remove unused parameterPau Espin Pedrol2-8/+4
Change-Id: Icb1e7cb15fe04642578f5292124ebc1eac9c9aa3
2017-08-13libcommon: Fix log output for bts>0.Alexander Chemeris6-10/+44
Fixes regression probably introduced in c696cc28. For bts>0 logging doesn't show bts number correctly when printing lchan identification string - it will always show it as "bts=0". The reason for this is that the identification string is cached before bts->nr value is set to a proper value. This patch sets bts->nr as part of the first step of the bts structure initialization, before caching happens thus making sure the cached identification string is cached with the correct values. Change-Id: I61c18a7f021fcb1ec00d34a745f4e3ab03416c2d