aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2010-03-29nat: Keep track of both sides of the connectionHolger Hans Peter Freyther3-0/+34
On a CC message we will need to remeber where the source local reference of the network belonged so we can properly identify the connection when receiving UDT messages.
2010-03-29nat: Assign the connection inside the new helper function.Holger Hans Peter Freyther2-1/+1
2010-03-29nat: Actually add the connection to the SCCP list of active connectionsHolger Hans Peter Freyther1-4/+15
Add the connection to the list of active connections. Otherwise we are not able to find the connection.
2010-03-29filter: Move logging level down to INFOHolger Hans Peter Freyther1-3/+3
2010-03-29debug: Fix debugging for the nat category.Holger Hans Peter Freyther1-0/+1
2010-03-29nat: Compare the IPA size with the actual size of the data...Holger Hans Peter Freyther1-0/+7
One sanity check that was needed in my test case..
2010-03-29nat: Move creation of the structs to a separate fileHolger Hans Peter Freyther4-40/+72
This way one can create the bsc_nat structure in unit tests..
2010-03-29nat: Move SCCP patching to a new file, log updatesHolger Hans Peter Freyther4-125/+170
Move patching and reassigning of messages to a new file which will making testing this functionality more easy.
2010-03-29bsc_msc: Handle the loss of the MSC connection betterHolger Hans Peter Freyther1-4/+38
Instead of simply exiting the application we will handle it by giving up all SCCP connections, once we have the MSC back we will send a GSM 08.08 reset message, and we will free all resources related to these connections. This includes the primary and secondary lchan of these connections. While we are not connected to the MSC we will handle each message that would open a SCCP connection by giving up the lchan. This has only been compile tested and will need to be manually tested during a test session. This also highlights a DoS that could be used against OpenBSC by setting up a lchan but never send any GSM L3 message. We will have to fix that at some point.
2010-03-29[misc] Clean some whitespace in files of this branch.Holger Hans Peter Freyther2-3/+2
2010-03-29nat: Handle MSC disconnect by closing all NAT connectionsHolger Hans Peter Freyther1-2/+16
When we disconnect from the MSC handle it by pushing the problem to our connected clients. We will simply close all connections, reject all new BSC connections and attempt to reconnect to the MSC.
2010-03-26msc: Create a real interface for BSC MSC and start handling reconnectsHolger Hans Peter Freyther4-39/+140
Create a BSC<->MSC interface and use it for the BSC MSC IP and the BSC NAT to reduce code duplication on handling reconnects to the MSC and cleaning up the local state. The code is only partially tested and will contain bugs. Currently both the BSC and the NAT will just exit on connection loss and this way have the current behavior.
2010-03-26bsc_msc: Connect in a non blocking way to the MSCHolger Hans Peter Freyther1-2/+81
The latency of setting up of the TCP connection can be quite high, it is better to connect in a non blocking way. This code is working by setting the socket nonblocking and temporarily replacing the bfd callback with the connect handling. Once the OS has connected our socket we switch back to normal operation.
2010-03-26bsc_msc_ip: Keep track of active connections so we could clear them.Holger Hans Peter Freyther2-0/+6
Keep track of SCCP connections so we can clear them when the MSC is going down.
2010-03-26nat: Add a warning for an important todo item on connection lossHolger Hans Peter Freyther1-0/+1
In case we disconnect with some pending operations we will need to signal the MSC that something is wrong. This could be by sending a RLSD directly, or a clear command. Another part of the fix is to respond with a RLC on unknown RLSD messages.
2010-03-26nat: Clear all pending messages in case the BSC disconnectedHolger Hans Peter Freyther1-0/+1
Throw away all messages we have scheduled but never delivered to the BSC.
2010-03-26nat: Switch downstream over to the write queueHolger Hans Peter Freyther1-20/+46
2010-03-26nat: Stop using the input/ipaccess.c method as it will write directlyHolger Hans Peter Freyther1-2/+28
We want to write everything through the write queue, it seemed the easiest to copy the bytes here and feed the data into the bsc_write method.
2010-03-26nat: Make it clear where we want to send these methodsHolger Hans Peter Freyther1-1/+1
2010-03-26nat: Move one more area to the bsc_write methodHolger Hans Peter Freyther1-11/+10
2010-03-26nat: Move BSC msg sending to a new method.Holger Hans Peter Freyther1-3/+8
Move all writes into one place so we can switch to the write queue more easily in the future.
2010-03-26nat: Start using a write_queue for the BSC connectionHolger Hans Peter Freyther3-15/+16
We are still writing to the BSC directly and don't make real use of this feature right now but we will need to do it.
2010-03-26nat: Move MSC write to the write_queue and make it non blockingHolger Hans Peter Freyther1-9/+27
Move the MSC code to a non blocking write.
2010-03-26nat: Rename variable from connection to listenHolger Hans Peter Freyther1-2/+2
This is the socket we listen for incoming BSCs.
2010-03-26bsc_msc_ip: Convert the MSC connection to the write queueHolger Hans Peter Freyther1-11/+22
The SCCP stack was changed to give the ownership of the msgb to the system integration, this allows us to use the stock write queue to queue the write and write the msg to the MSC once we are connected again.
2010-03-26Merge branch 'on-waves/sccp' into on-waves/bsc-masterHolger Hans Peter Freyther16-449/+351
2010-03-26sccp: Change the ownership of the msgb passed to the callbackHolger Hans Peter Freyther3-53/+35
Instead of deleting the msgb within the SCCP library the implementor of the write callback needs to free it. This is required for non blocking io with the server.
2010-03-26Merge commit '52b4abdcb351830f5493a50c4181ef3947f3feab'Harald Welte6-136/+122
2010-03-25channel requests: Add configuration to handle paging any with TCHHolger Hans Peter Freyther3-0/+27
It is possible that the MSC is not sending the channel type it needs for the operations it wants to do. Add a configuration option to assign a TCH in case of paging any requests. It can be a good idea to leave SDCCHs free for location updating requests.
2010-03-25convert openbsc to use libosmocore-0.1.1 APIHarald Welte4-7/+8
the 0.1.1 API is cleaned up and removes all exported global static arrays (like rlm_cause_strs). There are now proper accessor functions.
2010-03-25replace rsl_rlm_cause_strs with rsl_rlm_cause_name()Harald Welte2-5/+9
2010-03-25current version needs exactly 0.1.0 version of libosmocoreHarald Welte1-1/+1
2010-03-25replace gsm48_cc_msg_names[] with gsm48_cc_msg_name()Harald Welte2-70/+54
and implement the backend using value_string
2010-03-25channel request: Store the to be assigned channel type in the GSM NetworkHolger Hans Peter Freyther8-8/+43
Store the mapping from request to channel type in the GSM Network struct as there is some policy involved with handling the request. E.g. in a half rate network we don't want emergy calls to be getting a TCH/F, or we want to have a different policy for early/late assignment of phone calls. Update the table when creating the network and when the neci is changed.
2010-03-25use more value_string in gsm48 and rslHarald Welte2-61/+54
2010-03-25get_value_string(): return "unknown 0x..." instead of "unknown"Harald Welte1-1/+5
2010-03-25increase the use of 'struct value_string' in abis_nm and gsm_dataHarald Welte2-247/+183
2010-03-25bsc_msc_ip: Add an option for the global log levelHolger Hans Peter Freyther1-0/+5
2010-03-25Merge remote branch 'origin/master' into on-waves/bsc-masterHolger Hans Peter Freyther2-3/+10
2010-03-25debug: Make the global target loglevel overwrite the category levelHolger Hans Peter Freyther1-1/+1
Together with the previos -e Number option one can easily turn on debugging without needing to remember the category masks for a quick check on what is going on.
2010-03-25bsc_hack: Add other known options to the listHolger Hans Peter Freyther1-1/+3
2010-03-25bsc_hack: Add option to set the global log level.Holger Hans Peter Freyther1-1/+6
2010-03-24bssap: Allow to submit a SMS on the TCHHolger Hans Peter Freyther1-1/+9
Similar to the bsc_rll.c code we need to indicate if we want to send the data on the SACH or on the normal signalling link. For CC and any other SAPI=0 usage this bits must be zero, whener we try to do something with SMS this bit needs to be set to one.
2010-03-24Merge remote branch 'origin/master' into on-waves/bsc-masterHolger Hans Peter Freyther1-2/+1
2010-03-24rll_establish: When on a TCH always use the SACH for SAPI!=0Holger Hans Peter Freyther1-2/+1
When we are on a TCH/H or TCH/F always use the SACH for SAPI!=0 for the establishment otherwise it will never be answered. This can be tested by starting to page with a traffic channel and then trying to submit the SMS.
2010-03-24Merge remote branch 'origin/master' into on-waves/bsc-masterHolger Hans Peter Freyther1-0/+6
2010-03-24ipa: Fix the previous patch and initialize the fds to -1Holger Hans Peter Freyther1-0/+6
The code in 354ef81d8062510765b7280023b3f4ef98d0613a checked for fd >= 0 but on startup the struct is memset to 0 so this test is true. Initialize the fds to -1 to make the code work and be able to handle all ranges of the fd.
2010-03-24Specify a release reason for the lchanHolger Hans Peter Freyther13-29/+30
In case the put_lchan is making the refcount drop to zero use the release reason specified in the put_lchan call. This is used by the BSC MSC IP implementation for the assignment handling where the old channel is getting closed with a local end release (1).
2010-03-24Fix DNAT debug.h definition and move it to the enum.Holger Hans Peter Freyther1-2/+1
2010-03-24Merge remote branch 'origin/master' into on-waves/bsc-masterHolger Hans Peter Freyther78-96/+10273
Keep a static version as the shell script is not dealing well with branch tags/names containing text. Resolve merge conflict in the Makefile.am by adding both sides to the list of sources for the libbsc.a Conflicts: openbsc/configure.in openbsc/src/Makefile.am