aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src
AgeCommit message (Collapse)AuthorFilesLines
2017-09-15libmgcp: Pass the pointer to the mgcp list on init, don't copy itusers/daniel/ow-nat-msc-connsDaniel Willmann5-11/+11
Change-Id: I2d51589670bb602422ec98521eec620948752e36
2017-09-15libmgcp: Fix mgcp instance argumentDaniel Willmann1-2/+2
Change-Id: I47e5b6fbcf0981699b330030de92f209fc4bb25a
2017-09-08osmo-bsc_nat: Add missing return code for VTYDaniel Willmann1-0/+1
Change-Id: I12b421e970317c604ac8cc2f3c94ff5fdbc3f048
2017-09-08osmo-bsc_nat: Attempt to make bsc_mgcp_find_con aware of multiple MGCPDaniel Willmann1-4/+5
Change-Id: I508562d48e2a0733ea53fe7adaae828286f791a2
2017-09-08WIP: Add missing linesDaniel Willmann1-3/+3
Change-Id: I353502ed27fc1eb828169a4aaccaf04593eacdd8
2017-09-08osmo-bsc_nat: Handle multiple mgcp configs in SCCP connDaniel Willmann2-2/+6
Change-Id: Ifb6efa8339b749ab588a5ea37f0b48bc8086ae46
2017-09-08osmo-bsc_nat: Handle multiple mgcp configs in MGCP NAT codeDaniel Willmann1-38/+58
Change-Id: Icbf2951cfc550f75580e95a05804e479c59ec1df
2017-09-08osmo-bsc_nat: Modify nat init to work with multiple mgcp_configsDaniel Willmann3-58/+68
Change-Id: I53ac858952ee15f897160b3a32483c5c91b862f6
2017-09-08libmgcp: Allow to get the mgcp_config by numberDaniel Willmann1-9/+9
Change-Id: I9567b168696bc43c8f74cf0da9a4c647e8bdd822
2017-09-08Add warnings in places missing supportDaniel Willmann4-9/+27
Change-Id: Ic3de69792b2cd8e19cd140402bc1f5fbf9a00021
2017-09-07osmo-bsc_mgcp: Make it work with the changes supporting 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. Change-Id: I52ea74103acef374212e276dfa8122b00ca4562a
2017-09-07libmgcp: Make it possible to define more than one MGCP instanceDaniel Willmann2-191/+380
Change-Id: I820839e46f56bdaaf6b05df434829c3eee21e5b9
2017-08-24WIPDaniel Willmann1-1/+2
Change-Id: If40b0bd51773b1658f744063be418c024a781e11
2017-08-24libfilter: Also handle detach indicationsDaniel Willmann1-0/+29
Change-Id: Iad4e2861f42d5275e2b3057ab2bc43ef43b61cfe Ticket: SYS#3208 Sponsored-by: On-Waves ehf.
2017-03-15osmo-bsc_nat: Change the way bsc_nat_msc_is_connected() worksDaniel Willmann3-12/+18
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-03-15osmo-bsc_nat: Have a default MSC for messages from BSCDaniel Willmann3-3/+26
Change-Id: I343e6d9d17bcde6dbdf8f48b7b51e998a296680c Ticket: SYS#3208 Sponsored-by: On-Waves ehf.
2017-03-15osmo-bsc_nat: Implement access lists for MSC connsDaniel Willmann3-1/+55
Change-Id: Iedcf492ff8bb86e7ac68d8909634525e7b0648ea Ticket: SYS#3208 Sponsored-by: On-Waves ehf.
2017-03-15osmo-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-03-15osmo-bsc_nat: Support multiple MSCs in VTY/configDaniel Willmann3-67/+118
Change-Id: I2e9009b52c6ecc17fc2da8402736412b9093ce19 Ticket: SYS#3208 Sponsored-by: On-Waves ehf.
2017-03-15osmo-bsc_nat: Add functions to alloc/find/free MSC configDaniel Willmann1-0/+59
Change-Id: I5879d4d9ee0e1a0a6424ee3e9b214afb07319071 Ticket: SYS#3208 Sponsored-by: On-Waves ehf.
2017-03-15osmo-bsc_nat: Add infrastructure for multiple MSC connectionsDaniel Willmann2-0/+13
Add some common defines and structs Change-Id: I9cdfc5b32f2500f47be8caaa281bcca3231db5ea Ticket: SYS#3208 Sponsored-by: On-Waves ehf.
2017-03-15osmo-bsc_nat: Remove MSC IP cmdline option. This no longer makes sense for ↵Daniel Willmann1-8/+0
multiple MSCs Change-Id: I6f348dd5c7bdb2530081a1d609d03a6b0d13d0b2 Ticket: SYS#3208 Sponsored-by: On-Waves ehf.
2016-11-14gbproxy: Check whether gbproxy_update_link_state_after() deletes the link_infoDaniel Willmann2-12/+26
In case the link_info is deleted we have to stop handling the stored messages inside link_info. Not doing so can lead to invalid memory being accessed. Change-Id: Ieb8503e9e94e7a5ac450ad8aa1713ec4f21cdea5 Ticket: OW#3049 Sponsored-by: On-Waves ehf
2016-11-02SGSN: Use dummy all-zero MSISDN value in PDP Context Act on GTPHarald Welte1-1/+14
The GTP protocol specification requires us to include the MSISDN IE in all non-secondary PDP context activations. However, when no real HLR is used (e.g. via GSUP), we do not have the MSISDN information available and so far simply sent a zero-length MSISDN IE in GTP. The latter is a violation of the spec. So to resolve this, we now send a 15-digit all-zero dummy MSISDN IE, as described in TS 23.003. Change-Id: I8d0a5d52d6cd2a00b5dda060bd41d45056dfa84d
2016-06-29osmux: Add negotiation state so race conditions can't disable osmuxDaniel Willmann2-5/+6
Change-Id: Id624b0279aee5e2412059a10296ce7896e2d4628
2016-05-26filter/nat: Fix the context for the imsi assignmentHolger Hans Peter Freyther1-1/+1
In c09f8a3b7fb94ccef41e33c32bfe2bff1ffe0e44 as part of a cleanup I accidently changed the talloc context from "con" to "bsc". The issue occurred at an earlier commit when assigning req.ctx to the "wrong" context. The allocation needs to be scoped by the struct nat_sccp_connection and not the connection from BSC to NAT. Before we have a nat_sccp_connection we scope the copied imsi to the bsc_connection and then steal it, but for the identity resp we will always have a nat_sccp_connection and can already use the right context. [Backported from master] Change-Id: I53789aad2809e19338ad3b2deb72c4757e7bd524 Related: OS#1733 Reviewed-on: https://gerrit.osmocom.org/102 Tested-by: Jenkins Builder Reviewed-by: Harald Welte <laforge@gnumonks.org> Reviewed-by: daniel <dwillmann@sysmocom.de> Reviewed-by: Holger Freyther <holger@freyther.de>
2015-12-17gbproxy: Fix stored msgbs in gbproxy_flush_stored_messagesJacob Erlbeck1-1/+1
Currently the last message received is patched with the meta information of each stored message. This can lead to invalid memory accesses. This commit replaces msg by stored_msg in the call to gbproxy_patch_bssgp. Note that the fix has not been validated by unit tests yet. Addresses: Program received signal SIGSEGV, Segmentation fault. #0 memmove () at ../sysdeps/i386/i686/memmove.S:68 #1 0x08052ee9 in gprs_msgb_resize_area at gprs_utils.c:99 #2 0x0804f4de in gbproxy_patch_apn_ie at gb_proxy_patch.c:108 #3 0x0804f7cd in gbproxy_patch_llc at gb_proxy_patch.c:253 #4 0x0804f9cb in gbproxy_patch_bssgp at gb_proxy_patch.c:348 #5 0x0804abf5 in gbproxy_flush_stored_messages at gb_proxy.c:347 Ticket: OW#1550 Sponsored-by: On-Waves ehf
2015-11-30sgsn: Do not die in _bssgp_tx_dl_ud on TLLI mismatch (TODO)Jacob Erlbeck1-9/+20
Currently an OSMO_ASSERT fails, if the message's and the mmctx's TLLIs do not match. This commit turns the assertion into an ERROR log message and uses the default values for IMSI, DRX, and RA CAP instead of the MM context values in this case. TODO: - find the real source for the problem - add test cases derived from what is being described in the ticket Ticket: OW#1322 Sponsored-by: On-Waves ehf
2015-11-30sgsn: Add logging to connect_timer_cb (TODO)Jacob Erlbeck1-0/+3
TODO: - LOGLevel ? Sponsored-by: On-Waves ehf
2015-11-26gtphub: remove another obsolete comment.Neels Hofmeyr1-69/+0
2015-11-24gtphub: fix ares segfault: add missing initialization.Neels Hofmeyr1-0/+2
The struct gtphub_resolved_ggsn was not initialized properly, so that adding it to a list caused a segmentation fault.
2015-11-21Fix compilation with no libc-ares present on the systemHarald Welte1-2/+1
This build failure was introduced with the OAP and gtphub changes.
2015-11-20vty: Print NCC/BCC and not just integer value of BSICHarald Welte1-1/+2
2015-11-20Fix TSC/BSIC handling bug and remove bts->tscHarald Welte5-31/+11
This fixes a bug in the following circumstances: * BSIC is set to 0 in the config file * No TSC is explicitly specified at the BST level in the config file In this case, we ended up using BSIC=0 and TSC=7, as TSC=7 is our default initialization value. The TSC of the CCCH/BCCH must always be the BCC, which is the lower 3 bits of the BSIC. Having configuration options for both the BSIC _and_ the TSC at the BTS level therefore makes no sense, as it only adds ways in which users can configure non-oprational configurations. So we remove the bts->tsc member, and keep only the ts->tsc members that allow us to configure a timeslot-specific TSC that's different from the BTS TSC (= BCC).
2015-11-20meas_db.c: fix compiler warningsHarald Welte1-0/+1
s_db.c: In function ‘_insert_ud’: meas_db.c:65:6: warning: implicit declaration of function ‘rxlev2dbm’ [-Wimplicit-function-declaration] rxlev2dbm(ud->full.rx_lev))); ^
2015-11-20gtphub: fix echo reply to SGSNs: wrong fd. Add test.Neels Hofmeyr1-1/+1
The actual fix is just one character, but also add a regression test against this, on both CTRL and USER plane.
2015-11-18gtphub: fix three oversights (thanks to coverity).Neels Hofmeyr1-5/+3
- an unnecessary if-not-NULL check (1339764); - a missing nul termination safety net (1339768); - a typo resulting in the wrong proxy being logged (1339767). Sponsored-by: On-Waves ehi
2015-11-18gtphub: fix fatal log msg for SGSN proxy.Neels Hofmeyr1-1/+1
While reworking the logging, a stray comma found its way into the code. Fixes coverity 1339765. Sponsored-by: On-Waves ehi
2015-11-18gtphub: fix gtphub_read() semantics.Neels Hofmeyr1-9/+7
gtphub always wants to know the sender, hence make the from_addr pointer mandatory. Fixes two coverity complaints (1339766, 1339764). Sponsored-by: On-Waves ehi
2015-11-16gtphub: cosmetic: break long lines.Neels Hofmeyr2-61/+116
Fit most of the code in 80 chars width. Some instances still leak past 80 characters because of long function names, inline comments or the like, "the exception proves the rule." Sponsored-by: On-Waves ehi
2015-11-16gtphub: review log levels, add level arg to LOG().Neels Hofmeyr1-141/+133
For maintenance, it is convenient to have the log level explicit at each log statement. Tweak some log levels / message formatting while at it. Sponsored-by: On-Waves ehi
2015-11-16gtphub: add logging labels to bind struct.Neels Hofmeyr1-1/+7
Allow logging the plane (Ctrl/User) and side (SGSN/GGSN) in functions that only have a gtphub_bind* to work with, by adding a constant label to each bind. Sponsored-by: On-Waves ehi
2015-11-16gtphub: don't always try to do GGSN resolution.Neels Hofmeyr2-29/+8
If a GGSN is already known from unmapping, don't invoke a host resolution. In a live working environment, it wouldn't hurt, because the lookups would mostly return from the cache. But in a testing environment without a name server, it barfs on every packet. Sponsored-by: On-Waves ehi
2015-11-16gtphub: fix numerous segfaults, and other stupidities.Neels Hofmeyr2-6/+7
Initialize llist_heads to empty (2 were missing). Move those for struct gtphub instances to gtphub_zero() (one moved, one added). In from_[gs]gsns_read_cb(), use a return type that can actually reflect negative return values. resolved_addr.buf: no need to take the address of a byte array var (cosmetic). Pass the proper user data address to sgsn_ares_query(), not the address of the pointer holding the user data address. Initialize ggsn_lookup->expiry_entry (was missing). Publish the function for that in gtphub.h so gtphub_ext.c can use it. Sponsored-by: On-Waves ehi
2015-11-16gtphub: Add logging for ares queries.Neels Hofmeyr2-15/+28
Looking for a segfault, I added a lot of logging. This may be useful for live testing ares, leaving it in there for now. Note: I still want to clean up the logging concerning log levels etc. once we're out of alpha. Sponsored-by: On-Waves ehi
2015-11-16gtphub: fix handling of sender from nonstandard port.Neels Hofmeyr1-3/+35
Allow a peer sending from an unknown port but a known address, and just create the port (and unmap the seq nr back to this port later to return the response to the sender). Only an SGSN on the Ctrl plane is allowed to make the very first contact from an unknown address. Sponsored-by: On-Waves ehi
2015-11-16gtphub: fix User plane decoding, add unit test.Neels Hofmeyr1-16/+37
Split decoding return code GTP_RC_PDU in GTP_RC_PDU_C and GTP_RC_PDU_U. Don't do IEs in GTP_RC_PDU_U. Add a unit test for User plane data, expected to fail (nonstandard port case). In gtphub_test.c, tweak logging so that it is easily visible which test produced which output. Also add the global resolved_sgsn_addr and ggsn_sender, symmetrically to resolved_ggsn_add and sgsn_sender. Sponsored-by: On-Waves ehi
2015-11-16gtphub: make test code reusable for future tests.Neels Hofmeyr1-2/+0
Generalize to make the PDP ctx message definitions and "sending" of messages from SGSN->gtphub->GGSN and back reusable in future tests. Publish gsn_addr_from_sockaddr() in gtphub.h for use in gtphub_test.c. Use an osmo_sockaddr for resolved_ggsn_addr, because one is needed for comparison in probably every future test. Add LVL2_ASSERT() to print assertion message and return instead of abort, so that functions can be called from several tests without losing the info of which test caused it from which line. Use globals for struct gtphub and time_t now, to reduce nr of args that need to be passed around when writing tests. Add a default test setup function. Sponsored-by: On-Waves ehi
2015-11-16gtphub: add/fix IMSI and APN IE error handlingNeels Hofmeyr2-22/+72
Sponsored-by: On-Waves ehi
2015-11-16gtphub: fix Echo behavior: respond directly.Neels Hofmeyr1-27/+59
Up to now I used the Echo as a test for sequence nr mappings. But Echos should be handled differently: they are scoped on the link and an Echo response should be sent right back to the requester. Sponsored-by: On-Waves ehi