Commit Graph

3019 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 0586b0fa47 [vty] First set of fixes for the oml/rsl con dropping
The code had wrong documentation in the VTY, it crashed
when OML or RSL was not up yet. These issues are fixed
right now.
2010-10-26 09:44:21 +02:00
Holger Hans Peter Freyther 2484ceb2be [vty] Add ipa specific command to provoke failures to test OML/RSL reconnect
We need to simulate OML/RSL failure in an easy and fast way
and adding a command to do so seems like a good way to achieve
this. The command is a bit misplaced, in one way it is no config
and does not belong into the config node but then again it does
not belong into the VIEW_NODE either as it is manipulating content.

On this merge I have changed it to the ENABLE_NODE.
2010-10-26 09:40:13 +02:00
Holger Hans Peter Freyther f3ca2eeede Merge branch 'zecke/ussd-side-channel' 2010-10-25 21:08:37 +02:00
Holger Hans Peter Freyther 90bbccfca9 nat: Forward the data coming from the USSD module to the BSC. 2010-10-25 21:06:03 +02:00
Holger Hans Peter Freyther 4c401e7a1a nat: Forward extra state and the message to the USSD provider
Forward the SCCP state and the data to the USSD provider,
also mark the connection as local.
2010-10-25 21:06:03 +02:00
Holger Hans Peter Freyther ec8a4e23d3 ipaccess: Add a structure for informing the USSD provider about the state
This is used to inform the USSD provider about the state of the
connection.
2010-10-25 21:06:03 +02:00
Holger Hans Peter Freyther c16c2dc5d3 nat: Implement accepting a USSD Provider connection, do authentication 2010-10-25 21:06:03 +02:00
Holger Hans Peter Freyther 64b12924bf nat: Replace the idiom for replacing a string with a function call
Remove a lot of code in favor of a new function that is freeing
the old string and copying the new one. I should have gotten the
context and the strings right.
2010-10-25 21:04:46 +02:00
Holger Hans Peter Freyther e393f273e7 nat: Keep a ussd token in the config
We will have the USSD provider connecting to us and we
will use the IPA protocol, including the auth mechanism.
2010-10-25 21:04:46 +02:00
Holger Hans Peter Freyther 3229f442f4 nat: Implement the matching of certain USSD messages
Have various checks, check if the IMSI should be handled,
if there is a USSD query set and then decode and compare
the value.
2010-10-25 21:04:46 +02:00
Holger Hans Peter Freyther c1578bc747 nat: Add an option to set the query string to match
Allow the query string to be set. The ussd matching code
will check for this string and then forward it to the bypass.
2010-10-25 21:04:46 +02:00
Holger Hans Peter Freyther c1cac1e31a nat: Make the imsi checking function public.
We will use this method in the USSD module to check if the
IMSI should be handled for USSD queries.
2010-10-25 21:04:45 +02:00
Holger Hans Peter Freyther d1effd835f nat: Provide a USSD access list to check for which to play HLR. 2010-10-25 21:04:45 +02:00
Holger Hans Peter Freyther 17870cf533 nat: Create a USSD module to filter out USSDs... 2010-10-25 21:04:45 +02:00
Holger Hans Peter Freyther 74dc303134 nat: Introduce a new connection type for Supplementary Services
If we have a CM Service Request we will look into the message
to see if it is a Supplementary Service Activation.
2010-10-25 21:04:44 +02:00
Holger Hans Peter Freyther a3967579f8 nat: Move the DTAP unpacking into a new method
DTAP unpacking will be used by the USSD checking code
2010-10-21 12:23:27 +02:00
Holger Hans Peter Freyther 749497eeb3 nat: Copy the IMSI, then free it or move the context to the connection
Extract the IMSI from the first message as well and safe it
in the connection structure. The problem is that we do not
have this structure at this point, so we will allocate the
imsi as child of the bsc_connection and then move/steal it.
2010-10-21 12:22:50 +02:00
Holger Hans Peter Freyther 8c78b480f9 nat: Store the IMSI inside the SCCP Connection data
Store the IMSI for the connections that we are tracking,
it will be freed when the normnal SCCP connection is freed.
2010-10-21 12:22:20 +02:00
Holger Hans Peter Freyther 6b03831495 lua: Mention that the code has some bugs... 2010-10-20 19:21:49 +02:00
Holger Hans Peter Freyther fbf87a502d lua: Search for clear requests from the network as well 2010-10-20 19:21:07 +02:00
Holger Hans Peter Freyther def777ae7e lua: Check BSSMAP msgtypes in one function.. 2010-10-20 19:21:07 +02:00
Holger Hans Peter Freyther 8bde2ee61f lua: Check for Cipher Mode Reject failures as well 2010-10-20 19:21:07 +02:00
Holger Hans Peter Freyther bc3d8dd89e lua: Check for assignment failures 2010-10-20 19:21:06 +02:00
Holger Hans Peter Freyther 721c457e61 lua: Check for disconnects with non normal release too 2010-10-20 19:21:06 +02:00
Holger Hans Peter Freyther e512e3fd2f lua: Fix the indenting of the file 2010-10-20 18:57:17 +02:00
Holger Hans Peter Freyther 7220ca9778 contrib: Add LUA script to store SCCP connections with Errors
Split the trace based on SCCP Connections, in case an error is
detected, the trace will be stored instead of being deleted and
the full log can be viewed afterwards.

