Commit Graph

18 Commits

Author SHA1 Message Date
Harald Welte 9af6ddfcec License change: We are now AGPLv3+ instead of GPLv2+
The reason for this is quite simple: We want to make sure anyone
running a customized version of OpenBSC to operate a network will
have to release all custom modifiations to the source code.
2011-01-01 15:39:34 +01:00
Holger Hans Peter Freyther fad0753b34 msc: Only unregister the fd if the fd value is valid.
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-10-07 06:07:57 +08:00
Holger Hans Peter Freyther d4eed5208f msc: Stop the connection timeout when we unregister the bfd
When we dropped the connection... stop the timer as we might
call bsc_unregister_fd twice...
2010-10-07 06:07:42 +08:00
Holger Hans Peter Freyther e2170a9f03 bsc_msc: Remove the except code as it is wrong...
Remove wrong code that is luckily not called. We would end up
in a reconnect and attempt to bsc_fd_register the same socket
again. I am removing this part of the code as it is not used
and it would need to know if the fd has ever been registered
or not...
2010-08-06 07:49:57 +08:00
Holger Hans Peter Freyther 62abaded39 bsc_msc: Fix the naming of this function. 2010-08-04 02:27:34 +08:00
Holger Hans Peter Freyther e8723dcb86 nat: Fix nat crash on start due forgetting the ->data pointer.. 2010-07-22 20:30:40 +08:00
Holger Hans Peter Freyther bec411b9db nat: Store the msc_con in the data of the bsc_fd
* Stop using nat->msc_con in the read_cb but use the data.
2010-07-05 14:30:21 +08:00
Holger Hans Peter Freyther ca999a989d msc: Add msc ip-tos NR option for the BSC
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-06-15 20:24:20 +08:00
Holger Hans Peter Freyther f76e7ef5e1 [bsc_msc] Move the id get response into the bsc_msc.c
Create the message in a common place and then it can be used
by tools having an a link or such.
2010-06-15 20:24:19 +08:00
Holger Hans Peter Freyther e47a91b86a bsc_msc: Add a connection timeout for the MSC.
When no one is listening our connection would get stuck
in the SYN_SENT state and we would be there forever.
2010-06-15 20:24:18 +08:00
Holger Hans Peter Freyther 0176eb44f5 nat: Attempt to handle exceptions on the fd and trat them as connection loss 2010-06-15 20:24:13 +08:00
Holger Hans Peter Freyther 9d90da9843 bsc_msc.c: Print the error message of the connection. 2010-06-15 20:24:11 +08:00
Holger Hans Peter Freyther b9ac37d22f nat: Logging improvement for the nat.
Print some more information, e.g. when a BSC is connected
and authenticated, print the SCCP ref number.
2010-06-15 20:24:11 +08:00
Holger Hans Peter Freyther 03ca97e458 bsc-msc: Flush the write queue when we have lost the connection 2010-06-15 20:24:10 +08:00
Holger Hans Peter Freyther baf2abe4c4 msc: Create a real interface for BSC MSC and start handling reconnects
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-06-15 20:24:08 +08:00
Holger Hans Peter Freyther 6c0a04e196 bsc_msc: Connect in a non blocking way to the MSC
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-06-15 20:24:08 +08:00
Holger Hans Peter Freyther df6143a08e Correct the company name. It should be On-Waves (ehf) 2010-06-15 20:24:07 +08:00
Holger Hans Peter Freyther eef86b5d59 [bsc_msc] Move the connect to the MSC routine into a new file 2010-06-15 20:24:05 +08:00