aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bsc_msc_ip.c
AgeCommit message (Collapse)AuthorFilesLines
2010-05-12bsc_msc_ip: Assign a dummy gsm_subscriber to send a SACH DEACTIVATEHolger Hans Peter Freyther1-0/+18
This is part of fixing USSD delivered to the MS. Currently only MT services would end up with a GSM Subscriber assigned. The LCHAN code is using the GSM Subscriber to figure out if a SACH DEACTIVATE should be send to the MS. Add code to always assign a GSM Subscriber.
2010-05-12bssap: Use libosmocore to create GSM0808 ResetHolger Hans Peter Freyther1-1/+2
2010-05-11bsc_msc_ip: Add an extra command to show the MSC status.Holger Hans Peter Freyther1-0/+28
2010-05-11bsc_msc_ip: Move the MSC connection into the structureHolger Hans Peter Freyther1-17/+16
2010-05-11bsc_msc_ip: Add a test mode to send messages to the MSC.Holger Hans Peter Freyther1-1/+34
Check if the MSC likes paging responses when it has not recently send out a paging request.
2010-05-05bsc_msc_ip: Attempt to disable nagleHolger Hans Peter Freyther1-0/+7
Use TCP_NODELAY on the connection to the MSC. We want small messages to be send immediately.
2010-05-05bsc_msc_ip: Do not send a ping when the timeout is negativeHolger Hans Peter Freyther1-0/+3
2010-05-05bsc_msc_ip: Make the ping/pong timeouts configurableHolger Hans Peter Freyther1-2/+2
Take the timeouts from the struct.
2010-05-03bsc: Speculative crash fix.Holger Hans Peter Freyther1-0/+1
Make sure the sccp_cc_timeout is stopped when we delete the associated data. There is one crash report that indicates that we have a pending timer that is inside freed memory. A crash could have occured when the connection to the MSC was lost while have unconfirmed connections.
2010-05-03nat/bsc: Send PONG on PING, send PING from the BSC tooHolger Hans Peter Freyther1-1/+52
We do want to send PING/PONG in both ways to have a heartbeat on the TCP connection. When switching over to SCTP we can rely on the builtin heartbeat functionality.
2010-04-23bsc_msc_ip: Add a timeout for waiting for the CC of the networkHolger Hans Peter Freyther1-20/+46
Start a timeout to wait for the CC of the network and if it does not come in time we will abort the connection and take down the allocated lchans.
2010-04-19bsc_msc_ip: Crash fix on MO-Call starting with a SDCCHHolger Hans Peter Freyther1-1/+2
We do not assing a GSM Subscriber to Mobile Originated calls, when requesting a SDCCH and then starting call control we will crash here due trying to copy a NULL subscriber from the lchan to the other. We do not need to know the IMSI at the BSC so it is okay to not copy the subscriber around, we could even kill all subscriber handling in the future.
2010-04-18bsc_msc_ip: Print a small status on active connectionsHolger Hans Peter Freyther1-0/+6
This needs to be improved to print TS of the lchan, when the connection was created, when we received the last IT.
2010-04-17bsc_msc_ip: Allow to put the MSC address into the network configHolger Hans Peter Freyther1-16/+21
2010-04-14[bsc_msc_ip] Implement a simple RF lock command interfaceHolger Hans Peter Freyther1-1/+17
Right now this is using unix domain sockets and it only supports query, on and off as commands. In the future we want to have a vty<->snmp bridge or at least more status exposed via snmp.
2010-04-14bsc_msc_ip.c: Create the GSM network earlier, send the reset on each connectionHolger Hans Peter Freyther1-11/+14
Create the GSM network at the end of the init, send the GSM reset on each reconnection and close a small window when we would send a SCCP msg before being authenticated. For that we have introduced an authenticated into the bsc_msc struct and will manage it inside the bsc_msc_ip.c
2010-04-14bsc_msc_ip.c: Set the signal handler earlier..Holger Hans Peter Freyther1-7/+7
We should set this before starting any network operation.
2010-04-14bsc_msc_ip.c: Fix the source comment...Holger Hans Peter Freyther1-1/+1
This file is the bsc_msc_ip process to communicate with a MSC and to implement the GSM 08.08 spec.
2010-04-13[bsc_msc_ip] Fix the name of the process.Holger Hans Peter Freyther1-1/+1
2010-04-13[bsc_msc_ip] Remove the possible dangerous -P option for the BSCHolger Hans Peter Freyther1-2/+1
We always want to handle the CRCX the way we want to without allocating a BSC proxy process. The default value of 1 is fine for the bsc_msc_ip and we should not allow to set it.
2010-04-11bsc_msc_ip.c: Do not directly write but use the write queue..Holger Hans Peter Freyther1-7/+1
Use the write queue to write data to the MSC instead of using a direct write.
2010-04-09bsc_msc_ip.c: Fix crash when gsmnet is not yet initialized.Holger Hans Peter Freyther1-2/+4
2010-04-08bsc_msc_ip: Attempt to handle assignment failures more properlyHolger Hans Peter Freyther1-6/+12
1.) when we do get a assignment failure from the MS. It is coming on the old channel and not the new one. Fix the comparison. Also always reset the msc_data to NULL before dropping the reference 2.) the LCHAN signal handler in bssap.c claims that the T10 expire cb should free the secondary channel. It currently does not do it and we have to do it now... the whole thing was not tested and even after this commit this behavior is not heavily excercised... with OsmocoreBB we would be able to do this in the future.
2010-04-08bsc_msc_ip.c: Move from DEBUG to LOG loggingHolger Hans Peter Freyther1-31/+31
Use the oppurtunity to flag errors as errors in the code base.
2010-04-08bsc_msc_ip.c: Mention the timestamp config option.Holger Hans Peter Freyther1-0/+1
2010-04-08bssap: Speculative crash fix when queueing messages for the BTSHolger Hans Peter Freyther1-3/+17
It appears to be possible that we attempt to submit a DTAP on a SCCP connection when we have a channel without the msc_data assigned. This change should fix the crash (which is not well understood), fix a memleak in the case of the queue being full.
2010-04-08bsc_msc_ip: Specify the size we can read directly...Holger Hans Peter Freyther1-1/+1
data_len is wrong as well as we have reserved... specifying it directly seems to make valgrind happy. This also means that we might receive more than one UDP message and do not properly forward things. I will need to investigate.
2010-04-07bsc_msc_ip.c: Fix the -e command line optionHolger Hans Peter Freyther1-1/+1
2010-04-06Merge remote branch 'origin/master' into on-waves/bsc-masterHolger Hans Peter Freyther1-24/+24
* Move to the new log code and update binaries * Catch up with lchan changes from master Conflicts: openbsc/include/openbsc/Makefile.am openbsc/include/openbsc/gsm_data.h openbsc/src/Makefile.am openbsc/src/bsc_rll.c openbsc/src/chan_alloc.c openbsc/src/debug.c openbsc/src/gsm_04_08.c openbsc/src/gsm_04_11.c openbsc/src/gsm_subscriber_base.c openbsc/src/handover_logic.c openbsc/src/silent_call.c openbsc/src/transaction.c openbsc/src/vty_interface.c openbsc/src/vty_interface_cmds.c
2010-04-06bsc_msc_ip.c: Do not attempt to disconnect when not connectedHolger Hans Peter Freyther1-0/+2
This is fixing a segfault due calling bsc_unregsiter_fd twice without being in the list.
2010-04-06bsc_msc_ip.c: Crash fix when the MSC disconnectsHolger Hans Peter Freyther1-2/+12
Check if we do have the msc_data before invoking code in bssap.c. We might have lost the MSC connection and asked for the channel to be taken down but we might have received one last message from the BTS.
2010-04-06bsc_msc_ip.c: Register the SIGUSR2 handler... to really handle it.Holger Hans Peter Freyther1-0/+1
2010-04-06bsc_msc_ip.c: Remove unused variable.Holger Hans Peter Freyther1-1/+0
2010-04-05bsc_msc_ip: Use the force_free method to free the SCCP connectionHolger Hans Peter Freyther1-2/+1
Before the connection was not properly removed from the list of connections and our connection list contained a dangling pointer.
2010-04-05bsc_msc_ip: Verify that the sccp connection is present.Holger Hans Peter Freyther1-1/+2
The SCCP might have been freed by the error case already so we need to check this one for zero.
2010-04-04bsc_msc_ip.c: Fix crash for the hexdump during writing..Holger Hans Peter Freyther1-1/+1
we need to set the msgb l2h to the right position otherwise when trying to dump it we will have a nice crash.
2010-04-04bsc_msc_ip.c: Fix the reading of data...Holger Hans Peter Freyther1-1/+1
len contains the actual length of the message and data_len contains the size of the message. We want to read up to data_len and not up to 0 bytes.
2010-04-04bsc_msc_ip.c: Use another kernel feature to bind to a random portHolger Hans Peter Freyther1-8/+2
2010-04-04bsc_msc_ip.c: Use strerror to print the errno variable.Holger Hans Peter Freyther1-2/+2
2010-04-04Revert "bsc_msc_ip: Use the autobind functionality of the kernel"Holger Hans Peter Freyther1-1/+18
The autobind is not working as I wanted it to work. So we will revert this for now and then try something else. This reverts commit fd876b7488a8ae924f1a09144265d4474495408f.
2010-04-02bsc_msc_ip.c: Return after having freed the msgbHolger Hans Peter Freyther1-2/+7
When reading MGCP is failing (e.g. because the udp socket is not connected yet) we would have freed the msgb but we didn't return and then executed msgb_put on a dead buffer.
2010-03-31bsc_msc_ip: Use the autobind functionality of the kernelHolger Hans Peter Freyther1-18/+1
We do not care about the source port for the callagent relay and can use the autobind functionality of the kernel to pick a port for us...
2010-03-31bsc_msc_ip: Create a local UDP socket and relay MGCP messagesHolger Hans Peter Freyther1-5/+144
Attempt to bind to the local callagent port and send messages from the MSC TCP connection to the MGCP and do it the otherway around as well.
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 Freyther1-2/+1
2010-03-26msc: Create a real interface for BSC MSC and start handling reconnectsHolger Hans Peter Freyther1-13/+30
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_ip: Keep track of active connections so we could clear them.Holger Hans Peter Freyther1-0/+3
Keep track of SCCP connections so we can clear them when the MSC is going down.
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 Freyther1-6/+3
2010-03-25bsc_msc_ip: Add an option for the global log levelHolger Hans Peter Freyther1-0/+5