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
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