aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat
AgeCommit message (Collapse)AuthorFilesLines
2013-07-05nat: number could point to an address on the stack that can be reusedHolger Hans Peter Freyther1-1/+1
The number = int_number assignment will make the number point to the stack and as the int_number goes out of scope at the end of the if statement other code could re-use this stack for other memory. Fixes: Coverity CID 1042325
2013-07-05nat: Address coverity warning about uninitialized addrHolger Hans Peter Freyther1-0/+1
Use memset on the addr to initialize the entire structure. Fixes: Coverity CID 1042324
2013-07-05nat: Please coverity and initialize the saveptr to NULLHolger Hans Peter Freyther1-1/+1
Coverity complains about the saveptr used in the strtok_r. This is not a bug because we pass a string as part of the first call to strtok_r but it is easier to just initialize it. Addresses: Coverity CID 1042323
2013-07-03nat: Fix compiler warning and cast uint16_t to uint8_tHolger Hans Peter Freyther1-2/+2
2013-06-12Makefile.am: Use AM_CPPFLAGSAlexander Huemer1-1/+1
Since automake 1.13 INCLUDES is depricates and causes a warning
2013-05-13nat: fix use after free in forward_sccp_to_btsPablo Neira Ayuso1-2/+5
valgrind detected an use after free in the path of forward_sccp_to_bts. The 'parsed' object is referenced from update_con_authorize.
2013-04-29nat: Include LAC/CI as TV values at the end of the 'status' messageHolger Hans Peter Freyther1-0/+10
Extend the status message and send LAC/CI as part of the status message. It is using TV to allow sending more fields in the feature. We only need to encode the data and this is why there is no tlv description yet.
2013-04-22nat: Use memcmp for the token on the USSD interface as wellHolger Hans Peter Freyther1-6/+13
This is similar to the token on the A-interface. There are no more token based authentication in the NAT.
2013-04-22nat: Move the callstats to a new header file due sccp usageHolger Hans Peter Freyther1-0/+1
The bsc_nat.h is included by common_vty.c so we may not used sccp_types.h in the bsc_nat.h header file. Move the callstats to a new file and include it where it is needed.
2013-04-16nat: Extract the LAC/CI from the Complete Layer3 InformationHolger Hans Peter Freyther2-2/+65
Find the Cell Identifier from the Complete Layer3 Information and store it for future reference. We could begin to verify that the LAC/CI used really belongs to the BSC.
2013-04-16nat: Rename "struct sccp_connections" to "struct nat_sccp_connection"Holger Hans Peter Freyther7-48/+48
The name sccp_connection is used in the osmo-sccp code, sccp_connections was used in the NAT for tracking a sccp_connection. Rename it so it is obvious that the struct belongs to the nat. The rename was done with sed: $ sed -i s,"struct sccp_connections","struct nat_sccp_connection",g \ include/openbsc/*.h src/osmo-bsc_nat/* tests/*/*
2013-04-16nat: Allow to re-write international numbers in the CC Setup messagesHolger Hans Peter Freyther1-7/+19
Prepend the international number with a '+' and then do the normal re-writing on it. There are a couple of ways to handle this: \+([0-9]), \+[0-9][0-9]([0-9]), \+49([0-9]) Add a test case for the international re-write based on an already internationalized number.
2013-04-16nat: Allow to daemonize the NAT processHolger Hans Peter Freyther1-1/+5
Add handling for the 'D' option
2013-04-16nat: Name the variable more properly and begin with net.1.bsc.%dHolger Hans Peter Freyther1-3/+4
We can identify the NAT and BSC given the types of the variable, no need to put them into the value itself.
2013-04-16nat: Include the sccp_src_ref and sccp_dst_ref for this callHolger Hans Peter Freyther1-2/+6
This can help with some post analysis for failed calls and helps finding the connection in the pcap trace.
2013-04-16nat: Do not allow the amount of pending responses to grow infinitelyHolger Hans Peter Freyther1-0/+15
Limit the amount of pending DLCX responses to three times the amount of available endpoints. Currently all MGCP messages are sent and handled in sequence.
2013-04-16nat: Reword the log messages as this is normal operationHolger Hans Peter Freyther1-1/+1
The bsc_mgcp_dlcx method is called from the mgcp policy callback but also from inside the nat core when the SCCP connection is going away.
2013-04-16nat: We want the remote to respond to our DLCX requestHolger Hans Peter Freyther3-9/+165
We want to send a TRAP with the MGCP statistics from the NAT and the connected BSC. The BSC endpoint can be either released because of a DLCX from the MGCP CallAgent or the SCCP Connection release on the A-link. This is why we need to queue the statistics when the deleting the endpoint on the BSC. The processing is continued once the response arrives. This code assumes that the response of the DLCX will be sent by the remote side. The current amount of outstanding responses can be seen on the VTY. This assumption is based on the fact that the BSC has already responded to the CRCX and maybe to the MDCX. The MGCP RFC is bended to prefix the transaction identifier with "nat-" to easily detect the response and hand it to the handler. This will then parse the response and generate the TRAP. The current version is v1. We assume that the transaction space is big enough and we will not re-assign the transaction identifier too early.
2013-04-16nat: Make it possible to send MGCP messages through the IPA multiplexHolger Hans Peter Freyther3-15/+95
Instead of handling MGCP through the UDP socket, read and write messages through the ipa connection to the MSC.
2013-04-16nat: Move all methods sending a response to the callagent to a single placeHolger Hans Peter Freyther1-10/+11
For testing it can be nice to handle MGCP messages through the IPA protocol. Prepare the code to send the messages through other means.
2013-04-16nat: Address the FIXME and send the MDCX down to the BSCHolger Hans Peter Freyther1-1/+1
2013-04-02nat: Fix authentication by-pass using shorter tokensHolger Hans Peter Freyther1-2/+20
The token was compared with the configured one but only up to a user supplied length. Compare the token sizes and then use memcmp for the actual comparison to make sure to compare the right ammount of characters. There is no unit-test but there should be one.
2013-01-15nat: Fail if the control interface can not be initializedHolger Hans Peter Freyther1-0/+4
2013-01-07nat: Send a CM Service Reject for NAT_CON_TYPE_SSA as wellHolger Hans Peter Freyther1-1/+1
For USSD we remember that it is a supplementary service but this means we sent no CM Service Reject down to the subscriber. Treat NAT_CON_TYPE_CM_SERV_REQ and NAT_CON_TYPE_SSA the same and send a cm service reject.
2013-01-07nat: Introduce a global IMSI barr list using red-black treesHolger Hans Peter Freyther2-15/+176
2013-01-07nat: Simplify the code and call auth_imsi from the main methodHolger Hans Peter Freyther1-24/+29
Do the auth check in bsc_nat_filter_sccp_cr, remove the cause from the signature again. For the bsc_nat_filter_dt restructure the flow but leave the auth inside the id response message. Return 1 when the IMSI has been extracted as indicator for running the auth check. 1 has not been used before and is safe to be used as this indicator.
2013-01-07nat: Get the cause into the imsi_auth method in preparationHolger Hans Peter Freyther1-13/+19
For the new barr feature get the cause struct down to the imsi_auth code so we can add the blacklist there.
2013-01-07nat: Allow the filter to select the reject causeHolger Hans Peter Freyther2-16/+30
In preparation for another kind of black-list allow the filter code to decide how the connection should be rejected. Introduce a new struct that will carry the reject causes for certain operations.
2013-01-07nat: Move the IMSI/TMSI filtering to a new and dedicated fileHolger Hans Peter Freyther3-282/+322
Move all routines related to filtering to a separate file.
2013-01-07nat: Fix a typo in the log message for out of memoryHolger Hans Peter Freyther1-1/+1
2013-01-07nat: Extract the message re-writing from the utils to a dedicated fileHolger Hans Peter Freyther3-590/+629
Move the code around to make it more clear what the routines should do.
2012-11-12nat: Move the ctrl handling code into a separate fileHolger Hans Peter Freyther3-281/+328
Move to the control command handling out of the main file into a dedicated module. There are still some calls embedded into the main code but it will be moved soon.
2012-11-07nat: sizeof char * != sizeof char[], make the code work on 64bit systemsHolger Hans Peter Freyther1-6/+6
The test cases were failing on 64bit systems because the sizeof code operated on the pointer size which is 8 and longer than the size that was intended to be used for comparing it.
2012-11-07nat: Inject a a=fmtp:%d to force the right AMR codeHolger Hans Peter Freyther1-3/+24
This assumes that AMR is used and/or the mode-set is ignored for other codecs by the remote end.
2012-10-30mgcp: Fix the log message. This is inside the MDCX printing routineHolger Hans Peter Freyther1-1/+1
2012-10-29nat: Make MGCP helper routine static as it is internal to the MGCP codeHolger Hans Peter Freyther1-1/+1
2012-10-29nat: Document the high level goal of the MGCP/NAT routinesHolger Hans Peter Freyther1-2/+26
Provide some high level documentation that might help to understand what this code is supposed to be doing.
2012-09-11nat: Change the ctrl command pathDaniel Willmann1-13/+12
The commands net.<netid>.bsc.<bscid>.* are now forwarded to the appropriate osmo-bsc. <netid> for now is just 0. <bscid> is not the LAC anymore (since that could be ambiguous), but instead the number as configured in bsc-nat.cfg
2012-09-11ctrl: Improve error handling if controlif setup failsDaniel Willmann1-1/+10
2012-09-11nat: Add support for traps to the natDaniel Willmann1-0/+7
2012-09-11libctrl: Change controlif_setup so it returns the ctrl handleDaniel Willmann1-2/+4
nat: Catch up with controlif_setup API change We now save a control handle reference in the nat osmo-bsc: Catch up with controlif_setup API change We now save a control handle reference in the gsm network
2012-08-17VTY: improve VTY prompt and make sure exit/end works everywhereHarald Welte1-3/+5
Some nodes below 'config' didn't have ournode_exit / ournode_end, and thus were not able to properly perform this function. exit should always only go back one level, while end drops us back to ENABLE_NODE. The prompt now represents the nesting level, and there's one consistent space after the final prompt character (typically #).
2012-07-28nat: Document all parameters of the VTY commandsHolger Hans Peter Freyther1-26/+50
2012-01-18nat: Add VTY command for the TP-DA rewriting.Holger Hans Peter Freyther1-0/+27
2012-01-18nat: Fix the no sms-clear-tp-srr commandHolger Hans Peter Freyther1-1/+1
2012-01-18nat: Internationalize the TP-DA if it starts with a 00Holger Hans Peter Freyther1-1/+4
Internationalize the number like we do it for Call Control. Update the test result to match this new behavior.
2012-01-18nat: Prepare to rewrite the TP-DA number of a SMS submit.Holger Hans Peter Freyther1-35/+114
Introduce number rewriting of SMS-SUBMIT. Introduce a new list, move code around to help with finding a new number, somehow the number encoding for TP-DA is borked, 03.40 references 04.11 but the length appears to be strlen(number) without taken the type field into account.
2012-01-17mgcp: Provide documentation for the method, check sscanf returnHolger Hans Peter Freyther1-0/+8
2012-01-11nat: Add the line break after the '.0.10.1Holger Hans Peter Freyther1-1/+1
2012-01-10nat: Implement clearing of TP-SRR flags from TPDUsHolger Hans Peter Freyther2-4/+67
Match IMSI and destination address against a set of entries, if it is matching the header will be modified and no sender report will be requested. Change the test case to request the sender report and then verify that this bit is reset to 0.