aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2010-03-30[mgcp] Fix format string usageHolger Hans Peter Freyther1-1/+1
2010-03-30nat: Look at the assignment command and remember on which timeslot the data isHolger Hans Peter Freyther8-4/+134
This information will be needed when we are trying to forward MGCP connections to and from the BSC through the IPA protocol.
2010-03-30sccp: Move the destruction of the sccp connection to a new placeHolger Hans Peter Freyther4-7/+14
2010-03-30nat: Return the SCCP connection, change order of patching and updatingHolger Hans Peter Freyther4-50/+44
* Return the SCCP connection. This will be needed to store the assigned timeslot in there. * Update code to work with this change * This uncovered a bug in the CC handling, at the time the BSC was passed it was still a null pointer and the code would have failed.
2010-03-30misc: Do not prepend 0x when using %p in printf.Holger Hans Peter Freyther3-10/+10
2010-03-30nat: Fail more early in the case of not being authenticatedHolger Hans Peter Freyther1-5/+7
This is also fixing a possible memory leak.
2010-03-30nat: Add test case and data for paging by lac test.Holger Hans Peter Freyther2-1/+55
2010-03-30nat: Some more input validation... on the paging command.Holger Hans Peter Freyther1-0/+5
2010-03-30nat: Documentation fix... use nat for the parameterHolger Hans Peter Freyther1-1/+1
2010-03-30nat: Verify that the configured LACs are unique across the natHolger Hans Peter Freyther1-0/+9
2010-03-30nat: Move paging by lac handling code into the utils fileHolger Hans Peter Freyther4-29/+48
Moving it here means we can more easily test this code, there is one behaviour change with the code that we only support paging messages with one LAC and will silently ignore the others.
2010-03-30nat: Add a test case for the connection trackingHolger Hans Peter Freyther3-2/+219
This test case tests connectiont tracking by sending a CR, getting a CC, sending a DTAP, receiving a DTAP, receiving a RLSD, sending a RLC. It verifies that the messages are properly patched specially the references at the BSC.
2010-03-29nat: Fix the lookup of connections to and from the BSCHolger Hans Peter Freyther1-11/+43
When sending a message to the MSC in the case of DT1 messages we only have the address of the MSC, so we need to go with that, otherwise (e.g. in case of a CR, RLC) we do have the source address and need to patch it. When forwarding a message to the BSC we do receive a msg that should contain the patched address, we need to unpatch it...
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