aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
AgeCommit message (Collapse)AuthorFilesLines
2010-04-04bsc_msc_ip.c: Fix the reading of data...Holger Hans Peter Freyther1-1/+1
len contains the actual length of the message and data_len contains the size of the message. We want to read up to data_len and not up to 0 bytes.
2010-04-04bsc_msc_ip.c: Use another kernel feature to bind to a random portHolger Hans Peter Freyther1-8/+2
2010-04-04bsc_msc_ip.c: Use strerror to print the errno variable.Holger Hans Peter Freyther1-2/+2
2010-04-04Revert "bsc_msc_ip: Use the autobind functionality of the kernel"Holger Hans Peter Freyther1-1/+18
The autobind is not working as I wanted it to work. So we will revert this for now and then try something else. This reverts commit fd876b7488a8ae924f1a09144265d4474495408f.
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-02bsc_msc_ip.c: Return after having freed the msgbHolger Hans Peter Freyther1-2/+7
When reading MGCP is failing (e.g. because the udp socket is not connected yet) we would have freed the msgb but we didn't return and then executed msgb_put on a dead buffer.
2010-04-01nat: Return MGCP messages to the call agentHolger Hans Peter Freyther4-0/+116
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 Freyther2-0/+15
2010-04-01nat: Handle CRCX/MDCX/DLCX at the natHolger Hans Peter Freyther4-32/+146
* 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-01[mgcp] Look at the bts addr set at the endpointHolger Hans Peter Freyther1-1/+3
This will allow to discover the ports of a bts when we only know the addr and have multiple bts's to handle.
2010-04-01nat: Test rewriting of MGCP messages to patch ip and portHolger Hans Peter Freyther4-0/+152
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 Freyther3-2/+62
2010-04-01[mgcp] Export header parsing via mgcp internalHolger Hans Peter Freyther2-14/+21
This will be used by the NAT code to implement custom protocol handling on top of that.
2010-03-31[mgcp] Do not operate on the ->data pointer, use ->l2h insteadHolger Hans Peter Freyther1-4/+4
This would have been broken once we attempt to parse encapsulated MGCP messages.
2010-03-31bsc-msc: Flush the write queue when we have lost the connectionHolger Hans Peter Freyther1-0/+1
2010-03-31nat: First go at handling MGCP inside the natHolger Hans Peter Freyther3-0/+117
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-31[mgcp] Degrade verbosity to debugHolger Hans Peter Freyther1-1/+1
2010-03-31nat: Add an example configuration for the BSC NAT with MGCPHolger Hans Peter Freyther1-0/+9
2010-03-31[mgcp] Add a new config option to set the call agent ip addrHolger Hans Peter Freyther2-0/+15
In the case of the nat we only want to communicate with one upstream call agent and this can now be configured.
2010-03-31[mgcp] Regroup struct mgcp_cfg members and provide some hintsHolger Hans Peter Freyther1-4/+10
2010-03-31[mgcp] Add a helper function to convert from GSM0808 ts/mux to MGCP endpointHolger Hans Peter Freyther2-3/+9
Move the conversion of GSM0808 timeslot and multiplex from the bssap.c into the mgcp.h so it can be reused by multiple users. The weird math comes from the mapping of the MSC...
2010-03-31nat: In the case of losing the MSC, reset all endpointsHolger Hans Peter Freyther4-0/+14
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-31bsc_msc_ip: Use the autobind functionality of the kernelHolger Hans Peter Freyther1-18/+1
We do not care about the source port for the callagent relay and can use the autobind functionality of the kernel to pick a port for us...
2010-03-31bsc_msc_ip: Create a local UDP socket and relay MGCP messagesHolger Hans Peter Freyther1-5/+144
Attempt to bind to the local callagent port and send messages from the MSC TCP connection to the MGCP and do it the otherway around as well.
2010-03-31[nat] Send a RSIP down to the BSC after it connectsHolger Hans Peter Freyther2-1/+43
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.
2010-03-31[mgcp] Handle the RSIP with resetting all endpointsHolger Hans Peter Freyther1-0/+24
We could change that the message came from a special ip address/port to secure this service in general but we don't do that right now.
2010-03-31[mgcp] Add some parsing for RSIP messages coming inHolger Hans Peter Freyther2-0/+13
This will just call a callback and leave all the handling to the application.
2010-03-31[mgcp] Remove unused method from the mgcpHolger Hans Peter Freyther1-6/+0
This was removed when sending the RSIP was removed from the code.
2010-03-31[mgcp] Switch from DEBUG to LOGP in the mgcp_main.cHolger Hans Peter Freyther1-2/+2
2010-03-30[mgcp] Remove the sending of RSIPHolger Hans Peter Freyther3-31/+0
This message is ignored by the call agent and we were sending this on the first request which we maybe should not ignore...
2010-03-30db: Fix aliasing warning by casting the signed char to a structHolger Hans Peter Freyther1-3/+6
When we have assigned the cn we will use mempcy to copy the one byte into the target. Use a static assert to assure that the type have the same size. warning: dereferencing type-punned pointer will break strict-aliasing rules
2010-03-30[misnd] Use the size_t modifier when printing the size.Holger Hans Peter Freyther1-1/+1
2010-03-30[ipaccess] Avoid bogus compiler warning about uninitialized varsHolger Hans Peter Freyther1-0/+1
2010-03-30nat: Add MGCP code and parsing to the nat code..Holger Hans Peter Freyther4-1/+14
For the nat we will have NAT and MGCP in the same process and this commit starts with that. We are linking in the MGCP code and one can embed MGCP config snippets...
2010-03-30[mgcp] The networking code needs a source addrs..Holger Hans Peter Freyther1-0/+5
Make the source address mandantory and complain about complain when it is missing. The address is mandantory as it needs to be put into the MGCP messages...
2010-03-30[mgcp] Move mgcp init into the main method...Holger Hans Peter Freyther2-12/+15
2010-03-30[mgcp] Fix format string usageHolger Hans Peter Freyther1-1/+1
2010-03-30nat: Look at the assignment command and remember on which timeslot the data isHolger Hans Peter Freyther8-4/+134
This information will be needed when we are trying to forward MGCP connections to and from the BSC through the IPA protocol.
2010-03-30sccp: Move the destruction of the sccp connection to a new placeHolger Hans Peter Freyther4-7/+14
2010-03-30nat: Return the SCCP connection, change order of patching and updatingHolger Hans Peter Freyther4-50/+44
* Return the SCCP connection. This will be needed to store the assigned timeslot in there. * Update code to work with this change * This uncovered a bug in the CC handling, at the time the BSC was passed it was still a null pointer and the code would have failed.
2010-03-30misc: Do not prepend 0x when using %p in printf.Holger Hans Peter Freyther3-10/+10
2010-03-30nat: Fail more early in the case of not being authenticatedHolger Hans Peter Freyther1-5/+7
This is also fixing a possible memory leak.
2010-03-30nat: Add test case and data for paging by lac test.Holger Hans Peter Freyther2-1/+55
2010-03-30nat: Some more input validation... on the paging command.Holger Hans Peter Freyther1-0/+5
2010-03-30nat: Documentation fix... use nat for the parameterHolger Hans Peter Freyther1-1/+1
2010-03-30nat: Verify that the configured LACs are unique across the natHolger Hans Peter Freyther1-0/+9
2010-03-30nat: Move paging by lac handling code into the utils fileHolger Hans Peter Freyther4-29/+48
Moving it here means we can more easily test this code, there is one behaviour change with the code that we only support paging messages with one LAC and will silently ignore the others.
2010-03-30nat: Add a test case for the connection trackingHolger Hans Peter Freyther3-2/+219
This test case tests connectiont tracking by sending a CR, getting a CC, sending a DTAP, receiving a DTAP, receiving a RLSD, sending a RLC. It verifies that the messages are properly patched specially the references at the BSC.
2010-03-29nat: Fix the lookup of connections to and from the BSCHolger Hans Peter Freyther1-11/+43
When sending a message to the MSC in the case of DT1 messages we only have the address of the MSC, so we need to go with that, otherwise (e.g. in case of a CR, RLC) we do have the source address and need to patch it. When forwarding a message to the BSC we do receive a msg that should contain the patched address, we need to unpatch it...