aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/nat
AgeCommit message (Collapse)AuthorFilesLines
2010-04-13nat: Add config option to filter/handle certain imsi'es.Holger Hans Peter Freyther1-0/+74
2010-04-13[statistics] Count the times we lost the connection to the MSC.Holger Hans Peter Freyther1-0/+2
2010-04-13[nat] Add show statistics to the natHolger Hans Peter Freyther1-0/+30
2010-04-13[statistics] Provide basic statistics for the NATHolger Hans Peter Freyther3-0/+18
Count number of SCCP connections, number of BSC reconnects, number of calls. For most of them we have a per BSC and a global count. Right now all structs using the counters survive until the end of the application so we do not need to free them.
2010-04-12[nat] Change the command stringsHolger Hans Peter Freyther1-3/+3
Put the Target/Object first... Apparently this is more what people that know IOS expect to do.
2010-04-09nat: Set a dummy bts_ip to avoid misdetection of the bts...Holger Hans Peter Freyther1-0/+1
It was possible that the nat detected the core network gateway as the bts just due being the first to send data to the port. Fix it by setting a dummy bts_ip to force the mgcp_network code to compare the in_addr.
2010-04-08nat: Handle unknown RLSD by send a RLC back to the network.Holger Hans Peter Freyther1-1/+31
2010-04-08nat: Print the IP address of the connected BSCsHolger Hans Peter Freyther1-2/+7
2010-04-08nat: Rename variable to make it use msc in the nameHolger Hans Peter Freyther1-2/+2
2010-04-08nat: Attempt to have a single BSC write methodHolger Hans Peter Freyther3-23/+23
This method currently prepends the IPA header and sends the data. In the future we might be able to use SCTP for it. We have to remove the IPA header from the static messages for that to work. This code is untested.
2010-04-08nat: Rename bsc_write to bsc_send_dataHolger Hans Peter Freyther1-8/+8
2010-04-07nat: Send the reset after we have received the init ackHolger Hans Peter Freyther1-5/+7
Sending the reset right away will upset the MSC and we need to wait for the first contact.
2010-04-07nat: Fix the reset message and prepend the IPA headerHolger Hans Peter Freyther1-0/+1
2010-04-07nat: Allow to realloc already allocated endpointsHolger Hans Peter Freyther1-0/+1
E.g. when the MGCP on the BSS is not responding we could block all of our endpoints. As we are mostly in the middle and forward bits we will happily reallocate the endpoints.
2010-04-07nat: Send a GSM0808 message to the MSC when we are reconnectingHolger Hans Peter Freyther1-0/+28
The rest of the code should filter the reset ack msg. This should make the MSC give up all resources it had allocated for us.
2010-04-07nat: Attempt to make MGCP forwarding more robustHolger Hans Peter Freyther1-17/+27
When not being able to allocate the msgb for the forwarded data there is no point in keeping and preparing the transaction. So we can move the msg creation a bit up and only do the allocations after having done the msgb allocation. When receiving a DLCX we will now delete the endpoint right away. This means when a BSS does not respond to the DLCX our endpoint will not be blocked. E.g. this could happen when the MGCP is restarting or in similiar conditions. When the BSS is not responding we move the burden up the chain to the CallAgent. We have to still keep track of the transaction id and the bsc pointer to keep the mgcp forward routine working.
2010-04-06Merge remote branch 'origin/master' into on-waves/bsc-masterHolger Hans Peter Freyther1-8/+8
* Move to the new log code and update binaries * Catch up with lchan changes from master Conflicts: openbsc/include/openbsc/Makefile.am openbsc/include/openbsc/gsm_data.h openbsc/src/Makefile.am openbsc/src/bsc_rll.c openbsc/src/chan_alloc.c openbsc/src/debug.c openbsc/src/gsm_04_08.c openbsc/src/gsm_04_11.c openbsc/src/gsm_subscriber_base.c openbsc/src/handover_logic.c openbsc/src/silent_call.c openbsc/src/transaction.c openbsc/src/vty_interface.c openbsc/src/vty_interface_cmds.c
2010-04-06nat: Send a RLSD to the network for connections belonging to the BSCHolger Hans Peter Freyther1-1/+27
Sending a RLSD with SCCP failure makes the MSC free all the resources (MGCP, audio channels), right now we are ignoring the RLC we get from the network and print a unhandled message.
2010-04-06nat: Print a MSG when receiving unknown SCCP messages.Holger Hans Peter Freyther1-0/+3
2010-04-06nat: Store the config in the connection instead of the lacHolger Hans Peter Freyther3-7/+12
This allows that we can print the Nr. next to the lac and it allows us to change the lac at runtime without reconnecting the BSC.
2010-04-06nat: Close the filedescriptor when ignoring the request.Holger Hans Peter Freyther1-0/+1
2010-04-06nat: Add logging commands for the nat as well.Holger Hans Peter Freyther1-0/+3
2010-04-06nat: Fix thinko... use the right fd to determine the IP of the btsHolger Hans Peter Freyther1-1/+1
Use the fd of the BSC Connection to determine the IP address of the BTS as we are seeing it.
2010-04-06nat: Improve the log message and print the errno/strerror(errno)Holger Hans Peter Freyther1-1/+2
2010-04-06nat: Set the MGCP audio payload to -1.Holger Hans Peter Freyther1-0/+1
This value is copied into the bts_audio_payload when allocating a BTS MGCP endpoint. For the nat we have actually no interest in patching MGCP messages. We will patch them to the network because the code will do it anyway, we will not patch things back to the BTS.
2010-04-06Revert "nat: Remember where the BTS is listening for things."Holger Hans Peter Freyther1-16/+1
Remove the code to parse port as we need to discover the BTS behind the nat and most likely it will have a different port than the one advertised by the BTS. This reverts commit c6a1fe773d16eb20d4cb1d3097761419436f4537.
2010-04-06nat: Print the unknown byte as a integer instead of charachterHolger Hans Peter Freyther1-1/+1
The value might be a non printable one.
2010-04-06nat: Patch IT messages as well..Holger Hans Peter Freyther1-0/+2
We need to patch the source/dest reference inside the messages as well otherwise we will see failures in the SCCP connection on long calls.
2010-04-05nat: Close all endpoints used by a BSC when the BSC is goneHolger Hans Peter Freyther2-0/+21
Cleanup all endpoints that belonged to a given BSC. This is one part of the cleanup, the other is to bring down the SCCP link properly.
2010-04-05nat: Remember a pending delete on an endpoint and carry it out laterHolger Hans Peter Freyther1-0/+8
2010-04-05nat: remove is called on already patched connections..Holger Hans Peter Freyther1-5/+1
Fix the test to search for the original message instead of the already patched one that should not find any items anyway. The remove is called on already patched connections so we need to match it with the patch reference count.
2010-04-05nat: Print the SCCP ref's as hex numbersHolger Hans Peter Freyther1-1/+1
This allows to more easily compare the numbers with traces seen in wireshark.
2010-04-05nat: Avoid crashing when we have no pending transactionHolger Hans Peter Freyther1-0/+3
2010-04-05nat: Logging improvement for the nat.Holger Hans Peter Freyther3-3/+6
Print some more information, e.g. when a BSC is connected and authenticated, print the SCCP ref number.
2010-04-05nat: Print the MSC multiplex as wellHolger Hans Peter Freyther1-2/+4
2010-04-05nat: Remember where the BTS is listening for things.Holger Hans Peter Freyther1-1/+16
Extract the port from the BSS's MGCP Gateway so we know where to forward the data to.
2010-04-05nat: No need to match \r\n when parsing the C: NHolger Hans Peter Freyther1-1/+1
2010-04-04nat: Remove the broken empty line check, follow \n vs \r\n of inputHolger Hans Peter Freyther1-9/+13
Instead of checking the token for NULL we need to check if running was set to null. Look at the data of the token and check if the line was ending with a \r\n or \n and then when rewriting a line use that line ending as well. Add a new test for that.
2010-04-04nat: Use a ptr that was allocated by tallocHolger Hans Peter Freyther1-1/+1
The endp is part of an array allocated by talloc and simple array members do not qualify as a context start address.
2010-04-04nat: Make rewrite work on string, read to a string first, copy to msgbHolger Hans Peter Freyther1-15/+18
The MGCP protocol parsing is adding '\0' to make sure we do not parse beyond where we should parse. This does not mix with strtok or similiar routines. For now we will read the msg into a global array first, then copy it to the msgb for mgcp protocol handling and if we are required to forward it to the MGCP we have a untouched copy we will modify into our own msgb.
2010-04-02nat: Check the authentication bit later...Holger Hans Peter Freyther1-6/+12
When moving it up here the code started to reject the identity responses of the bsc and we would never authenticate. Move it back down.
2010-04-01nat: Return MGCP messages to the call agentHolger Hans Peter Freyther2-0/+82
Attempt to find the message by transaction id, then patch the response and use the IP/PORT of the local network, update the ci with the one from the BSC. This is currently not tracking any state of the MGCP and will not handle two bsc's... this will need to happen later. With this in we should be feature complete and now enter the mode of making all of this work reliable and fixing thinko's and other bugs.
2010-04-01nat: Allow to send MGCP messages from the BSC to the networkHolger Hans Peter Freyther1-0/+3
2010-04-01nat: Handle CRCX/MDCX/DLCX at the natHolger Hans Peter Freyther3-32/+131
* Forward a rewritten msg to the BSS. We change the IP and port to point to the NAT instead of the core network. We also keep track of the BSC and the transacition id. * Handle the case where we have not found a SCCP connection and need to send a response ourselves.
2010-04-01nat: Test rewriting of MGCP messages to patch ip and portHolger Hans Peter Freyther1-0/+61
Add code to change the ip and port for audio data inside MGCP messages. This is needed because the BSS might be behind the NAT and can not reach the network directly and might be behind a nat so the announced sourceport is not the one as we see it.
2010-04-01nat: Add code to find a BSC connection by the given msc multiplexHolger Hans Peter Freyther1-0/+17
2010-03-31nat: First go at handling MGCP inside the natHolger Hans Peter Freyther2-0/+115
Listen on the MGCP gateway port and let our protocol stack handle everything for now. We will need to have some more control over things though.
2010-03-31nat: In the case of losing the MSC, reset all endpointsHolger Hans Peter Freyther2-0/+11
When losing the SCCP connection make sure that we free all endpoints. The disconnection of the BSC should already make sure they are closed but this makes sure everything is properly reset.
2010-03-31nat: bsc_mgcp_clear is called from within the remove functionHolger Hans Peter Freyther1-4/+1
No need to call it twice... All endpoints should be properly freed as part of the SCCP disconnection.
2010-03-31[nat] Send a RSIP down to the BSC after it connectsHolger Hans Peter Freyther1-0/+41
Make sure the MGCP attached to the BSC is resetting all endpoints whenever the BSC is connecting to us as we assume that all endpoints are available.