aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2013-07-06mncc: Remove what we believe to be a tautology from the MNCC codeHolger Hans Peter Freyther1-14/+16
Coverity pointed out that we use trans->subscr after a NULL check, it is our believe that every transaction will have a subscriber. Remove the check and add an assert before we are dispatching things. Fixes: Coverity CID 1040740, CID 1040739
2013-07-05nat: The con variable is not assigned at this pointHolger Hans Peter Freyther1-5/+0
Coverity pointed out that this code is logically dead. Quickly judging the code we will forward the RSLD message anyway. Remove the code for now and next time I work on the NAT/USSD bridge I will have a look at the flow of the RLSD messages. Fixes: Coverity CID 1042327
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-04nitb: Add a missing NULL check for searching the subscriberHolger Hans Peter Freyther1-1/+8
"subscriber " SUBSCR_TYPES " ID sms pending-send could fail with an invalid ID/IMSI for the subscriber. Fixes: Coverity CID 1040715
2013-07-04db: Fix an issue with the memsetHolger Hans Peter Freyther1-1/+1
We want to memset the entire area of the atuple and not just the first four/eight bytes of the data. Fixes: Coverity CID 1040708
2013-07-04gsm_subscriber: Fix compiler warning of the printf stringHolger Hans Peter Freyther1-1/+1
This fixes both a GCC and a Coverity warning: GCC: gsm_subscriber.c: In function ‘subscr_expire_callback’: gsm_subscriber.c:389:2: warning: format ‘%i’ expects argument of type ‘int’, but argument 8 has type ‘long long unsigned int’ [-Wformat] Coverity: CID 1040712
2013-07-04nat: The second call didn't really add anything to the test.Holger Hans Peter Freyther1-3/+0
Avoid: Coverity CID 1042323
2013-07-04ipaccess-config: Add missing break to parsing the -L optionHolger Hans Peter Freyther1-0/+1
Fixes: Coverity CID 1040738
2013-07-04ipaccess-config: Fix a resource leak in an error pathHolger Hans Peter Freyther1-0/+1
Fixes: Coverity CID 1040710, CID 1040711
2013-07-04sgsn: Fix the unimplemented/uninstalled show ggsn commandHolger Hans Peter Freyther1-7/+0
This is fixing a GCC and Coverity warning. GCC: sgsn_vty.c: At top level: sgsn_vty.c:308:1: warning: ‘show_ggsn_cmd’ defined but not used [-Wunused-variable] Coverity: CID 1040727
2013-07-04sgsn_vty: Fix uninitialized variable in the gprs_apn2str methodHolger Hans Peter Freyther1-1/+1
This is fixing a GCC and Coverity warning: GCC: sgsn_vty.c: In function ‘vty_dump_pdp’: sgsn_vty.c:64:5: warning: ‘i’ may be used uninitialized in this function [-Wmaybe-uninitialized] sgsn_vty.c:49:15: note: ‘i’ was declared here Coverity: CID 1040706
2013-07-04sgsn: Fix logically dead code in regard to the osmo_fd_registerHolger Hans Peter Freyther1-4/+9
The code was written like checking the return value of the osmo_fd_register but the rc variable was not assigned for the subsequent calls. Fixes: Coverity CID 1040741
2013-07-04sgsn: Fix lengths of MS Network Capability and MS Radio Access Capability ↵Alexander Chemeris2-6/+5
elements. Original code was inconsistent about lengths and could lead to out of bounds write. Lengths were also inconsistent with the TS 24.008. Fixes: Coverity CID 1040714.
2013-07-03hsl: Remove the support for the HSL bts from OpenBSCHolger Hans Peter Freyther14-498/+6
The support has been implemented for an old model, we were told that newer versions would be made incompatible with OpenBSC. Ther are various warnings in the code and coverity has found some new ones. Just remove the code as we don't know of anyone using this code.
2013-07-03nat: Fix compiler warning and cast uint16_t to uint8_tHolger Hans Peter Freyther1-2/+2
2013-07-03mgcp: Make sure the save pointer is initialized with NULL.Holger Hans Peter Freyther1-1/+1
Coverity is not happy about it but it doesn't appear to be a real issue as the data will not be NULL on the first call. Addresses: Coverity CID 1040704
2013-07-03ipaccess-find: Address a warning by coverity of unitialized memoryHolger Hans Peter Freyther1-0/+1
Use a memset on the sockaddr_in to make coverity happy. Fixes: CID 1040705
2013-07-03isdnsync: Remove a double close of the isdn deviceHolger Hans Peter Freyther1-1/+0
The fd is already closed above the if statement and Coverity detected this as a double close. Fixes: Coverity CID 1040703
2013-06-30nanobts: Do not crash on an invalid TRX numberHolger Hans Peter Freyther1-1/+1
In case the specified trx number is not configured, do not crash but return NULL from the function. The libosmo-abis library should close the connection for us then.
2013-06-24tests: Add a custom test runner to test the VTY functionality.Holger Hans Peter Freyther2-1/+112
Begin with the NAT code. It is not clear yet if we will have one file with all the tests or will have a sub directory with *.py files. In the long run the base class will move to the osmo-python-tests module.
2013-06-24misc: Ignore compiled python code and another test caseHolger Hans Peter Freyther1-0/+2
2013-06-24Introduced support for external python testsKaterina Barone-Adesi7-63/+145
The test scripts warn about missing documentation, untested configs, check common errors, and stub out testing individual VTY commands. The scripts have been moved to the another osmocom repository, python/osmo-python-tests The features were requested by zecke.
2013-06-24ctrlif: Flush/Clear write_queue when closing the control socketHarald Welte1-0/+1
2013-06-24bsc_vty: Print human-readable string version of NM ADM STATEHarald Welte1-2/+3
2013-06-21GPRS LLC: Add non-standard method of sequence number recoveryHarald Welte2-1/+21
In some situations (like MS reboot without prior DETACH or SGSN reboot without prior MS detach), the LLC sequence numbers for UI mode could be different on both sides. The LLC spec unfortunately doesn't permit us to send something like a FRMR in this case, but instructs us to silently discard the frame. At that time the remote LLC entity will re-transmit the frame with the same seqeunce number over and over again, which we will drop again and again. The mthod used now will keep track of the last received UI sequence number. If that number is retransmitted for three times in a row, then we accept this sequence number and recover from that point on.
2013-06-19osmo-bsc VTY: fix saving of codec-listHarald Welte1-1/+1
the codec-list parser expects only spaces between the elements of the list, while the 'save' code is putting ", " between the elements
2013-06-12smpp: Only write the systemd-id if it is not emptyHolger Hans Peter Freyther1-1/+1
system_id is a char array, which makes the NULL check a tautology, so we should check with strlen if the string is empty or not. This is fixing the "write" command of VTY that would otherwise create a config file that can not be parsed.
2013-06-12Makefile.am: Use AM_CPPFLAGSAlexander Huemer24-24/+24
Since automake 1.13 INCLUDES is depricates and causes a warning
2013-05-29vty: Print the state of all GPRS OML objects in show btsHolger Hans Peter Freyther1-0/+8
For debugging GB-proxy/IPA issues it is nice to see the state of the OML objects.
2013-05-28SMPP: Add new 'dcs_transparent' ESME settingHarald Welte3-9/+58
If an ESME has the dcs_transparent config flag, then the TP-DCS of MO-SMS is transparently passed to SMPP and not converted to SMPP specific data_coding values. This is needed in cases where ESMEs actually care about the exact TP-DCS, as the conversion from TP-DCS to SMPP data_coding is not bijective.
2013-05-28SMPP: Pass on 0xFx style DCS from SMPP to GSMHarald Welte1-17/+33
There are multiple ways how the TS 03.38 TP-DCS can indicate 8bit or 7bit messages. SMPP has it's own data coding specification, which is different from TS 03.38. However, some SMPP ESMEs want to be able to have fine-grained control over the TP-DCS indicated in the TPDU header. If such values like 0xF6 are used in SMPP, we now transparently pass them on to the GSM side.
2013-05-26SMPP: Respond with BIND_TRX_RESP to BIND_TRX, not BIND_TX_RESPHarald Welte1-1/+1
2013-05-21mgcp: Initialize the tone to CHAR_MAX as this might not be a requestHolger Hans Peter Freyther1-1/+1
The RQNT message might not contain a 'S:' line with the actual tone to play. Instead of calling the callback with the 0 as tone just leave early. Example: X: 6B9519B88F0 R: D/[0-9#*](N), G/ft, fxr/t38
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-05-02channels: Mark channels as broken that time out on activation/releaseHolger Hans Peter Freyther1-4/+27
A channel that fails to send an ACK/NACK/REL within the four second timeout is now marked as broken. In case the release comes in late it will be ignored. The lchan should already been freed and for now we don't want to trust the channel. In the future we might want to send a "release" for a channel that got activated ack late and just set the state to none on a channel that is released acked late. The late ACK and REL has been tested with two manual tests using the fakebts. The channels remained blocked even after having received the ACK message here. The NACK case has not been manually tested.
2013-04-29Merge branch 'zecke/features/sysmobts'Holger Hans Peter Freyther3-35/+22
* This branch make the type sysmobts work. * Asssume a bsc_gsmnet variable to be defined. * This allows to use channel configurations not supported by the nanoBTS. * Manually tested with the FakeBTS and tested by users.
2013-04-29ipaccess: Remove the ipaccess_gsmnet and assume there is a bsc_gsmnetHolger Hans Peter Freyther2-8/+7
Assume that there is a bsc_gsmnet and modify the ipaccess-config to provide this symbol. If a bsc_gsmmnet is not available when linked the linker will complain and fail. E.g. give an error like this: ../../src/libbsc/libbsc.a(bts_ipaccess_nanobts.o): In function `ipaccess_sign_link_up': src/libbsc/bts_ipaccess_nanobts.c:550: undefined reference to `bsc_gsmnet'
2013-04-29sysmobts: Make the nanoBTS NM code work for the sysmobtsHolger Hans Peter Freyther1-2/+2
Use the is_ipaccess_bts method to check if this is either is nanoBTS or sysmoBTS. The sysmobts type can now be used to bootstrap a bts.
2013-04-29sysmobts: Initialize the NM signal handler only once in a mixed networkHolger Hans Peter Freyther1-1/+2
Make sure that the bts_ipa_nm_sig_cb is only installed once. In a nanoBTS + sysmoBTS network the _start method will be called for each mode leading to the handler being registered twice. Make sure that there is only one handler registered by unregistering a previously installed handler. The osmo_signal_unregister_handler will remove 0 or 1 handlers per invocation and we only add one handler in this file so it is always balanced.
2013-04-29sysmobts: Avoid a crash when trying to look-up a BTSHolger Hans Peter Freyther2-26/+13
The nanoBTS code is trying to find a struct gsm_bts based on the ipaccess_gsmnet and the ipaccess_unit data. The pointer is not initialized in the case of a sysmoBTS leading to a classic NULL pointer dereference. Move the feature init into the _init method. This way we can re-use the start code of the nanoBTS. This ensures that the ipaccess_gsmnet pointer is properly initialized and that the signal handlers are installed.
2013-04-29nat: Include LAC/CI as TV values at the end of the 'status' messageHolger Hans Peter Freyther2-1/+12
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-29smpp: Attempt to fix a memory leak of the msgbHolger Hans Peter Freyther2-1/+6
The smpp_pdu_rx method does not free the msgb. Introduce an annotation (currently defined to nothing) to indicate what will happen to a msgb.
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 Freyther3-28/+56
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-18nat: Add an example for a black listHolger Hans Peter Freyther1-0/+1
2013-04-17ctrl: Provide a reply in case the range check failedHolger Hans Peter Freyther1-0/+1
2013-04-17ctrl: Make the commands static to not pollute the namespaceHolger Hans Peter Freyther1-3/+3
We do not need to access these commands from another compilation unit and can just make it static.
2013-04-16nat: Extract the LAC/CI from the Complete Layer3 InformationHolger Hans Peter Freyther6-2/+107
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.