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.
on-waves/0.3.99.12
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
Holger Hans Peter Freyther
a9aab6a9ca
[nat] Print on which BSC config this happend.
2010-05-16 00:45:07 +08:00
Holger Hans Peter Freyther
775b3dc566
[nat] Parse the PAGING RESPONSE inside a CR message as well.
...
Now we are parsing a CM Service Request, Location Updating Request
and the Paging Response. For all other messages we claim to not
support it and force a refuse.
2010-05-15 23:55:28 +08:00
Holger Hans Peter Freyther
45bb8bfc1a
gsm48: Add size checks to the paging response mi parsing.
...
We go from no size checks to some content checking. We should
refactor the whole classmark2 + mi parsing that is used throughout
the code into one place with proper size checking. This is the
start and requires a new libosmocore as well.
2010-05-15 23:55:28 +08:00
Holger Hans Peter Freyther
57900f0008
[nat] Check proto descriptor and the message type
2010-05-15 23:55:28 +08:00
Holger Hans Peter Freyther
66ac860f62
[nat] Add code to filter the CM Service Request by IMSI.
...
The code should be shared among the GSM0408 implementation
and this one, and like the LU we are not handling a TMSI
properly as we have no idea where it is coming from.
2010-05-15 23:55:28 +08:00
Holger Hans Peter Freyther
ec82426c5e
[nat] Mention where the MSG is coming from.
2010-05-15 19:13:52 +08:00
Holger Hans Peter Freyther
60fa0efcc8
[sccp] Make it optional to send data on a SCCP Connection Refuse
...
This can be used to send a Location Updating Reject down to the
BSC when it is clear that a subscriber is not allowed.
2010-05-15 01:04:42 +08:00
Holger Hans Peter Freyther
3dfcd4636a
[nat] Remove the imsi allow option on the nat level.
...
For now we have:
1.) bsc imsi deny to deny at the BSC level
2.) bsc imsi allow to allow a SIM at the BSC level
3.) nat imsi deny to deny at the global level
2010-05-15 00:36:54 +08:00
Holger Hans Peter Freyther
50818d0c20
[nat] Separate exit2/exit3 as this can not be shared...
...
We have tried to send a refuse for arbitary things and ended
up with a segfault... separate the exi2 and exit3 label to have
separate exits and cleanups.
2010-05-15 00:29:50 +08:00
Holger Hans Peter Freyther
317934a2ba
[nat] Add a token to the nat config and handle ID GET
...
This allows to chain a nat with a nat by answering to the
id get code and sending the token.
2010-05-15 00:14:58 +08:00
Holger Hans Peter Freyther
565b355c82
[bsc_msc] Move the id get response into the bsc_msc.c
...
Create the message in a common place and then it can be used
by tools having an a link or such.
2010-05-15 00:12:19 +08:00
Holger Hans Peter Freyther
be9201a272
[nat] Add a regexp test command to the VTY.
...
This allows to test the regexp to be used for allo/deny of
the imsi filter.
2010-05-14 23:43:12 +08:00
Holger Hans Peter Freyther
a43c56637d
[nat] Fix the regexp of the test and the command line.
2010-05-14 23:07:58 +08:00
Holger Hans Peter Freyther
980c84f0a3
[nat] Fix the imsi deny config write.
2010-05-14 23:06:09 +08:00
Holger Hans Peter Freyther
1ae7b7c372
[nat] We do not want to see the actual matches.
2010-05-14 22:24:36 +08:00
Holger Hans Peter Freyther
e265db68b0
[nat] Allow to set the description for the bsc.
...
This will allow to add description to each BSC.
2010-05-14 22:06:28 +08:00
Holger Hans Peter Freyther
fdc4a9386f
[nat] Implement IMSI filtering...
2010-05-14 19:49:35 +08:00
Holger Hans Peter Freyther
023ac93377
[nat] Fix the size check of the LU Request.
2010-05-14 19:24:06 +08:00
Holger Hans Peter Freyther
fa53aba62c
[nat] Make the string -> regexp parsing public
...
This way it can be used from within a test case to test
the regexps..
2010-05-14 18:38:29 +08:00
Holger Hans Peter Freyther
34c0b245fb
nat: Add code to parse the SCCP optional data.
...
First we have the Complete Layer3 Information, then we have
the IE for the Layer3 information, then the GSM48 hdr, then
the actual content with data. Right now we are parsing the
LU but we are not filtering anything yet.
2010-05-14 08:14:09 +08:00
Holger Hans Peter Freyther
4c4d2d48ec
nat: Start to add a test case.. with one CR message.
2010-05-14 08:12:57 +08:00
Holger Hans Peter Freyther
13441a1c50
gsm48: Typo fix.
2010-05-14 08:02:08 +08:00
Holger Hans Peter Freyther
8ff74e8c24
nat: Introduce a nat filter that is working on the CR message.
...
Currently there is no implementation but the refusal code is
in place and will send a refusal back to the BSC.
2010-05-14 03:47:52 +08:00
Holger Hans Peter Freyther
a202342d64
[sccp] Export function to create SCCP Refuse message.
2010-05-14 03:34:35 +08:00
Holger Hans Peter Freyther
d275cf6407
[bsc_msc_ip] Use A.B.C.D for the VTY code.
2010-05-14 02:37:54 +08:00
Holger Hans Peter Freyther
c00e9ce09f
[nat] Use A.B.C.D for the IP address
...
The VTY code will then be able to validate the IP Address.
2010-05-14 02:36:42 +08:00
Holger Hans Peter Freyther
5d645bf984
[nat] Remove range checks inside the VTY command.
...
The ranges are enforced by the VTY code.
2010-05-14 02:35:51 +08:00
Holger Hans Peter Freyther
723fb87a6c
[mgcp] Clean up VTY code, the ranges are checked by the VTY code.
2010-05-14 02:34:35 +08:00
Holger Hans Peter Freyther
9da4492655
[mgcp] Use A.B.C.D for the ip addresses inside the vty config
...
Make the vty code parse the ip addresses for us and validate
them for us.
2010-05-14 02:27:50 +08:00
Holger Hans Peter Freyther
1927e93ce5
[mgcp] Improve the language of the comments.
2010-05-14 02:18:59 +08:00
Holger Hans Peter Freyther
7bbd416a52
[mgcp] Include stdlib.h for abs.
2010-05-14 02:14:09 +08:00
Holger Hans Peter Freyther
efd38dd015
[vty] Add power measurements to the one line summary.
2010-05-14 01:58:17 +08:00
Holger Hans Peter Freyther
e8d8811b12
[vty] Add a one line show lchan summary command.
2010-05-14 01:45:52 +08:00
Holger Hans Peter Freyther
39cb9f2a3c
[vty] Move "show lchan" into a parameterized method
...
I want to have a shorter lchan summary but with the same
config parameters. Change the current code to be a method
that takes a dump routine as parameter.
2010-05-14 01:45:45 +08:00
Holger Hans Peter Freyther
0558a5a0dd
[vty] Remove unfinished code from the VTY...
2010-05-14 00:58:11 +08:00