Commit Graph

2856 Commits

Author SHA1 Message Date
Sylvain Munaut 0230b34dc5 auth: Fix XOR algorithm
Thanks to the person on the ml that pointed this bug. Sorry I
don't remember who (it was a while ago and somehow didn't got
fixed at that time)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-21 19:03:09 +02:00
Holger Hans Peter Freyther af8a010448 Merge branch 'zecke/mgcp-transcoder' 2010-09-20 02:59:25 +08:00
Holger Hans Peter Freyther 9aa8a9c5a7 mgcp: Count the packets that arrive on the transcoder 2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther 557b1ab15b mgcp: Remove code duplication for filling out the sockaddr_in
Share the send to transcoder sockaddr sending routines.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther f2eedff052 nat: Send a transcoder reset on start up.
The transcoder RESET is using the same extensions to reset all
endpoints on a remote site. This makes sure that all allocations
can be made in a properly configured network.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther b98ba72e0a mgcp: Make the base port of the transcoder configurable
The code assumes a static mapping from endpoint to RTP port,
be able to configure the start of such a mapping.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther 3b5e3c4d6f mgcp: Prepare the CRCX/MDCX/DLCX messages for the transcoder.
Send CRCX/MDCX/DLCX to the transcoder, fill out transcoder_end with
the interesting data and hope that it is going to work.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther 218f8564e1 mgcp: Forward data from the BTS-in to the transcoder
Bind a new port for the transcoder, forward data from the BTS
to the transcoder, and from the transcoder to the network. Leave
BTS-IN where it is, BTS-OUT can now be after the transcoding took
place. We send the data from the BTS RTP port.

