aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
AgeCommit message (Collapse)AuthorFilesLines
2013-09-11Added new auth policy black-list.Ivan Kluchnikov1-0/+1
In this mode by default we set authorized = 1 for all new subscribers. BSC accepts all MS, except subscribers not authorized in DB. All subscribers with authorized = 0 are part of the black list and not accepted.
2013-09-03nat: Remember the original dest local reference in the parsed structHolger Hans Peter Freyther1-0/+3
In case of the RLSD coming from the MSC we are patching the address in-situ but for local calls set con = NULL. We then answered the RLSD with the wrong reference and the MSC kept on trying.
2013-09-03bsc_msc: Add a name field to the MSC Connection to differentiate linksHolger Hans Peter Freyther1-0/+2
Assign a static name to a MSC Connection and use it. In case there are multiple connections we can now more easily identify them. This is only used for the NAT right now, the BSC could start to name the various MSC connections too.
2013-09-02vty: Use generic 'end' and 'exit' commandsJacob Erlbeck1-0/+2
Add bsc_install_default() and replace all install_default() This patch adds bsc_install_default() which calls install_default() and add 'exit' and 'end'. All other calls to install_default() are replaced by calls to bsc_install_default(). Since 'exit' and 'end' are now added automatically to each node, the explicit registrations of these commands are removed by this patch, too. The related tests succeed now without work-arounds (except for the 'config' node itself which is part of libosmocore).
2013-09-02nat: Attempt to follow the MODULE_METHOD pattern for methodsHolger Hans Peter Freyther1-2/+2
Rename methods to be like bsc_ussd_ACTION.
2013-08-28bsc/ussd: Optionally send USSD message on MSC disconnectionJacob Erlbeck1-0/+3
Send an USSD message on each MS connection if the connection to the MSC has been lost. Add a vty config command 'bsc-msc-loss-txt' in 'config-msc' to set the notification string and to enable the feature. Ticket: OW#957
2013-08-27libmgcp: add enum mgcp_rolePablo Neira Ayuso1-1/+9
This enum indicates if the mgcp is running on the BSC or the BSC-NAT.
2013-07-31nat: Implement a post-routing for the NAT softwareHolger Hans Peter Freyther1-0/+2
* The post-routing is applied after the first re-writing. To do this the new number is copied back into the called data structure. * Add a testcase that goes from 0172 to 0049 and then back to 0049 using the post rule with a table lookup.
2013-07-31nat: Allow to use the prefix lookup to rewrite numbersHolger Hans Peter Freyther2-1/+10
* Increase the rewritten rule to five digits (this is the easiest for the unit test). This will add another 40kb to the runtime size. * Create a unit test that tests adding and removing the prefix rules. * Use the regexp match to replace from one package
2013-07-31nat: Introduce a prefix lookup tree (trie) for number rewritingHolger Hans Peter Freyther2-1/+45
* It is a trie. The max depth of the trie is the length of the longest prefix. The lookup is O(lookuped_prefix), but as the prefix length is limited, the lookup time is constant. * Each node can hold the entire prefix, has place for the rewrite rule with up to three digits. * A trie with 20k entries will take about 3MB ram. * Filling the trie 100 times takes ~800ms on my i7 laptop * 10.000.000 lookups take 315ms.. (for the same prefix). * 93/99 lines are tested, 6/6 functions are tested, 49 of 54 branches are tested. Only memory allocation failures are not covered * A late addition is to handle the '+' sign and to increase the number of chars in the rewrite prefix. The timing/line coverage has not been updated after this change.
2013-07-27expiration: Allow to disable the periodic location updating procedureHolger Hans Peter Freyther1-0/+2
Disable the periodic LU using "no periodic location update" VTY command. In that case set the expire_lu to 0 which will then be translated to a NULL in the database layer. This leads to a bit of copy and paste in the db_sync_subscriber method but I don't see how we could easily use 'datetime(%i, 'unixepoch')' and 'NULL' at the same time. Change the query to find expired queries to check for NOT NULL and the time being in the past. This means if there are still old subscribers in the database they might not be expired. One would need to execute a query like "UPATE Subscriber SET expire_lu = 0 WHERE expire_lu is null". The same applies when disabling the periodic LU. One would need to update the database by hand. Manual tests executed/passed: 1.) periodic LU enabled: * use gst LUTest.st to do a LU * UPDATE Subscriber SET expire_lu=datetime('now'); * observe the subscriber being expired (it was) 2.) periodic LU disabled: * use gst LUTest.st to do a LU * verify that the expire_lu is NULL in the database
2013-07-27expiration: Speculative fixes for the periodic expiring handlingHolger Hans Peter Freyther2-0/+4
We were expiring subscribers during active calls. This is because the T3212 is stopped under certain conditions but we didn't stop that timer at all. Remember if T3212 timer was stopped due something done by NITB and update the expiration time at the end of the radio connection, as the phone should restart it when returning to MM Idle. It is a bit difficult to decide when we should set the flag. E.g. in a CM Service Request we don't know if we accept the service and during a LU we already send MM messages before we accept or reject the subscriber. The easiest is to set the flag when receiving a paging response on known subscribers and at the end of the authentication process. Do not expire a subscriber that has an active connection that is marked with the flag, e.g. we would still expire a subscriber that is being paged. Manual tests executed/passed: * gst LUTest.st verified that a expiration date was set * gst SMSTest.st (doing another LU but forcing a timeout on the SMS sending). Verified that the expire_lu was updated.
2013-07-21sgsn: Add "auth-policy" VTY command to enable/disable ACLHarald Welte1-0/+1
2013-07-21sgsn: add a minimalistic ACLHarald Welte1-0/+2
This adds a minimalistic ACL by which certain, individual roaming IMSIs can be authorized to use the SGSN. So you can selectively bypass the 'MCC+MNC == first 5 digits of IMSI' checking for a couple of IMSIs
2013-07-11Fix: Handle CM service request on already secured channel correctlyAndreas Eversberg1-0/+1
A CM service request must be acknowledged also, when encryption is already enabled. Without encryption enabled, the security status is GSM_SECURITY_NOTAVAIL, which causes a CM service acknowledge. On initial CM service request, the security status is GSM_SECURITY_SUCCEED, if encryption is enabled. This will not lead to an acknowledge, because the cyphering command implies an acknowlege. An additional CM service request requires an acknowledge, so I added a new security status: GSM_SECURITY_ALREADY
2013-07-08libmgcp: add enum mgcp_type and use itPablo Neira Ayuso1-1/+6
This patch replaces the field 'is_transcoded' in the mgcp_endpoint structure by the enum mgcp_type, that can be further extended with new types.
2013-07-04sgsn: Fix lengths of MS Network Capability and MS Radio Access Capability ↵Alexander Chemeris1-2/+2
elements. Original code was inconsistent about lengths and could lead to out of bounds write. Lengths were also inconsistent with the TS 24.008. Fixes: Coverity CID 1040714.
2013-07-03hsl: Remove the support for the HSL bts from OpenBSCHolger Hans Peter Freyther2-5/+0
The support has been implemented for an old model, we were told that newer versions would be made incompatible with OpenBSC. Ther are various warnings in the code and coverity has found some new ones. Just remove the code as we don't know of anyone using this code.
2013-06-21GPRS LLC: Add non-standard method of sequence number recoveryHarald Welte1-0/+4
In some situations (like MS reboot without prior DETACH or SGSN reboot without prior MS detach), the LLC sequence numbers for UI mode could be different on both sides. The LLC spec unfortunately doesn't permit us to send something like a FRMR in this case, but instructs us to silently discard the frame. At that time the remote LLC entity will re-transmit the frame with the same seqeunce number over and over again, which we will drop again and again. The mthod used now will keep track of the last received UI sequence number. If that number is retransmitted for three times in a row, then we accept this sequence number and recover from that point on.
2013-04-29nat: Include LAC/CI as TV values at the end of the 'status' messageHolger Hans Peter Freyther1-1/+2
Extend the status message and send LAC/CI as part of the status message. It is using TV to allow sending more fields in the feature. We only need to encode the data and this is why there is no tlv description yet.
2013-04-29smpp: Attempt to fix a memory leak of the msgbHolger Hans Peter Freyther1-0/+3
The smpp_pdu_rx method does not free the msgb. Introduce an annotation (currently defined to nothing) to indicate what will happen to a msgb.
2013-04-22nat: Move the callstats to a new header file due sccp usageHolger Hans Peter Freyther2-28/+55
The bsc_nat.h is included by common_vty.c so we may not used sccp_types.h in the bsc_nat.h header file. Move the callstats to a new file and include it where it is needed.
2013-04-17ctrl: Provide a reply in case the range check failedHolger Hans Peter Freyther1-0/+1
2013-04-17ctrl: Make the commands static to not pollute the namespaceHolger Hans Peter Freyther1-3/+3
We do not need to access these commands from another compilation unit and can just make it static.
2013-04-16nat: Extract the LAC/CI from the Complete Layer3 InformationHolger Hans Peter Freyther2-0/+6
Find the Cell Identifier from the Complete Layer3 Information and store it for future reference. We could begin to verify that the LAC/CI used really belongs to the BSC.
2013-04-16nat: Rename "struct sccp_connections" to "struct nat_sccp_connection"Holger Hans Peter Freyther2-15/+15
The name sccp_connection is used in the osmo-sccp code, sccp_connections was used in the NAT for tracking a sccp_connection. Rename it so it is obvious that the struct belongs to the nat. The rename was done with sed: $ sed -i s,"struct sccp_connections","struct nat_sccp_connection",g \ include/openbsc/*.h src/osmo-bsc_nat/* tests/*/*
2013-04-16nat: We want the remote to respond to our DLCX requestHolger Hans Peter Freyther2-0/+32
We want to send a TRAP with the MGCP statistics from the NAT and the connected BSC. The BSC endpoint can be either released because of a DLCX from the MGCP CallAgent or the SCCP Connection release on the A-link. This is why we need to queue the statistics when the deleting the endpoint on the BSC. The processing is continued once the response arrives. This code assumes that the response of the DLCX will be sent by the remote side. The current amount of outstanding responses can be seen on the VTY. This assumption is based on the fact that the BSC has already responded to the CRCX and maybe to the MDCX. The MGCP RFC is bended to prefix the transaction identifier with "nat-" to easily detect the response and hand it to the handler. This will then parse the response and generate the TRAP. The current version is v1. We assume that the transaction space is big enough and we will not re-assign the transaction identifier too early.
2013-04-16nat: Make it possible to send MGCP messages through the IPA multiplexHolger Hans Peter Freyther1-0/+4
Instead of handling MGCP through the UDP socket, read and write messages through the ipa connection to the MSC.
2013-04-05sysmobts: Add the necessary data structure and init for the SAPI queueHolger Hans Peter Freyther1-0/+1
The sysmobts is now having a SAPI queue with all pending SAPI operations on the BTS. Add the llist_head to the lchan and make sure it is initialized by the shared code.
2013-03-17Add VTY option to set GPRS network-control-order to enable MS measurementsAndreas Eversberg1-0/+1
In order to enable GPRS downlink measurements at mobile, the network-control-order must be set to nc1.
2013-03-12IPA: Allow RSL connection to different IP address as OMLHarald Welte1-0/+1
This patch adds a new VTY command "ip.access rsl-ip A.B.C.D" at the BTS level. If you set this IP address, the BTS will be instructed to establish the RSL link to the indiciated IP address, rather than using the same as for the OML link (default). Use "ip.access rsl-ip 0" to disable the feature.
2013-03-11BTS: Add S counter for link loss criterion to lchan structureAndreas Eversberg1-0/+2
2013-03-10si: Another round of PCS related fixesHolger Hans Peter Freyther1-1/+1
Inside the SI1 rest_octets we will need to indicate if the ARFCN is band 1800 or 1900. If the BTS is either 850 or 1900 we assume we are running a PCS network, otherwise it is a DCS network. The band indicator is not documented in GSM 04.08 but it is in the GSM 05.14 version 6.1.0 Release 1997.
2013-02-08Fix of IMMIDIATE ASSIGNMENT REJECT messageAndreas Eversberg1-0/+1
The message was corrupt at several points. They are fixed now and successfully tested. A default T3122 timer value of 10 is defined by default now. If set to 0, the reject message will not be sent. Note that when using existing configs with T3122 value set to 0.
2013-01-28bsc: Allow to page a BTS that is excluded from the RF lockHolger Hans Peter Freyther2-2/+7
The RF lock excluded BTS was not paged at all. Now forward the paging message to the handler and call a function that will check if this LAC can be paged right now. Introduce a new paging method that allows to page on a dedicated bts, refactor the code to use this method for paging.
2013-01-28bsc: A BTS excluded from the RF lock should be allowed to make a connectionHolger Hans Peter Freyther1-3/+3
When introducing the exclude for the BTS lock the RF stayed up but all connections were immediately released. Optionally pass the BTS as second parameter and check the exclude bit. Tested-with: rf-lock-exclude/RFLockExcludeTest.st
2013-01-28bts: Allow to exclude a BTS from the global RF lock handlingHolger Hans Peter Freyther1-0/+3
Some BTS might be in locations where they can run all the time, allow to exclude them from the global lock handling.
2013-01-15osmo-bsc: Add VTY command show positionDaniel Willmann1-0/+2
2013-01-15bsc: Auto RF Off in case of missing MSC connectionHolger Hans Peter Freyther2-0/+4
For short IP failures we want the RF to stay up and wait for the re-connect but in case the A-link is gone too long it is good to switch off the RF and wait for commands to enable it again.
2013-01-15bsc: Use the BSC RF CTRL to change the RF state of the TRXsHolger Hans Peter Freyther1-0/+1
Use the delayed scheduling feature of the osmo_bsc_rf class to avoid crashing the site controller of the nanoBTS.
2013-01-15bsc: Introduce an authenticated signal for the MSC connectionHolger Hans Peter Freyther1-0/+1
Send the signal whenever a MSC appears to be authenticated.
2013-01-11ctrl: Work on the cmd->node instead of the data pointer passedHolger Hans Peter Freyther1-9/+9
Make the macros use the cmd->node instead of the data pointer. The naming of the variable inside the macro already indicates that it should use the nodes data structure.
2013-01-11ctrl: Fix the signature of the string control commandsHolger Hans Peter Freyther1-2/+7
Like with all type unsafe callbacks we will need to cast from void to the dtype. This addresses some compiler warnings. Make it possible to only include the control_cmd.h to use the macros defined in this file.
2013-01-07audio: Make the BSC handle the new mr_config request of the BSC APIHolger Hans Peter Freyther2-0/+9
Handle the mr_config request and set the AMR multirate config for the given MSC. Initialize the mr_config with the AMR5.9 default we have been using until now.
2013-01-07bsc: Inspect a CC Setup message and attempt to reroute the trafficHolger Hans Peter Freyther1-0/+7
Inspect the CC Setup messages and if the dialed number is matching the regexp of the local MSC the connection will be rerouted. The original MSC will get a GSM0808 CLEAR REQUEST, a new connection with a CC Setup message will be opened.
2013-01-07nat: Introduce a global IMSI barr list using red-black treesHolger Hans Peter Freyther1-0/+15
2013-01-07nat: Allow the filter to select the reject causeHolger Hans Peter Freyther1-2/+9
In preparation for another kind of black-list allow the filter code to decide how the connection should be rejected. Introduce a new struct that will carry the reject causes for certain operations.
2013-01-01Revert "libbsc: With the new SAPI states we don't need sacch_deact anymore"Holger Hans Peter Freyther1-0/+1
For now we need to keep the sacch_deact in OpenBSC as we couldn't get the new activation/de-activation code working. This reverts commit 0c282f52684ac033e20ab411ab206e8559d564c9.
2013-01-01libmsc: Track and update the location update expiryJan Luebbe3-0/+6
Set the subscriber expiry timeout to twice the duration of the location update period and provide functions subscr_expire() and db_subscriber_expire() to mark subscribers offline that have missed two location update periods. This patch increases the DB revision to 3, so the hlr will be incompatible with prior versions. We should allow 0 for T3212 as well to disable the location update period. In that case we will need a way to indicate that in the database.
2013-01-01libmsc: Allow to set sender id when sending SMS from the VTYSylvain Munaut1-1/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>