aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bsc_msc_ip.c
AgeCommit message (Collapse)AuthorFilesLines
2010-10-07msc: Only unregister the fd if the fd value is valid.Holger Hans Peter Freyther1-1/+1
This makes sure that someone can call bsc_msc_lost multiple times even if there is no MSC connection. This makes sense as bsc_msc_lost is public and be called from client code.
2010-09-26bsc: Mark LUs with a different LAC as needing special careHolger Hans Peter Freyther1-0/+34
We want to send a welcome USSD to new subscribers, mark subscribers with a different LAC than this cell as special and hope someone will follow up with them.
2010-09-16bsc: Rename to osmo_bsc_grace to prepare putting it into masterHolger Hans Peter Freyther1-1/+1
2010-09-16bsc: Rename the RF Ctl interface to match masterHolger Hans Peter Freyther1-2/+2
2010-08-25bsc_msc: Add minimal code to work with the new SCCP versionHolger Hans Peter Freyther1-1/+1
2010-08-25bsc_msc_ip: Set the right log areaHolger Hans Peter Freyther1-0/+1
2010-08-24sccp: Use the libosmo-sccp library and remove the internal copyHolger Hans Peter Freyther1-1/+1
2010-08-24bsc: Remember the MSC connection we use for that connectionHolger Hans Peter Freyther1-0/+3
2010-07-29bsc_rf: Embed the rf status inside the GSM Network.Holger Hans Peter Freyther1-3/+2
Right now we have a network-wide RF lock, in the future one BSC might have multiple BTSs at different positions and a global state will not make sense anymore and need to be moved over to the BTS struct..
2010-07-29bsc_grace: Add a new per network check to decide if new connections are allowedHolger Hans Peter Freyther1-0/+6
In case of an ordered RF shutdown we can enter a grace period where no new RF connections are allowed but active connections will stay alive until the RF is switched off.
2010-07-27bsc_msc_ip: Use ip-dscp and provide the old value as alias.Holger Hans Peter Freyther1-3/+3
2010-07-23bssap: Move cipher mode complete to libosmocoreHolger Hans Peter Freyther1-1/+1
2010-06-14bsc: Increase the hand_off variable when we are done with the lchan.Holger Hans Peter Freyther1-0/+9
Every time the highlevel code is done with the channel, increase the value. This way we will be able to see if we are leaking a channel that was never used or should have returned to the system.
2010-06-13bsc_msc_ip: Attempt to plug an lchan leak...Holger Hans Peter Freyther1-2/+6
If we end up with a channel that has refcount of zero, has no msc_data attached and the handler has not returned 1 we will just close it.
2010-06-07bsc_msc_ip: Possible crash fix on the early assignment code pathHolger Hans Peter Freyther1-11/+13
The crash happened when we had released the primary channel for one reason or another but still got the assignment complete on the secondary. This null checking is some extra caution, with the previous commit we should fail the msc_data test early in this method.
2010-06-07bsc_msc_ip: When closing the SCCP check primary and secondary lchanHolger Hans Peter Freyther1-10/+14
When closing a SCCP connection and any of the two lchan's are open, then close them down properly. Move the lchan freeing into a new method and call that one from the SCCP connection close handling. Move the bss scp data varaible to the top of the context..
2010-05-18msc: Add msc ip-tos NR option for the BSCHolger Hans Peter Freyther1-1/+3
Allow to set the TOS field via the VTY interface. The SO_PRIORITY was not used as it has no effect on the packets being sent (in contrast to the documentation).
2010-05-16[bsc_msc_ip] Move the command to the right placeHolger Hans Peter Freyther1-28/+0
Apparently I could not find the vty_interface_bsc.c when I was searching for it. Move an extra BSC command into that file.
2010-05-15gsm48: Add size checks to the paging response mi parsing.Holger Hans Peter Freyther1-1/+8
We go from no size checks to some content checking. We should refactor the whole classmark2 + mi parsing that is used throughout the code into one place with proper size checking. This is the start and requires a new libosmocore as well.
2010-05-15[bsc_msc] Move the id get response into the bsc_msc.cHolger Hans Peter Freyther1-9/+2
Create the message in a common place and then it can be used by tools having an a link or such.
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.