Commit Graph

2856 Commits

Author SHA1 Message Date
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
Holger Hans Peter Freyther e8e41e611f nat: Work around trying to forward a msg to a msc that does not exist
Instead of segfaulting warn the user that the MSC Connection does
not exist...
2010-10-06 00:24:28 +08:00
Holger Hans Peter Freyther 0c35b5bd79 nat: Use the right access list for the stats (found by clang) 2010-10-06 00:18:20 +08:00
Holger Hans Peter Freyther 76c641635b db.h: Move the '*' to the other side for the gsm_subscriber 2010-10-06 00:03:20 +08:00
Holger Hans Peter Freyther 463dc62ae4 nat: Provide statistics about amount of different messages.
Provide simple statistics on how many LUs, Paging Responses
etc. we are seeing in the network.
2010-10-03 19:41:42 +08:00
Holger Hans Peter Freyther 12eb9b7bd9 gsm_04_80: Require libosmocore for creating USSD messages
Use the libosmocore to create USSD messages, increase the
minimum version of libosmocore, add header files, remove
the code.
2010-09-30 18:56:07 +08:00
Holger Hans Peter Freyther 841c2000d3 gsm0408: Reorder the includes, openbsc first, osmocore second 2010-09-30 18:56:06 +08:00
Holger Hans Peter Freyther c0714b85c3 gsm0480: Reorder the includes, openbsc first, osmocore second 2010-09-30 18:55:55 +08:00
Holger Hans Peter Freyther ee8849649b nat: Keep track of how many connections we reject
Keep track of how many connections we reject due the IMSI
filter itself or due not being able to parse the message.
2010-09-25 17:58:22 +08:00
Holger Hans Peter Freyther 520c1f12ef nat: Print the statistics of the access-list matches
Print the statistics for the rule matches via the vty.
2010-09-25 16:25:47 +08:00
Holger Hans Peter Freyther 2f1a984d4f nat: Add statistics to the access-list in the NAT
Count how many times we match a BSC or NAT deny. This will
give us the number of how often something should be filtered.
2010-09-25 16:15:23 +08:00
Holger Hans Peter Freyther 568b9682e0 nat: Fix the filter when searching for a identity response
The filter code will return < 0 for error, 0 for unknown
subscriber, 1 for subscriber checked. Use the same if construct
as for the CR message. This should fix passing LU when it
starts with a TMSI of a different network.
2010-09-24 04:52:38 +08:00
Holger Hans Peter Freyther cf1c8777a4 mgcp: Return 0 in case transcoding is disabled.
In case transcoding is disabled no error has happened, return
a zero. This is fixing starting the nat without transcoding.
2010-09-24 04:41:28 +08:00
Sylvain Munaut cd8e810302 auth: Fix AuthTupe re-use condition
It's not the key_seq of the last authtuple we must check, but
the one sent by the MS.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-21 19:04:07 +02:00