aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2014-07-22mgcp: Provide more information about configured endpointsHolger Hans Peter Freyther1-13/+26
2014-07-22mgcp: Fix memory leak in the transcoding codeHolger Hans Peter Freyther1-1/+1
The GSM handle was never released. This was found using valgrind and the leak check. ==14933== 752 bytes in 1 blocks are definitely lost in loss record 15 of 19 ==14933== at 0x4028B4C: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==14933== by 0x4130201: gsm_create (in /usr/lib/i386-linux-gnu/libgsm.so.1.0.12) ==14933== by 0x80517AE: mgcp_transcoding_setup (mgcp_transcode.c:199) ==14933== by 0x8049691: given_configured_endpoint.isra.1 (mgcp_transcoding_test.c:198) ==14933== by 0x8049C11: test_transcode_result (mgcp_transcoding_test.c:328) ==14933== by 0x8049418: main (mgcp_transcoding_test.c:582)
2014-07-22trau_mux.c: Prevent out-of-bounds read in trau_decode_fr()Holger Hans Peter Freyther1-0/+3
Haralds patch in 9f109dfb9926558b6ea504dc3aee92cfd64413bd only fixed the trau_encode_fr part but the issue seems to exist in the decode function as well. Apply the same fix.
2014-07-19smpp: Fix small typo in the commentHolger Hans Peter Freyther1-1/+1
2014-07-17gbproxy: Fix the NAME in the start script...Holger Hans Peter Freyther1-1/+1
NAME is used by start-stop-daemon to stop the process.
2014-07-09bsc: Implement a way to relay a message to the remote MSCHolger Hans Peter Freyther1-0/+41
This is analogue to the notification that is relayed locally and now we have a way to relay a message back to the network.
2014-07-09osmux: Now that we have IPv4/port we might want to consider to expire handlesHolger Hans Peter Freyther1-0/+1
2014-07-09osmux: Mention where the data was coming fromHolger Hans Peter Freyther1-2/+4
2014-07-09osmux: Be accurate. The label has been already createdHolger Hans Peter Freyther1-1/+1
2014-07-08osmux: Make sure to always use the right dummy sending methodHolger Hans Peter Freyther1-6/+11
Make sure to re-use the right method for nat traversal. Found by Roch while looking at traces.
2014-07-08bsc: Use the word core network and not backbone.Holger Hans Peter Freyther1-2/+2
2014-07-08osmux: Remove extra newline from the osmux log messageHolger Hans Peter Freyther1-1/+1
<000b> osmux.c:177 Cannot find endpoint with cid=7 ! <000b> osmux.c:253 Cannot find an endpoint for circuit_id=7 The extra newline and '!' do not provide any extra value and make reading the output more difficult. Just remove it.
2014-07-07gprs/test: Increase stderr log levelJacob Erlbeck1-4/+20
Enable the generation of more log messages. Sponsored-by: On-Waves ehf
2014-07-07gbproxy_test: Provide enough disabled categories to please valgrindHolger Hans Peter Freyther1-1/+6
An empty log_info is not enough. We need to make sure that at least DLGLOBAL is present. Instead of doing that make sure that we have enough entries. ==26163== Conditional jump or move depends on uninitialised value(s) ==26163== at 0x403B289: osmo_vlogp (logging.c:290) ==26163== by 0x403B3DA: logp2 (logging.c:339) ==26163== by 0x804D027: gbprox_relay2bvci (gb_proxy.c:347) ==26163== by 0x804D3CF: gbprox_rx_sig_from_sgsn (gb_proxy.c:589) ==26163== by 0x804DBFC: gbprox_rcvmsg (gb_proxy.c:685) ==26163== by 0x4052CB0: gprs_ns_process_msg (gprs_ns.c:669) ==26163== by 0x4052F70: gprs_ns_rcvmsg (gprs_ns.c:1053) ==26163== by 0x804BB49: gprs_process_message (gbproxy_test.c:488) ==26163== by 0x804BC4C: send_ns_unitdata (gbproxy_test.c:210) ==26163== by 0x804BDE8: send_bssgp_reset_ack (gbproxy_test.c:243) ==26163== by 0x804B54F: main (gbproxy_test.c:863) ==26163==
2014-07-07mgcp: Ignore the transcoding testHolger Hans Peter Freyther1-0/+1
2014-07-07mgcp: Verify that the force-ptime is written back to the fileHolger Hans Peter Freyther3-1/+26
When the command was added it was not verified that. Add a very basic MGCP VTY test and test that the string appears in the config.
2014-07-07mgcp: Fix documentation issue in the force-ptime commandHolger Hans Peter Freyther1-1/+2
<command id='rtp force-ptime (10|20|40)'> <param name='10' doc='(null)' /> <param name='20' doc='(null)' /> <param name='40' doc='(null)' />
2014-07-07rtp: Share the rtp header between the proxy and the mgcp codeHolger Hans Peter Freyther4-59/+41
2014-07-07nat: Fix the documentation issue with the osmux commandHolger Hans Peter Freyther1-1/+1
Documentation error (missing docs): <command id='osmux (on|off)'> <param name='off' doc='(null)' />
2014-07-07gbproxy_test: Reset the gbproxy before we reset GPRS NSHolger Hans Peter Freyther1-3/+3
The peers are (talloc) children of the GPRS NS. This means the peers (and the rate counters) are currently being deleted twice. ==23446== Invalid write of size 4 ==23446== at 0x403C243: rate_ctr_group_alloc (linuxlist.h:66) ==23446== by 0x4050974: gprs_nsvc_create (gprs_ns.c:209) ==23446== by 0x405320D: gprs_ns_instantiate (gprs_ns.c:1330) ==23446== by 0x804ABEB: main (gbproxy_test.c:666) ==23446== Address 0x4300694 is 52 bytes inside a block of size 784 free'd ==23446== at 0x4029DA8: free (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==23446== by 0x4041B9D: _talloc_free (talloc.c:609) ==23446== by 0x4043292: talloc_free (talloc.c:578) ==23446== by 0x40532D3: gprs_ns_destroy (gprs_ns.c:1363) ==23446== by 0x804ABD7: main (gbproxy_test.c:660)
2014-07-07gprs_llc: Prevent llme_alloc/lle_init from reading invalid memoryDaniel Willmann1-1/+1
Make the llc_default_params structure from which data is initialized large enough. Otherwise address sanitizer complains with out-of-bounds reads. Only SAPIs 1, 2, 3, 5, 7, 8, 9, 11 are defined for GPRS but the struct gprs_llc_llme includes NUM_SAPIS lle's and they are populated from the llc_default_params structure.
2014-07-07libbsc, osmo-bsc{, _nat}: Prevent unaligned access when casting TLVP_VALDaniel Willmann3-7/+7
foo = *((uintXX_t *) TLVP_VAL(...) can lead to unaligned access. To prevent that use tlvp_valXX_unal() to get the values.
2014-07-07gbproxy_test: Simplify the test setup by sharing codeHolger Hans Peter Freyther1-30/+24
2014-07-07gprs/test: Add additional gbproxy testsJacob Erlbeck2-1/+460
This adds a test case with several messages to test BSSGP patching. New messages: - BSSGP/DTAP Attach Request - BSSGP/DTAP Attach Accept - BSSGP/DTAP Routing Area Update Request - BSSGP/DTAP Routing Area Update Accept - BSSGP/DTAP Activate PDP Context Request - BSSGP SUSPEND - BSSGP SUSPEND ACK Sponsored-by: On-Waves ehf
2014-07-07gprs/test: Add connect_sgsn() functionJacob Erlbeck1-10/+11
This function abstracts identical code sequences that are used at multiple places. Sponsored-by: On-Waves ehf
2014-07-07gprs/test: Remove verbose parameter of gbprox_dump_* functionsJacob Erlbeck3-36/+30
This parameter is not used (the methods are always called with an argument of 1 in the third position). Thus the parameter is removed completely. Sponsored-by: On-Waves ehf
2014-07-03db: Use ulonglong to access the database for sqlite3Holger Hans Peter Freyther1-14/+14
The type in the schema is integer but we need to use ulonglong to read it as otherwise the read will fail. DBI: -7: The requested variable type does not match what libdbi thinks it should be
2014-06-23trau_mux.c: Prevent out-of-bounds read in trau_encode_fr()Harald Welte1-0/+3
found by -fsanitize=address the last iteration of the loop, where i == 259 and o == 260. It is read out-of-bounds but the content is never used.
2014-06-18nitb: Only print channel activations once in show statisticsHolger Hans Peter Freyther1-3/+0
openbsc_vty_print_statistics will already print these counters for us. No need to print them again.
2014-06-16mgcp: Allow to batch more than four messagesHolger Hans Peter Freyther1-1/+1
2014-06-15gprs: Use area terms LAI/RAI as defined in GSM 03.03Jacob Erlbeck2-87/+87
Currently the terms 'Routing area code' (RAC) and 'Location area code' (LAC) are used in several places where 'Routing area identification' (RAI) or 'Location area identification' (LAI) are meant in fact. This patch replaces RAC/LAC by RAI/LAI and 'code' by 'identification' at these places. Note that RAI := MCC MNC LAC RAC, and LAI := MCC MNC LAC (see GSM 03.03, sections 4.1 and 4.2). Sponsored-by: On-Waves ehf
2014-06-15mgcp: Fix SDP formatting of fmtp_extra (Coverity)Jacob Erlbeck2-26/+1
Currently when ftmp_extra is set, a doubled a=rtpmap line is emitted instead of the fmtp_extra info. This patch fixes replaces the formerly copied and pasted but not modified snprintf parameters by the correct ones. Fixes: Coverity CID 1220873 Sponsored-by: On-Waves ehf
2014-06-15mgcp/test: Add test case using the fmtp_extra infoJacob Erlbeck2-0/+69
Add tests setting the fmtp_extra field to check the response generation. This triggers a bug found by Coverity. Addresses: Coverity CID 1220873 Sponsored-by: On-Waves ehf
2014-06-12proxy: Annotate the switch/case/fall throughHolger Hans Peter Freyther1-0/+1
Use the same comment as some lines earlier in that file. Fixes: Coverity CID 1040737
2014-06-12bsc: Do not use strdup on argv parameterHolger Hans Peter Freyther1-1/+1
Fixes: Coverity CID 1206578
2014-06-05Merge remote-tracking branch 'origin/jerlbeck/features/mgcp-transcoding'Jacob Erlbeck22-66/+2250
2014-06-05mgcp: Set net_end audio params in recvonly modeJacob Erlbeck4-3/+51
Currently, if there is no SDP data in the MGCP message received from the net, the fields containing audio encoding information are not set in net_end. So in recvonly mode transcoding would not be set up correctly. This patch changes the implementation of the code handling CRCX and MDCX to use the codec signalled in the MGCP local connection options (field 'a:') if there isn't any SDP data. This is only halfway negotiation, because the codec is used blindly and not matched against the supported ones. Sponsored-by: On-Waves ehf
2014-06-05mgcp: Move transcoding to libmgcpJacob Erlbeck11-17/+17
This patch moves the files relevant to transcoding from src/osmo-bsc_mgcp to src/libmgcp and src/include/openbsc. Makefiles and include directives are being updated accordingly. Sponsored-by: On-Waves ehf
2014-06-05mgcp/test: Add test cases for transcoding and repackingJacob Erlbeck5-3/+935
This patch adds test cases for transcoding and repacking. Sponsored-by: On-Waves ehf
2014-06-05mgcp: Extend the CLI transcoding tool by ptime conversionJacob Erlbeck1-3/+21
This modification allows it to set the number of samples per packet that is written to the output. Sponsored-by: On-Waves ehf
2014-06-05mgcp: Add packet size (ptime) conversionJacob Erlbeck7-97/+262
The current transcoder implemenation always does a 1:1 recoding concerning the duration of a packet. So RTP timestamps and sequence numbers are not modified. This is not sufficient in some cases, e.g. when the BTS does only allow for a single fixed ptime. This patch decouples encoding from decoding and moves the decoded samples to the state structure so that samples can be combined or drain according to the packaging of incoming and outgoing packets. This patch incorporates parts of Holger's experimental fixes in 0e669e05^..9eba68f9. Ticket: OW#1111 Sponsored-by: On-Waves ehf
2014-06-05mgcp: Add CLI tool to test audio conversionJacob Erlbeck4-0/+123
This tool uses mgcp_transcode.c to convert audio data from stdin to stdout. Sponsored-by: On-Waves ehf
2014-06-05mgcp: Add RTP audio transcodingJacob Erlbeck6-2/+706
This patch implements audio transcoding between the formats GSM, PCMA, L16, and optionally G.729. The feature needs to be enabled by using the autoconf option '--enable-mgcp-transcoding'. In this case mgcp_transcode.c will be compiled and linked to osmo-bsc_mgcp, and the transcoding functions provided will be registered as processing callbacks. If G.729 support is required, libcg729 needs to be installed and '--with-g729' must be passed to ./configure. Ticket: OW#1111 Sponsored-by: On-Waves ehf
2014-06-05mgcp: Only include SDP lines with valid contentJacob Erlbeck1-43/+90
Don't show media related lines if the payload type has not been set. Don't show a 'a=rtpmap' line if the audio_name has not been set. This patch unifies the SDP generation of create_response_with_sdp() and send_msg(). Sponsored-by: On-Waves ehf
2014-06-05mgcp: Add a function to get media info for MGCP responsesJacob Erlbeck4-5/+40
This patch adds the get_net_downlink_format_cb() callback to provide payload_type, subtype_name, and fmtp_extra suitable for use in a MGCP response sent to the network. Per default, the BTS side values are returned since these must be honoured by the net peer when sending audio to the media gateway (unless transcoding is done). Sponsored-by: On-Waves ehf
2014-06-05mgcp: Add audio info fields to struct mgcp_rtp_endJacob Erlbeck2-20/+67
This patch adds the fields channels, subtype_name, and audio_name to the struct. The field audio_name contains the full string that has been used for the last part of a SDP a=rtpmap line. The others contain decoded parts of that string. If no a=rtpmap line has been given (e.g. because dynamic payload types are not used), values are assigned when the payload type matches one of the predefined ones (GSM, G729, PCMA). The patch also moves the audio_name parsing code to a dedicated set_audio_info() function. Sponsored-by: On-Waves ehf
2014-06-05mgcp: Add callbacks for payload processingJacob Erlbeck4-4/+69
This patch adds the callbacks rtp_processing_cb and setup_rtp_processing_cb to mgcp_config to support arbitrary RTP payload processing. Sponsored-by: On-Waves ehf
2014-06-04gprs: Separate LLC parsing from LLC state handlingJacob Erlbeck4-237/+285
Currently LLC parsing is part of gprs_llc.c which needs large parts of the SGSN code parsing to fulfill its link dependencies. This patch moves the functions that just do plain parsing, dumping, and FCS computation to a different file to avoid these dependencies if LLC stateful processing is not needed. It also exposes struct gprs_llc_hdr_parsed and enum gprs_llc_cmd publically. Sponsored-by: On-Waves ehf
2014-06-04gprs/test: Use valid MCC/MNC for BVC RESETJacob Erlbeck2-110/+110
The code currently uses an encoded sequence of (hex) 10 20 30 40 50 60 as RAI, for which no bijective mapping to the set of representations MCC-MNC-LAC-RAC exists. This patch changes the hard-coded RAI to 11 22 33 40 50 60 which maps to 112-332-16464-96 (and vice-versa). Sponsored-by: On-Waves ehf
2014-06-03osmux: Fix the VTY online help in the osmux commandHolger Hans Peter Freyther1-1/+1
This should fix most of: Documentation error (missing docs): <command id='osmux (on|off)'> <param name='off' doc='(null)' /> Documentation error (missing docs): <command id='osmux batch-factor &lt;1-4&gt;'> <param name='&lt;1-4&gt;' doc='(null)' /> Documentation error (missing docs): <command id='osmux (on|off)'> <param name='off' doc='(null)' /> Documentation error (missing docs): <command id='osmux (on|off)'> <param name='off' doc='(null)' /> Documentation error (missing docs): <command id='osmux batch-factor &lt;1-4&gt;'> <param name='&lt;1-4&gt;' doc='(null)' />