aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
AgeCommit message (Collapse)AuthorFilesLines
2010-02-13[msc/nat] It is better to use msgb_free to free the msgbHolger Hans Peter Freyther2-3/+3
msgb_free is currently calling talloc_free but this might change in the future and then this code would break..
2010-02-13[nat/bsc] Fix memory leak of IPA messages...Holger Hans Peter Freyther2-0/+3
* The read_msg method is allocating the msgb and we will need to free it once we are done with it.
2010-02-12[nat] Add configuration file for the bsc nat.Holger Hans Peter Freyther1-0/+15
2010-02-09[nat] Intercept the PAGING message and then forward it to the BSCs with that LACHolger Hans Peter Freyther4-2/+49
* Provide access to the GSM0808 TLV attributes so we can use it in the nat code. * Read the PAGING message, if it is paged by LAC we go through each LAC and then attempt to find the proper BSC connection and then send the message to that BSC.
2010-02-09[nat] Fix compiler warning..Holger Hans Peter Freyther1-1/+1
2010-02-09[nat] Implement token based identification.Holger Hans Peter Freyther3-4/+88
Based on the token the NAT/MUX is capable of figuring out which LAC this BSC is supposed to satisfy. This will be needed for messages like paging that can be done by LAC.
2010-02-09[tlv] Implement a variant for the IDTAG list for the IPAHolger Hans Peter Freyther1-0/+13
Implement a helper that will allow to easily fill the tag list with data.
2010-02-09[bsc] Allow to set a EGSM900, RGSM900 ARFCNHolger Hans Peter Freyther1-2/+4
For R-GSM900 the channels 955-1023 are within the 900er band. The System Information Type generation can not cope with these channels yet.
2010-02-09[ipaccess] Make the IPA version of LTV public.Holger Hans Peter Freyther2-2/+4
2010-02-08[nat] Do not forward messages from and to BSC when it is not authenticatedHolger Hans Peter Freyther1-0/+13
* Start using the authenticated bit in the BSC connection. This means that currently no messages are forwarded to the MSC from unauthenticated BSCs.
2010-02-08[nat] Use default handler for SIGINT to quit the appHolger Hans Peter Freyther1-1/+0
2010-02-08Merge commit 'on-waves/0.3.1' into on-waves/bsc-masterHolger Hans Peter Freyther2-2/+2
2010-02-08[bsc_msc_ip] Fix the re-queuing of packets...on-waves/0.3.1Holger Hans Peter Freyther2-2/+2
* The MSC is sending us the next 04.08 packet before we have received the answer for the cipher model complete. The code was supposed to copy all packets from the current queue, to a new queue and then send the packets again. * This would (re)establish the different SAPIs. Now the requeuing code was grabbing the packet from the empty queue (NULL pointer) and we were dereferencing it. It appears that we need to use "head" until the queue is empty.
2010-02-08Merge commit 'on-waves/0.3' into on-waves/bsc-masterHolger Hans Peter Freyther1-1/+1
2010-02-08Bump the configure.in to 0.3on-wave.on-waves/0.3Holger Hans Peter Freyther1-1/+1
2010-02-08[nat] Add VTY support to the BSC nat applicationHolger Hans Peter Freyther6-15/+336
* Create struct bsc_nat and move the various lists into this structure * Create the VTY code * Call the VTY init and parsing code * Create functions to create the types.. * Add some stuff into the bsc_connection to be used for the NAT with proper config files. E.g. to close the connection if the BSC does not respond to a given command.
2010-02-07[telnet] Remove ancient #define...Holger Hans Peter Freyther1-3/+0
2010-02-07[nat] Move the structs to the header fileHolger Hans Peter Freyther2-28/+30
This way the VTY code can use the structures to implement the show functionality.
2010-02-07[ipa] Make sending of ID REQ public...Holger Hans Peter Freyther2-1/+7
Make sending of the ID Request message public. We are going to use this in the BSC NAT code to ask for querying the BSC.
2010-02-07[vty] Add a config for a simple OpenBSC BSC tokenHolger Hans Peter Freyther2-0/+19
We will use this token to identify us at the MSC for now. This assumes that something like OpenVPN is already used to secure the networking. In the future we will explore using TLS for the communication and certificates for the authentication.
2010-02-04[nat] Add missing Makefile.am..Holger Hans Peter Freyther1-0/+8
2010-01-31[nat] Make some methods static.Holger Hans Peter Freyther1-4/+5
2010-01-31[nat] Begin to patch SCCP connectionsHolger Hans Peter Freyther1-2/+211
For the one MSC and n BSC case we need to patch the SCCP source local reference on connection orientated links to avoid a clash. For simple UDT packages we just let them pass and for SCCP connection we have to: 1.) Create an entry on Connection Request 2.) Patch the entry on Connection Confirm, Connection Refuse, Connection Release, DT1, Connect Release Complete 3.) Remove the entry on Connection Release Complete The current code is blocking CRs, Release Complete from the MSC, and creates the connection state only from the BSC side. The code to assign a source reference is taken from sccp.c and handles wrap arounds and such properly. We rely on the SCCP parser to fill out the place to the source reference correctly so we can easily fix it. The whole code is young and might contain bugs we need to resolve..
2010-01-30[nat] Send a GSM 08.08 Reset Ack to the BSC...Holger Hans Peter Freyther1-2/+23
When the reset was filtered out to the MSC we will respond with a GSM08.08 reset ack right away. We are using a static acknowledge here.
2010-01-30[nat] Specify the direction of the messageHolger Hans Peter Freyther4-23/+45
Do not run into the situation where we need to filter in one direction but it should not be filtered..
2010-01-30[sccp] Slightly improve the log messageHolger Hans Peter Freyther1-1/+1
2010-01-30[nat] Prepare more sophisicated filtering and patchingHolger Hans Peter Freyther6-13/+403
Introduce a bsc_nat_parse method to parse a IP Access method into various parts. Write out the IPA Proto, in case SCCP is used, store the msg type, pointers to the source/dest local reference and other information. Use the result of bsc_nat_parse inside the bsc_nat_filter method to decide if the message should be dropped or not. In the future the bsc_nat_parse result will be used for patching SCCP references and other parts of the message. The filter language should be able to filter the msg type of SCCP messages and gain the "NOT" word in the filter language.
2010-01-29[nat] Make use of the LOGP macro in the code base.Holger Hans Peter Freyther1-13/+11
2010-01-29[nat] Add debug area for the NAT codeHolger Hans Peter Freyther2-0/+3
This is going to give a conflict when merging with master but it can be easily resolved by adding a new id then.
2010-01-29[sccp] Implement sccp_parse_header to be used by the NAT code.Holger Hans Peter Freyther1-0/+35
2010-01-29[sccp] Split Connection DT1 into two partsHolger Hans Peter Freyther1-38/+46
This is the last of supported messages to be split into a parse and handle routine. Now all parse routines can be used by the NAT.
2010-01-29[sccp] Split Connection Release Complete into two partsHolger Hans Peter Freyther1-15/+22
2010-01-29[sccp] Split Connection Confirm handling into two partsHolger Hans Peter Freyther1-27/+40
2010-01-29[sccp] Split Connection Refused into two partsHolger Hans Peter Freyther1-25/+39
2010-01-29[sccp] Split Connection Released into two partsHolger Hans Peter Freyther1-24/+38
Split the Connection Released into header parsing and into acting on the parsed result. This is part of the NAT work.
2010-01-28Revert "[bssap] Open a traffic channel for the paging any reason"Holger Hans Peter Freyther1-2/+2
This reverts commit 55a0716da7d06860addfba1812c309eac6d82f1a. Using a TCH/H, TCH/F for paging purpose any will break the MT-SMS case because this needs a SDCCH to establish SAPI=3. The On Waves BSC Master branch has support for early assignment now so this hack is not needed anymore.
2010-01-28[bsc] Implement early assignment for CC for the MT case.Holger Hans Peter Freyther3-9/+149
In case we need to handle speech but we are currently on a SDCCH we need to assign a new channel and close the old one. This implementation should have the correct flow of things but we might need to fix some error situations properly. It is implemented by keeping a secondary_lchan pointer that will be swapped into the lchan pointer after the assignment complete message from the MS. The old lchan will be deactivated (the SACCH should stay open). We have to manually remove the subscr from the lchan structure to properly close things down.
2010-01-28[bssap] Use switch/case for the signal handlerHolger Hans Peter Freyther1-26/+30
Use switch/case, switch/case for the subsys and signal to prepare to handle more signals in the future.
2010-01-28[gsm48] Use optional Chan Mode 1 for the assignment commandHolger Hans Peter Freyther1-0/+2
Specify how we intend to use the assigned channel. This is needed to make CC with early assignment work properly.
2010-01-28[gsm48] Allow to send the assignment command on a different lchanHolger Hans Peter Freyther2-3/+3
Change the signature to take the lchan were the message is supposed to be sent and the lchan which is supposed to be assigned.
2010-01-28[rsl] Send the MultiRateConfig in the RSL Channel Activate msgHolger Hans Peter Freyther1-0/+4
If the lchan has AMR as speech codec we also need to send the multirate config IE in the channel activation. This is already done for the RSL Channel Modify message.
2010-01-27[sccp] Separate connection parsing and policy for connection requestHolger Hans Peter Freyther1-48/+60
The same concept as with the previous patch, make the reject method work on the source local reference instead of passing it the header.
2010-01-27[sccp] Move the UDT parsing to a new methodHolger Hans Peter Freyther1-50/+89
Separate SCCP UDT parsing and handling into two methods. This way the parsing can be reused by the BSC NAT.
2010-01-27[sccp] Invent new API to be used by the BSC NATHolger Hans Peter Freyther1-1/+16
I want to reuse the SCCP code for header parsing in the BSC NAT to identify data and patch the source local reference. To do this the current handle_* methods will be changed into two parts one is strictly parsing the other is handling the parsed data.
2010-01-27[paging] Increase the time used to send paging messages to the BTSHolger Hans Peter Freyther1-2/+2
Send a Paging Request to the BTS every two seconds. This way it is unlikely that a phone will try to respond to two paging requests as it is currently happening.
2010-01-27[bsc_msc] Start the Inactivity Timer only when the connection is establishedHolger Hans Peter Freyther1-5/+9
Start the SCCP IT timer only after the MSC has confirmed the SCCP connection. It is safe to call bsc_del_timer even if it was never started. This could happen on a connection refusal.
2010-01-27[msc] Fix compilation by adding blocked_gsm to the structHolger Hans Peter Freyther1-0/+1
2010-01-27[msc] Attempt to fix MT SMS with ciphering enabled.Holger Hans Peter Freyther3-1/+27
The MSC is asking us to enable ciphering and then immediately sends a DTAP msg for SAPI=3. We handle this correctly by attempting to establish SAPI=3 but we never get an establishment confirm for this SAPI. Attempt to fix it by not sending any DTAP message when we receive the Cipher Mode Request and unblock the queue when the ciphering is confirmed. The unblocking currently works by taking all messages out of the queue and then submitting them again. This will attempt to establish the SAPI=3 and such automaticaly. And the MSC stopped sending me SMS so this needs to be verified at a later time.
2010-01-27[rest_octets] Change data_len to the sizes of the specHolger Hans Peter Freyther1-5/+5
Is that right?
2010-01-27[system_information] Initialize the buffer before moving itHolger Hans Peter Freyther1-2/+4
In the case of ipaccess we are doing a ++output but then still try to write 23 bytes into it and on my system this is leading to a stack corruption.