aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc
AgeCommit message (Collapse)AuthorFilesLines
2016-02-29minor commentNeels Hofmeyr1-0/+1
2016-02-29osmo_bsc_filter.c: add fixme noteNeels Hofmeyr1-0/+3
2016-02-25enable ctrl bind config for various programsNeels Hofmeyr1-1/+9
Add ctrl_vty_init() calls and feed the ctrl_vty_get_bind_addr() return value to ctrl_interface_setup() in the following programs: osmo-bsc osmo-bsc_nat osmo-nitb osmo-sgsn For osmo-sgsn, move the control interface setup invocation below the config parsing, so that the ctrl_vty_get_bind_addr() can return the configured address.
2016-02-24osmo-bsc: fix checking wrong pointer for ctrl setup successNeels Hofmeyr1-1/+1
2016-01-30gsm0408: Provide unique strings for the gsm 04.08 messageHolger Hans Peter Freyther1-1/+1
At Rhizomatica we see that some GSM 04.08 messages are leaked and have no other indication if that is Call Control, SMS or something else.
2016-01-15bsc/vty: Provide a hint of available inputHolger Hans Peter Freyther1-1/+1
2015-11-02stats: Enable stats for sgsn, gbproxy, nitb, bsc, natJacob Erlbeck1-0/+2
This commit initialises and enables the stats subsystem for the given binaries. Sponsored-by: On-Waves ehf
2015-10-02amr: Attempt to unbreak the AMR support in the BSCHolger Hans Peter Freyther1-11/+25
The signature of mr_config and the BSC implementation didn't match and the compiler was warning about it: osmo_bsc_api.c:530:2: warning: initialization from incompatible pointer type .mr_config = bsc_mr_config, ^ osmo_bsc_api.c:530:2: warning: (near initialization for ‘bsc_handler.mr_config’) Change the mr_config again and provide an implementation that will set the ms and bts data structure. It would be better to put the size outside of the IE but I am not going to change it right now. It would also be nice to either move the AMR setting into the "nitb" structure or have the msc data be used _after_ the bts settings. This needs to be cleaned up in the next step. Manually verified by placing a MO call and checking that both the channel mode modify and the mode modify request contain the multi rate config with the rate mr config (length two bytes, version 1, icmi==1, no start mode being set).
2015-09-24vty: Change the return type from enum to intHolger Hans Peter Freyther1-1/+1
clang complained that different enums are mixed with the return type and we actually want this to be an int now.
2015-08-18GSM/GPRS 04.08: Don't print numeric mobile identity typesHarald Welte1-2/+2
I guess none of our users knows what a mi_type=0x02 is, but most would know what an IMSI or a TMSI is. So let's use the newly introduced gsm48_mi_type_name() function to fix this.
2015-07-13bsc: Rename core_ncc to core_mncHolger Hans Peter Freyther4-8/+8
Struct osmo_msc_data contains int core_ncc, which is actually the MNC part of the PLMN, not to be confused with the Network Colour Code. The following patch renames this field for clarity and consistency with the standards.
2015-07-01bsc: Check for the rand and then generate a resHolger Hans Peter Freyther2-4/+83
Check if the NAT has sent 16 bytes of RAND and if a key has been configured in the system and then generate a result using milenage. The milenage res will be sent and noth the four byte GSM SRES derivation.
2015-07-01bsc/nat: Fix the structure of the identity request messageHolger Hans Peter Freyther1-1/+1
Unfortunately the basic structure of the response is broken. There is a two byte length followed by data. The concept of a 'tag' happens to be the first byte of the data. This means we want to write strlen of the token, then we want to write the NUL and then we need to account for the tag in front. Introduce a flag if the new or old format should be used. This will allow to have new BSCs talk to old NATs without an additional change. In the long run we can clean that up.
2015-06-19Fix build wrt. missing CFLAGS constituentsAndreas Rottmann1-1/+1
When libosmo-netif and/or libosmo-abis are installed in distinct prefixes, the build failed with non-found headers.
2015-06-15bsc: Attempt to fix crash when sending a SCCP CREF messageHolger Hans Peter Freyther1-1/+1
There was no context for the SCCP CREF message and this means that the msc_con was a plain NULL pointer that was dereferenced and the application would crash. Use the new API to pass the incoming MSC Connection which sould be used for the SCCP CREF message as context. The code has not been fed with an actual SCCP CR message.
2015-05-17Replace ad-hoc function with generic one from libosmocoreMax1-12/+2
Signed-off-by: Max <max.suraev@fairwaves.co>
2015-05-03bsc: Send a LU Reject in case it has been filteredHolger Hans Peter Freyther1-8/+42
In case we filter the request and it was a Location Updating Procedure we should reject it.
2015-05-03bsc: Add access list filtering to the BSCHolger Hans Peter Freyther2-3/+60
2015-05-03bsc: Add access lists to the MSC and the BSCHolger Hans Peter Freyther3-2/+72
It is a bit arbitary to decide which one is the global and which one is the local one. We might change it around. I don't think we want to introduce it based on BTS.
2015-05-03filter: Move the con_type into the filter_stateHolger Hans Peter Freyther1-0/+1
2015-04-01bsc: Change paging strategy based on override or notHolger Hans Peter Freyther1-6/+16
Change the paging strategy based on on if a LAC override is in place or not. In case we had changed the LAC we need to page on all the BTS. Change the "grace" handling to iterate over the BTS and filter out all non matching ones LAC in case no LAC handling is active. Manually verified all four cases with a single BTS: * No LAC handling and grace period * LAC handling and grace period * No LAC handling and not lock * LAC handling and lock. Related: SYS#1398
2015-04-01bsc: In preparation to the MT lac/ci patching split the codeHolger Hans Peter Freyther1-11/+21
For MT we can't page per lac as we don't know which BTS was the original one. Split the grace period and normal mode into two methods so we can bloat both of them later.
2015-04-01bsc: Allow to use different LAC/CI for the core-networkHolger Hans Peter Freyther4-6/+66
We need to use different LAC/CI towards the core network. It is a bit problematic as LAC/CI is a per BTS attribute so this feature only works if a BSC manages everything in the same LAC. Related: SYS#1398
2015-02-10nitb: Move the rf-lock commands from osmo-bsc to libbscHolger Hans Peter Freyther1-86/+0
The bts.0.rf-state and rf_locked command have been moved from the osmo-bsc binary to libbsc. All tests continue to pass.
2015-01-02logging: Only compare the subscr addressHolger Hans Peter Freyther1-0/+29
Move the "logging filter imsi IMSI" into the BTS/NITB code to allow to set the gsm_subscriber and only compare it. This way we simply compare the subscriber address and don't have to care if the subscriber data is still valid.
2014-12-05msc: Add and use gsm_subscriber_groupJacob Erlbeck3-6/+8
Currently every subcriber object directly refers to the gsm_network which contains a flag shared by every related subscriber (keep_subscr). This adds a dependency on gsm_network even if only the function defined in gsm_subscriber_base.c are used. This patch adds a new struct gsm_subscriber_group which contains the keep_subscr flag and a back reference to the network object. The latter is not dereferenced in gsm_subscriber_base.c, so it can safely be set to NULL when only that part of the gsm_subscriber API is being used. It also changes that API to use gsm_subscriber_group instead of gsm_network parameters. Since there are some places where a pointer to the gsm_network is needed but where only a gsm_subscriber is available, a 'net' back pointer is added to the group struct, too. Nevertheless subscr group and network could be separated completely, but this is not the topic of this commit. Sponsored-by: On-Waves ehf
2014-10-29bsc: Allow to disable sending ping/pong to the MSCHolger Hans Peter Freyther3-8/+31
Some switches do not like to receive the IPA PING/PONG messages. Allow to disable the handling with "no timeout-ping" and create test cases that verify the switching between the modes. Change the code to trat <= 0 as an invalid timeout. Fixes: SYS#713
2014-10-02bsc: Let the VTY verify that the timeout is a numberHolger Hans Peter Freyther1-2/+2
Before the old code allowed to specify "timeout-ping bla" which would be parsed as '0' which would trigger a flood of pings. Use the VTY code to parse it as a number.
2014-09-05bsc: Add a "IPA PING" to the SCCP CR messagesHolger Hans Peter Freyther4-12/+83
We want to reduce the background traffic and might set the ping interval to be in the range of minutes. But this means that if the TCP connection is frozen several "SCCP CR CM Service Requests" will be stuck in the send queue without ever being answered. I could have used the logic of not receiving the "SCCP CC" to close the connection but instead I am introducing an overload to schedule the ping as part of the normal SCCP connection establishment. The VTY write case has been manually verified, I have also looked at a single trace to see that the SCCP CR and the IPA PING is transfered in the same ethernet frame.
2014-08-24Use port number #defines for VTY and CTRL portsHarald Welte1-1/+2
.. as defined in libosmocore
2014-08-21libctrl: Move bulk of node lookup code into libosmocoreHarald Welte1-1/+1
Now that the bulk of the control interface node lookup has no reference to the BSC specific data structures, we are moving it into libosmocore. A control interface user now only registers an optional small node lookup function like bsc_ctrl_node_lookup()
2014-08-21move libctrl from openbsc to libosmoctrl (libosmocore.git)Harald Welte4-8/+9
2014-08-20adopt recent IPA related symbol renameHarald Welte1-3/+3
... which happened during recent migration of IPA functionality from libosmo-abis into libosmocore.
2014-08-08bsc: Add a ctrl command to send a ussdNotify for a callHolger Hans Peter Freyther2-4/+79
Send a non-call related SS message for an active call indentified by the CIC of that call. As an ugly hack the order of the SS release and the invocation are changed. That was necessary for the E71 on a TCH. The time between notify and release was just too short. The right would be to wait for the returnResultLast but this would involve keeping more local state. Let's see how far we get here. It might be necessary to change the order in the other call sites as well.
2014-07-09bsc: Implement a way to relay a message to the remote MSCHolger Hans Peter Freyther1-0/+41
This is analogue to the notification that is relayed locally and now we have a way to relay a message back to the network.
2014-07-08bsc: Use the word core network and not backbone.Holger Hans Peter Freyther1-2/+2
2014-07-07libbsc, osmo-bsc{, _nat}: Prevent unaligned access when casting TLVP_VALDaniel Willmann1-1/+1
foo = *((uintXX_t *) TLVP_VAL(...) can lead to unaligned access. To prevent that use tlvp_valXX_unal() to get the values.
2014-06-12bsc: Do not use strdup on argv parameterHolger Hans Peter Freyther1-1/+1
Fixes: Coverity CID 1206578
2014-05-31bsc: Introduce a local notification scheme for the CTRL interfaceHolger Hans Peter Freyther1-0/+44
Make it possible to inform local CTRL connections about some state. The TRAP will be only sent to local connections. The notification text may not contain spaces.
2014-05-15ctrl: Introduce a macro for read-only attributes and use itHolger Hans Peter Freyther1-35/+3
Certain attributes are read-only. Add a macro to make it more easy to define those.
2014-05-06nat/bsc: Check proto before calling ipaccess_rcvmsg_baseHolger Hans Peter Freyther1-1/+1
The code in the BSC/NAT called ipaccess_rcvmsg_base without checking if the protocol is IPA. This lead the BSC to respond to SCCP messages with an "ID ACK". From a quick look neither the code of ipaccess_rcvmsg_base in OpenBSC nor the copy of libosmo-abis ever checked the protocol header. So this code has been wrong since initially being created in 2010.
2014-04-01ipa: Use enhanced ipa_msg_recv_buffered() to cope with partioned IPA messagesJacob Erlbeck1-2/+4
The old ipa_msg_recv() implementation didn't support partial receive, so IPA connections got disconnected when this happened. This patch adds the handling of the temporary message buffers and uses ipa_msg_recv_buffered(). It has been successfully tested by jerlbeck with osmo-nitb and osmo-bsc. Ticket: OW#768 Sponsored-by: On-Waves ehf
2014-03-23ctrl: Move the lookup into a separate file in preparation for GPRSHolger Hans Peter Freyther2-2/+3
For GPRS the look-up via bts/trx does not make any sense and would introduce bad depdencies for the SGSN. Move the look-up code to a new file and introduce new setup methods.
2014-03-04bsc: Include the MCC/MNC in the location trapHolger Hans Peter Freyther1-1/+5
It is of interest to know the MCC/MNC that is broadcasted at the specific position. Sponsored-by: On-Waves ehf
2014-03-04libbsc: Add ctrl command for MNC, MCC, short-name and long-nameHolger Hans Peter Freyther1-0/+3
Add the framework for adding more setting commands.
2014-02-22bsc: Add vty command to send location trap through VTYHolger Hans Peter Freyther2-6/+36
I have manually tested this by entering the VTY command and observing the CTRL interface using wireshark. Ticket: OW#1129
2014-02-08bsc: rf_ctrl will always be created, remove the NULL checksHolger Hans Peter Freyther1-4/+0
2014-02-08libbsc: Create the RF interface all the timeHolger Hans Peter Freyther1-7/+4
The interface can be accessed through CTRL and a socket. But currently it is only available when the socket interface has been configured. Create the interface all the time but only listen on the socket when a path has been specified.
2013-11-15bsc: Use the right string for the notificationHolger Hans Peter Freyther1-1/+1
2013-11-01bsc/ussd: Rename bsc_send_ussd_notification()Jacob Erlbeck1-5/+6
Rename this function to bsc_send_ussd_no_srv() since it's a rather specialised function and not a generic USSD notification function. Sponsored-by: On-Waves ehf