Age | Commit message (Collapse) | Author | Files | Lines |
|
msgb_free is currently calling talloc_free but this might
change in the future and then this code would break..
|
|
* The read_msg method is allocating the msgb and we will
need to free it once we are done with it.
|
|
|
|
* Provide access to the GSM0808 TLV attributes so we can use it in
the nat code.
* Read the PAGING message, if it is paged by LAC we go through each
LAC and then attempt to find the proper BSC connection and then
send the message to that BSC.
|
|
|
|
Based on the token the NAT/MUX is capable of figuring out
which LAC this BSC is supposed to satisfy. This will be
needed for messages like paging that can be done by LAC.
|
|
Implement a helper that will allow to easily fill the
tag list with data.
|
|
For R-GSM900 the channels 955-1023 are within the 900er band. The
System Information Type generation can not cope with these channels yet.
|
|
|
|
* Start using the authenticated bit in the BSC connection. This means
that currently no messages are forwarded to the MSC from unauthenticated
BSCs.
|
|
|
|
|
|
* The MSC is sending us the next 04.08 packet before we have
received the answer for the cipher model complete. The code was
supposed to copy all packets from the current queue, to a new
queue and then send the packets again.
* This would (re)establish the different SAPIs. Now the requeuing
code was grabbing the packet from the empty queue (NULL pointer)
and we were dereferencing it. It appears that we need to use
"head" until the queue is empty.
|
|
|
|
|
|
* Create struct bsc_nat and move the various lists into this structure
* Create the VTY code
* Call the VTY init and parsing code
* Create functions to create the types..
* Add some stuff into the bsc_connection to be used for the NAT with
proper config files. E.g. to close the connection if the BSC does not
respond to a given command.
|
|
|
|
This way the VTY code can use the structures to implement
the show functionality.
|
|
Make sending of the ID Request message public. We are going
to use this in the BSC NAT code to ask for querying the BSC.
|
|
We will use this token to identify us at the MSC for
now. This assumes that something like OpenVPN is already
used to secure the networking. In the future we will
explore using TLS for the communication and certificates
for the authentication.
|
|
|
|
|
|
For the one MSC and n BSC case we need to patch the SCCP source
local reference on connection orientated links to avoid a clash.
For simple UDT packages we just let them pass and for SCCP connection
we have to:
1.) Create an entry on Connection Request
2.) Patch the entry on Connection Confirm, Connection Refuse,
Connection Release, DT1, Connect Release Complete
3.) Remove the entry on Connection Release Complete
The current code is blocking CRs, Release Complete from the MSC, and
creates the connection state only from the BSC side. The code to
assign a source reference is taken from sccp.c and handles wrap
arounds and such properly. We rely on the SCCP parser to fill out the
place to the source reference correctly so we can easily fix it.
The whole code is young and might contain bugs we need to resolve..
|
|
When the reset was filtered out to the MSC we will respond
with a GSM08.08 reset ack right away. We are using a static
acknowledge here.
|
|
Do not run into the situation where we need to filter in one
direction but it should not be filtered..
|
|
|
|
Introduce a bsc_nat_parse method to parse a IP Access method
into various parts. Write out the IPA Proto, in case SCCP is used,
store the msg type, pointers to the source/dest local reference and
other information.
Use the result of bsc_nat_parse inside the bsc_nat_filter method
to decide if the message should be dropped or not.
In the future the bsc_nat_parse result will be used for patching
SCCP references and other parts of the message.
The filter language should be able to filter the msg type of SCCP
messages and gain the "NOT" word in the filter language.
|
|
|
|
This is going to give a conflict when merging with master but
it can be easily resolved by adding a new id then.
|
|
|
|
This is the last of supported messages to be split into a parse
and handle routine. Now all parse routines can be used by the NAT.
|
|
|
|
|
|
|
|
Split the Connection Released into header parsing and into
acting on the parsed result. This is part of the NAT work.
|
|
This reverts commit 55a0716da7d06860addfba1812c309eac6d82f1a.
Using a TCH/H, TCH/F for paging purpose any will break the MT-SMS
case because this needs a SDCCH to establish SAPI=3. The On Waves
BSC Master branch has support for early assignment now so this hack
is not needed anymore.
|
|
In case we need to handle speech but we are currently on a SDCCH
we need to assign a new channel and close the old one. This
implementation should have the correct flow of things but we might
need to fix some error situations properly.
It is implemented by keeping a secondary_lchan pointer that will
be swapped into the lchan pointer after the assignment complete
message from the MS. The old lchan will be deactivated (the SACCH
should stay open). We have to manually remove the subscr from the
lchan structure to properly close things down.
|
|
Use switch/case, switch/case for the subsys and signal
to prepare to handle more signals in the future.
|
|
Specify how we intend to use the assigned channel. This is
needed to make CC with early assignment work properly.
|
|
Change the signature to take the lchan were the message is supposed
to be sent and the lchan which is supposed to be assigned.
|
|
If the lchan has AMR as speech codec we also need to send the
multirate config IE in the channel activation. This is already
done for the RSL Channel Modify message.
|
|
The same concept as with the previous patch, make the reject method
work on the source local reference instead of passing it the header.
|
|
Separate SCCP UDT parsing and handling into two methods. This
way the parsing can be reused by the BSC NAT.
|
|
I want to reuse the SCCP code for header parsing in the BSC
NAT to identify data and patch the source local reference. To do
this the current handle_* methods will be changed into two parts
one is strictly parsing the other is handling the parsed data.
|
|
Send a Paging Request to the BTS every two seconds. This way it is
unlikely that a phone will try to respond to two paging requests as
it is currently happening.
|
|
Start the SCCP IT timer only after the MSC has confirmed the SCCP
connection. It is safe to call bsc_del_timer even if it was never
started. This could happen on a connection refusal.
|
|
|
|
The MSC is asking us to enable ciphering and then immediately
sends a DTAP msg for SAPI=3. We handle this correctly by attempting
to establish SAPI=3 but we never get an establishment confirm
for this SAPI.
Attempt to fix it by not sending any DTAP message when we receive
the Cipher Mode Request and unblock the queue when the ciphering
is confirmed. The unblocking currently works by taking all messages
out of the queue and then submitting them again. This will attempt
to establish the SAPI=3 and such automaticaly.
And the MSC stopped sending me SMS so this needs to be verified at a
later time.
|
|
Is that right?
|
|
In the case of ipaccess we are doing a ++output but then still
try to write 23 bytes into it and on my system this is leading
to a stack corruption.
|