Commit Graph

2253 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 2ad760fe5f Versioning... 2010-06-13 14:24:11 +08:00
Holger Hans Peter Freyther fea0aebd36 bsc_msc_ip: Attempt to plug an lchan leak...
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-13 14:15:39 +08:00
Holger Hans Peter Freyther c9b7d74a08 channel: Keep track on when a channel got allocated.
This can help to detect 'stale' channels in a network.
2010-06-13 12:38:35 +08:00
Holger Hans Peter Freyther 42a4e9a52d abis_rsl: Reduce logging to LOGL_DEBUG as it is quite nosiy
The nanoBTS will send us at least one measurement report
after we have decided to close the channel... degrade that
output to a debug message.
2010-06-13 10:09:45 +08:00
Holger Hans Peter Freyther d4f7a81992 nat: Fix the access-list-name command...
We have added two commands with the same name to the tree..
the second one should have been the BSC...
2010-06-08 11:18:26 +08:00
Holger Hans Peter Freyther cd4afce470 nat: Add both entries to the tail to keep the order they are inserted 2010-06-08 11:00:09 +08:00
Holger Hans Peter Freyther 299d5aa2a4 nat: Allow to specify multiple entries in the access-list...
Inside the access-list we have a list of entries that have
either one allow or one deny rule... we do not allow to remove
a single rule but one has to remove the whole list, in that case
talloc will handle cleaning all entries.