Right now only LU Rejects are recognized, but this can be extended
to other things as well.
2010-10-20 16:58:39 +02:00
Holger Hans Peter Freyther 1fd60631f7 nat: Change the order of the DENY/ALLOW rule for the BSC.
Currently it is not is not easily possible to disable
everyone and then only allow certain SIMs. By changing
the order we can do:
	access-list imsi-deny  only-something ^[0-9]*$
	access-list imsi-allow only-something ^123[0-9]*$

and still keep the usecase of only forbidding certain
SIMs on certain LACs. Adjust test case, test that the
other cases are still functional.
2010-10-19 20:55:33 +02:00
Holger Hans Peter Freyther a25d579ab9 nat: Convert the ip to host order to allow to bind to other ips 2010-10-19 17:48:13 +02:00
Holger Hans Peter Freyther 7e8da1379e nat: Add a method to add a proper message to the queue.
This will be used by the USSD module to forward the data
without creating another copy of the data.
2010-10-19 16:40:34 +02:00
Holger Hans Peter Freyther 3d38742d1c nat: Find a connection by the real ref 2010-10-19 16:40:17 +02:00
Holger Hans Peter Freyther f961de1108 nat: Use the make_sock routine to listen for incoming connections. 2010-10-19 16:40:04 +02:00
Holger Hans Peter Freyther a09b966cd4 nat: Use strncmp on the string in case it is not null terminated 2010-10-19 16:39:01 +02:00
Holger Hans Peter Freyther e383980a7e ipaccess: Make sure the unitid is null terminated
The nanoBTS is sending null terminated strings, make sure they
are really null terminated.
2010-10-14 22:05:52 +02:00
Holger Hans Peter Freyther d9e81d0fcf ipaccess: Verify that the data fits in the package.
There is something wrong with the code, the length is
here uint8_t but when we generate a IDGET we put it
as 16bit data.
2010-10-14 22:05:44 +02:00
Holger Hans Peter Freyther 949e0ba648 ipaccess: memset the tlv_parsed structure before parsing
Make sure the tlv_parsed structure is initialized properly,
otherwise we might detect a tag that should not be present.
2010-10-14 22:05:34 +02:00
Holger Hans Peter Freyther 69cfa179ef nat: Make the write_queue write callback a public function 2010-10-13 23:56:01 +02:00
Holger Hans Peter Freyther 4d44fc56e7 nat: Make the queue routine work on any write_queue 2010-10-13 23:55:52 +02:00
Holger Hans Peter Freyther 19c530c5e7 ipaccess: Put our extensions to the protocol into the same enum
Rename NAT_IPAC_PROTO_MGCP to IPAC_PROTO_MGCP and place it in
the enum. We need to be prepared to change this number if IPA
is ever going to use it for something else.
2010-10-13 23:55:32 +02:00
Holger Hans Peter Freyther 833fa0bafa Require libosmocore 0.1.24 due the USSD changes. 2010-10-13 14:03:15 +02:00
Holger Hans Peter Freyther 3e9a7f80bd misc: Replace the idiom for replacing a string with a function call
Remove a lot of code in favor of a new function that is freeing
the old string and copying the new one. I should have gotten the
context and the strings right.
2010-10-12 23:31:53 +02:00
Holger Hans Peter Freyther 9ecf678995 socket: Plug resource leak when the listen call is failing. 2010-10-12 23:29:16 +02:00
Holger Hans Peter Freyther 3cb287919e misc: Attempt to determine byte order in a cross-platform way
OSX does not provide an endian.h, use the other header files that
should define/include what we need. Also check that the byteorder
define is available.
2010-10-12 15:41:03 +02:00
Holger Hans Peter Freyther 88a5fa0a75 ussd: Catch up with libosmocore and pass the gsm48_hdr 2010-10-12 15:34:20 +02:00
Holger Hans Peter Freyther daa0fe7637 ussd: Move the code libosmocore, increase the version number.
Move the code to libosmocore, update the header file and the
version required in the configure.in.
2010-10-10 17:12:05 +02:00
Holger Hans Peter Freyther 0bd60f3317 nat: Allow a BSC to have multiple LACs
Make it possible that one BSC is serving multiple
cells. Introduce a list of lacs, add functions to
manipulate the lists. The current test cases for
paging by lac continue to work.
2010-10-08 22:21:46 +08: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 85531cc60d misc: Once again go from "On Waves" to "On-Waves"..
Try to get the company name of our sponsor right...
2010-10-06 20:38:36 +08:00
Dieter Spaar d6613e05d7 [VTY] T3212 scaling is 6 minutes
The scaling of T3212 is in units of 6 minutes, not 10 minutes.
2010-10-05 21:10:55 +02:00
Holger Hans Peter Freyther 0c41b6933e nat: Possible crash fix, only filter non local connections
For local connections con_msc is not set and sending a RLSD
to the network would have ended up in a segfault.
2010-10-06 00:48:36 +08:00