This whole route will be guarded by the transcoder_ip and if it is
NULL (current default) it will not go through the transcoder.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther 54aaa0fbed mgcp: Add ports for the transcoder as well 2010-09-20 02:51:29 +08:00
Holger Hans Peter Freyther c5f9248c3f mgcp: Share the range parsing code for net/bts 2010-09-20 02:51:29 +08:00
Holger Hans Peter Freyther a2a10ebf03 mgcp: Add a transcoder-mgw command to store the address 2010-09-20 02:51:29 +08:00
Holger Hans Peter Freyther 985f5694c7 nat: Keep the audio name and default payload around
For all forwarded messages this will not be used, but it is of
use for the transcoding.
2010-09-20 02:51:29 +08:00
Holger Hans Peter Freyther 249d69a26c nat: Use the write_queue inside the CFG. 2010-09-20 02:51:29 +08:00
Holger Hans Peter Freyther 6f6801066b mgcp: Keep the gw_fd inside the mgcp_config
Move the bfd from a static var into the mgcp_config.
2010-09-20 02:51:29 +08:00
Holger Hans Peter Freyther e02860af00 mgcp: Be able to parse 'sendonly' for the connection mode. 2010-09-20 02:49:09 +08:00
Holger Hans Peter Freyther 0e940e65c7 mgcp: Switch the default audio codec to AMR 2010-09-20 02:48:59 +08:00
Holger Hans Peter Freyther 3c79214727 nat: NULL check the allocation and print a nice warning. 2010-09-20 02:48:43 +08:00
Holger Hans Peter Freyther e3946f458a mgcp: Remove the hack to remap timeslot one...
The timeslot one is blocked and should not be used, replace the
code with a warning and watch out for it. Tis is most likely due
the uncovered in the previous commit due the wrong TLV definition.
2010-09-20 02:47:34 +08:00
Holger Hans Peter Freyther cd702379fe nat: Test for a bug inside the TLV definition for GSM 08.08
The 0x1 inside a CIC IE could indicate a new IE... add test data
and test case to verify that the patching works correctly.
2010-09-20 02:47:17 +08:00
Holger Hans Peter Freyther d2df4cab43 nat: Test the endpoint finding a bit better... 2010-09-20 02:46:57 +08:00
Holger Hans Peter Freyther adb6e1cce1 janitor: Move the * to the variable name 2010-09-18 06:44:24 +08:00
Holger Hans Peter Freyther 212e105288 db: Declare db_sms_inc_deliver_attempts. 2010-09-17 00:35:46 +08:00
Nico Golde 1e5ed4e893 gsm 04.11: increase the delivery attempt counter for an SMS right away in gsm411_send_sms
Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
2010-09-17 00:34:36 +08:00
Holger Hans Peter Freyther 1f69b4653b bsc: Fix the clear to release resources first, then set to NULL
This is fixing a crash reported by Nico. Somehow I staged an
unfinished version of this code. The crash should be gone.
2010-09-16 22:50:19 +08:00
Nico Golde f11af07431 gsm_04_11: count SMS delivery attempts for each CP-DATA
Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
2010-09-16 20:54:14 +08:00
Holger Hans Peter Freyther aaa40b8688 bsc_api: Do not free the subscriber conn on clear and clear request
Do not free the GSM Subscriber Connection when a channel is failing
or if a clear is requested, instead just give up _all_ the channels,
reset them to NULL and free the remaining channels.
2010-09-16 20:53:04 +08:00
Holger Hans Peter Freyther 2f9d1ef39a bsc: Prepare to store the SCCP connection inside the subscriber 2010-09-16 20:53:04 +08:00
Holger Hans Peter Freyther 32aaef689d bsc; Register the BSC API with many blanks. 2010-09-16 17:27:05 +08:00
Holger Hans Peter Freyther eea5a1bcd6 nat: Fix a crash when a BSC disconnects while a rejected IMSI
When we reject the IMSI we do not have the msc_con set on the
SCCP connection, but we do have a remote_ref. So the nat_send_rlsd
will end up with a crash due the msc_con being zero. Fix the
crash by only sending a released to the MSC when the connection
is not local.
2010-09-16 06:41:09 +08:00
Holger Hans Peter Freyther 4fcce9ea19 nat; Start to use gcc attribute to say that parameter may not be zero
This is an attempt to hint the compiler that it should check
the parameters and warn when something is null. Sadly it does
not work as expected.
2010-09-16 06:33:27 +08:00
Holger Hans Peter Freyther 0d711632f2 msc: Send a signal when the connections to the MSC dropped
Send a signal, this way another module can close all connections
to the MSC and all local channels.
2010-09-16 02:30:36 +08:00
Holger Hans Peter Freyther e09919bc70 bsc: Reorder the includes... should be alphabetically now 2010-09-16 02:29:45 +08:00
Holger Hans Peter Freyther 6098038968 bsc: Make the write method public it will be used by other modules 2010-09-16 02:22:20 +08:00
Holger Hans Peter Freyther 5832b3e108 bsc: Add code responsible for connecting, reconnecting to the MSC
Add the code that is forwarding data, from and to the MSC, also
handling ping/pong timers and authentication. Hook it into the
osmo_bsc. The code is only compile tested and ported from the
on-waves/bsc-master branch.
2010-09-16 02:16:02 +08:00
Holger Hans Peter Freyther 469692ca47 bsc: Initialize the MSC data parameters to a sane default 2010-09-16 02:16:02 +08:00
Holger Hans Peter Freyther 79f763fe91 bsc: Keep all active subscriber connections in a list. 2010-09-16 02:16:02 +08:00
Holger Hans Peter Freyther a2aedad005 bsc: Move the subscriber_con code into the bsc_api 2010-09-16 02:16:01 +08:00
Holger Hans Peter Freyther 1502ddefac chan_alloc: Allocate a subscriber connection as child of the network
Due handover we might leave the BTS and if we ever allocate/release
a BTS dynamically we have a problem here.
2010-09-16 02:16:01 +08:00
Holger Hans Peter Freyther bd76fab9cb bsc: Add the osmo_bsc_grace from the on-waves/bsc-master branch
The grace code will decide if a given connection is allowed to
be made or if it is going to be rejected. For active connections
it is going to send a USSD message.
2010-09-16 00:20:56 +08:00
Holger Hans Peter Freyther 0ab63d73c1 bsc: Move the gsm_04_80.c code into the libbsc.a 2010-09-16 00:20:19 +08:00
Holger Hans Peter Freyther 7a1591b3cf osmo_rf: Keep the current policy inside the RF struct..
Keep a back pointer to the rf struct inside the connection,
resolve the network through the back pointer. Also assume
that the RF is on. In case we start with RF locked, the policy
is on but we will not see any MS talking to us.
2010-09-16 00:10:18 +08:00
Holger Hans Peter Freyther 9a8b5ae977 bsc: Move the rf_ctl into the msc data struct 2010-09-15 23:53:54 +08:00
Holger Hans Peter Freyther 47b2601e01 bsc: Register a new MSC group with data for the MSC connection
This group contains everything that is related to the MSC connections.
2010-09-15 23:46:03 +08:00
Holger Hans Peter Freyther 13046202eb bsc: Remove the old msc parameter, everything is in the VTY config now 2010-09-15 22:30:37 +08:00
Holger Hans Peter Freyther 3e8e046ee5 bsc: Create struct osmo_msc_data to hold MSC information, handle signals 2010-09-15 22:29:25 +08:00
Holger Hans Peter Freyther 85804a80d4 nat: Fix the grammar of the sentence for listing open sccp connections 2010-09-15 19:01:31 +08:00
Holger Hans Peter Freyther a594342f71 Merge branch 'zecke/imsi-filter' 2010-09-15 19:00:53 +08:00
Holger Hans Peter Freyther 09ecda49d7 nat: Check if the connection was filtered before the msc connection
This way we avoid seeing many warnings that we will not forward
data to the MSC. For the con_local connections that is actually
the idea, we will not forward them to the MSC.
2010-09-15 18:58:37 +08:00
Holger Hans Peter Freyther e8223cae3d nat: Remove debug left overs 2010-09-15 18:58:36 +08:00
Holger Hans Peter Freyther ac2763b47e nat: Attempt to disconnect a connection when IMSI filtering happens
Attempt to disconnect the connection and make both sides happy
about this. Right now it only handles the LU and should be extended
to the CM Service Request.
2010-09-15 18:58:36 +08:00