Right now the matching is O(n*m) as we traverse the list
(multiple times) and run the regexp multiple times. One
way to make it faster would be to concat all regexps into
one.
2010-06-08 10:53:39 +08:00
Holger Hans Peter Freyther f85e93cd4d nat: Shorten the access-list struct and method names (still way too long) 2010-06-08 10:14:44 +08:00
Holger Hans Peter Freyther fdfaf9c519 bsc_msc_ip: Possible crash fix on the early assignment code path
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-07 22:32:10 +08:00
Holger Hans Peter Freyther 4d4e6714cd bsc_msc_ip: When closing the SCCP check primary and secondary lchan
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-06-07 22:28:56 +08:00
Holger Hans Peter Freyther 3806b070bb Version bump... 2010-06-07 15:02:01 +08:00
Holger Hans Peter Freyther 3dd069cfd7 bssap.c: Claim to always do HR AMR right now.
The bssap.c code is sending a multirate config with
only AMR 5.9kb marked as supported, the MSC does not
like if we assign a FR channel and send the GSM 0808
FR AMR mode back to the MSC. So change the code to
not look at the channel type for AMR...
2010-06-07 14:47:25 +08:00
Harald Welte e1dcbc7622 [GPRS] Change SI13 to NMO_II, as some phones (like G1) dislike NMO_III
I still believe NMO_III is what we want, but as indiciated some phones
absolutely refuse to even connect to the GPRS network in this mode :(
2010-06-07 12:26:12 +08:00
Holger Hans Peter Freyther 6be75737c4 Revert "bsc_init: Set the paging config like in the trace..."
I added this to have the patch in the history, I don't think
that we need to include this but it is good to have it cherry
pickable in the history.

This reverts commit 290a11d0ad.
2010-06-06 21:32:02 +08:00
Holger Hans Peter Freyther 290a11d0ad bsc_init: Set the paging config like in the trace...
The value of this config is not known.... the paging load
needs to be tested again with these parameters...
2010-06-06 21:29:07 +08:00
Holger Hans Peter Freyther 67505f46b7 bsc_init: Use configuration settings from a trace... as default
Use the values but the paging configuration from a trace...
2010-06-06 21:25:33 +08:00
Holger Hans Peter Freyther 8b4898360a [nat] Implement the removal of an access-list. 2010-06-03 01:44:05 +08:00
Holger Hans Peter Freyther 6e495eee4b [nat] Fix the parsing of the access-list regexp...
We need to start at argv[1] for the regexp of
this access-list, also subtract one from number
of items..
2010-06-03 01:38:53 +08:00
Holger Hans Peter Freyther e6a8a9359d [nat] Fix VTY bug with access-lists...
vty->index does not hold a BSC Config at this point as we are
on the nat level... use the global _nat pointer for now...
2010-06-03 01:34:20 +08:00
Holger Hans Peter Freyther 1d55fd9e2b Mark a new test release.. 2010-06-02 17:36:43 +08:00
Holger Hans Peter Freyther df342ea82b [nat] Introduce the concept of access-list
One can set one access-list to one BSC and one
access-list to one NAT. The matching of IMSIs
remains the same for now, also applying the
white/blacklist. Access lists can not be deleted
for now and no perf opt is done (e.g. one could
cache the result of the last lookup in the bsc
struct).
2010-06-01 01:03:13 +08:00
Harald Welte 049eb23b73 [GPRS] Make sure SI13 rest octets look like those of the ip.access BSC 2010-05-31 19:20:11 +08:00
Holger Hans Peter Freyther 95eb9dd339 [gprs] Use the defaults coming from a trace file.
* Enable sending RLC3
* Use values from the trace..

This is not intended to be merged to master as this enables the
RLC3 that the comment claims to only work on EGPRS enabled models
and it is changing timers to hex indicating a change where none
happened... This is mostly for testing.
2010-05-31 19:19:10 +08:00
Holger Hans Peter Freyther ca660ac9ca [nat] Add ip-tos option to the nat.
This is applied to all incoming BSC connections.
2010-05-31 10:36:35 +08:00
Holger Hans Peter Freyther 96d6ed2552 [mgcp] Set the IP_TOS/DSCP on RTP/RTCP IP packets. 2010-05-31 10:22:00 +08:00
Harald Welte 170619fef6 [gprs] NS/BSSGP: Make all timers configurable from VTY 2010-05-22 22:21:36 +08:00
Holger Hans Peter Freyther 09f28ea6b3 [misc] Remove spaces, fix indention. 2010-05-22 22:13:13 +08:00
Sylvain Munaut 1884f89d9b bsc_init: Fix ccch description in SI messages
The previous code just hardcoded RSL_BCCH_CCCH_CONF_1_C, but
we need to inspect the timeslot config to know what to use.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-05-22 22:12:48 +08:00
Holger Hans Peter Freyther 0777fb2d32 [mgcp] Only patch RTP packets when they arrived on the RTP port
Do not attempt to patch RTCP packets...
2010-05-22 22:06:13 +08:00
Holger Hans Peter Freyther 35e56453d2 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-05-18 03:31:16 +08:00
Holger Hans Peter Freyther 4fcf80a59a [nat] Make the refusal more complicated to support more MSCs
We will need to confirm the connection, then we can send the
GSM48 message, then we need to close the connection... the
embedding in the refusal method was way too easy..
2010-05-16 20:45:16 +08:00
Holger Hans Peter Freyther 31e0bafa10 [sccp] Add method to create a dt1 packet. 2010-05-16 20:45:15 +08:00
Holger Hans Peter Freyther 01ffc204f3 [sccp] Create a method to create RLSD messages. 2010-05-16 20:45:15 +08:00
Holger Hans Peter Freyther 466c40bec2 [sccp] Create a SCCP CC creation routine. 2010-05-16 20:45:15 +08:00
Holger Hans Peter Freyther 60a2f4a7e6 [nat] Make create_sccp_src_ref return the SCCP Connection.
Right now it was not possible to just find a connection, by returning
the connection that is created we will have direct access to it. It
will be used by the local connection handling.
2010-05-16 20:45:15 +08:00
Holger Hans Peter Freyther 797b9f0af0 [nat] Remove parameter that is never accessed directly
The msgb needs to be around when we access the parsed structure
but that needs to be guranteed by the caller handing out the parsed
structure.
2010-05-16 20:45:15 +08:00
Holger Hans Peter Freyther 677f0e7f90 [nat] Add the notion of a "local" connection.
A local connection is only between the MUX and the real BSC. We will
not forward anything to the MSC. This will be needed for the IMSI
filtering as sending a CREF is not liked by every BSC...
2010-05-16 20:45:15 +08:00
Holger Hans Peter Freyther ddbb5a4e1e [nat] Do not access the con after the removal
In case of a RLC message we will destroy the SCCP connection. This means
that accessing the con and con->bsc will access old memory. Keep the status
local and move the con into an inner scope.
2010-05-16 20:45:15 +08:00
Holger Hans Peter Freyther 75042b80be [nat] Send a GSM48 message within the reject message 2010-05-16 08:15:11 +08:00
Holger Hans Peter Freyther c32589f395 gsm48: Split LU Reject sending and generation into two. 2010-05-16 02:49:12 +08:00
Holger Hans Peter Freyther abd0719f23 gsm48: Separate CM Service Reject sending and creation.
Split out the msg generation from the sending, this will
be used by the nat to send a refusal message.
2010-05-16 02:49:12 +08:00
Holger Hans Peter Freyther 5bac62216e [nat] Move the SCCP CREF handling into a new method.
We will need to generate messages with a proper reason
and it is easier to do that from a dedicated method.
2010-05-16 02:49:12 +08:00
Holger Hans Peter Freyther c93c523872 [bsc_msc_ip] Move the command to the right place
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-16 02:49:12 +08:00
Holger Hans Peter Freyther ed1c872352 [bsc_msc_ip] Print SCCP src/dst ref as hex 2010-05-16 02:49:12 +08:00
Holger Hans Peter Freyther e21bdea501 [nat] Use and print the connection type of a SCCP connection. 2010-05-16 02:49:11 +08:00
Holger Hans Peter Freyther 11c17233fe [nat] Set the connection type/reason as out parameter
We are analyzing each CR message and it is nice to know the
reason these connections were created. Change the nat method.
2010-05-16 02:49:11 +08:00
Holger Hans Peter Freyther fceee8779e Bump the version. 2010-05-16 01:37:49 +08:00
Holger Hans Peter Freyther e27740a0e2 [nat] Use the new gsm48 method to parse the MI followed by a classmark. 2010-05-16 01:13:28 +08:00
Holger Hans Peter Freyther 95defd542d gsm48: Add a generic MI from classmark+mi extraction.
This is a generic MI extraction for the MI if it is followed
after a classmark. For the Phase1 Phones the classmark2 is not
four bytes but it might be different. This code can be used
by the CM Service Request handling as well.
2010-05-16 01:07:20 +08:00
Holger Hans Peter Freyther 2d2a43f3d6 [nat] Let IMSI DETACH and other messages pass by. 2010-05-16 01:05:47 +08:00