path: root/openbsc
AgeCommit message (Collapse)AuthorFilesLines
2016-01-30gsm0408: Provide unique strings for the gsm 04.08 messageHolger Hans Peter Freyther7-63/+63
At Rhizomatica we see that some GSM 04.08 messages are leaked and have no other indication if that is Call Control, SMS or something else.
2016-01-28openbsc/README: some fixes, add CSCN and Iu*Neels Hofmeyr1-6/+10
OsmoNITB stated to include BTS, should be BSC. Reword some outdated statements. Add OsmoCSCN and mention IuCS and IuPS interfaces.
2016-01-28Add README.vty-testsNeels Hofmeyr1-0/+11
2016-01-28remove src/libgb/Makefile.amNeels Hofmeyr1-9/+0
libgb has been obsolete for years, but the Makefile.am is still there. src/Makefile.am does not list it as a subdir, so it's just dangling legacy.
2016-01-28fix bsc_vty out: timeslot indented too deeply.Neels Hofmeyr10-543/+543
In 'show running-config', timeslot appears as a sub-element of rsl, but it is a direct child of trx. Fix the timeslot section in vty_out by removing one space of idention. Adjust various config examples. Rationale: it's not relevant for function, but confuses human operators. Fixing it will save the next hacker some time.
2016-01-26gprs: use libgtp cflagsAlexander Huemer1-1/+1
2016-01-23gtphub: Fix use after free on failureHolger Hans Peter Freyther1-1/+3
Even if fclose fails the stream is inaccessible and the second fclose might cause memory violation. Linux manpage says: Upon successful completion 0 is returned. Otherwise, EOF is returned and errno is set to indicate the error. In either case any further access (including another call to fclose()) to the stream results in undefined behavior. Fixes: CID#57958
2016-01-23db: Avoid undefined behavior when copying cm2/cm3 from the dbHolger Hans Peter Freyther1-2/+4
memcpy has both the source and destination marked as non-null and we were still passing NULL (with a zero size) to it. While this makes sense it violates the constraints of the function. Add the check to see if these values are NULL or not. +db.c:583:2: runtime error: null pointer passed as argument 2, which is declared to never be null + #0 0x40d7f7 in get_equipment_by_subscr (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/openbsc/openbsc/tests/db/db_test+0x40d7f7) + #1 0x40f6d2 in db_get_subscriber (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/openbsc/openbsc/tests/db/db_test+0x40f6d2) + #2 0x40bfaa in sms_from_result_v3 (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/openbsc/openbsc/tests/db/db_test+0x40bfaa) + #3 0x40c847 in update_db_revision_3 (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/openbsc/openbsc/tests/db/db_test+0x40c847) + #4 0x40cbc3 in check_db_revision (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/openbsc/openbsc/tests/db/db_test+0x40cbc3) + #5 0x40cf85 in db_prepare (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/openbsc/openbsc/tests/db/db_test+0x40cf85) + #6 0x406f18 in main /home/builder/jenkins/workspace/Osmocom_Sanitizer/source/openbsc/openbsc/tests/db/db_test.c:179 + #7 0x7fd625638a3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f) + #8 0x405598 in _start (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/openbsc/openbsc/tests/db/db_test+0x405598) + +db.c:590:2: runtime error: null pointer passed as argument 2, which is declared to never be null + #0 0x40da23 in get_equipment_by_subscr (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/openbsc/openbsc/tests/db/db_test+0x40da23) + #1 0x40f6d2 in db_get_subscriber (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/openbsc/openbsc/tests/db/db_test+0x40f6d2) + #2 0x40bfaa in sms_from_result_v3 (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/openbsc/openbsc/tests/db/db_test+0x40bfaa) + #3 0x40c847 in update_db_revision_3 (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/openbsc/openbsc/tests/db/db_test+0x40c847) + #4 0x40cbc3 in check_db_revision (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/openbsc/openbsc/tests/db/db_test+0x40cbc3) + #5 0x40cf85 in db_prepare (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/openbsc/openbsc/tests/db/db_test+0x40cf85) + #6 0x406f18 in main /home/builder/jenkins/workspace/Osmocom_Sanitizer/source/openbsc/openbsc/tests/db/db_test.c:179 + #7 0x7fd625638a3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f) + #8 0x405598 in _start (/home/builder/jenkins/workspace/Osmocom_Sanitizer/source/openbsc/openbsc/tests/db/db_test+0x405598)
2016-01-22gtphub: Make the two setter static as wellHolger Hans Peter Freyther1-2/+2
Same as with the previous gtphub commit. Make these static to deal with the new semantic of inline in gcc5.
2016-01-22dahdi: The driver has moved to libosmo-abisHolger Hans Peter Freyther1-1/+0
We can remove this check from openbsc as the handling is done in libosmo-abis.
2016-01-22gtphub: Fix compilation using gcc5Holger Hans Peter Freyther1-2/+2
The semantic of inline has changed and we need to make it static to not end up with undefined references.
2016-01-15tests/abis: fix format specifiersAlexander Huemer1-5/+5
2016-01-15tests/oap: depend on libgtpAlexander Huemer1-0/+4
exclude logic copied from src/gprs/Makefile.am
2016-01-15bsc/vty: Provide a hint of available inputHolger Hans Peter Freyther1-1/+1
2015-12-14gtphub VTY: add newlines to some VTY docs' final linesNeels Hofmeyr1-8/+8
2015-12-14gtphub VTY: fix doc strings for show cmdsNeels Hofmeyr1-7/+10
2015-12-14gtphub: Fix the VTY prompt to make the tests move forwardHolger Hans Peter Freyther1-1/+1
2015-12-14gtphub VTY test: use only Hofmeyr2-1/+26
Add a second example config file for gtphub so that the VTY test can use nonstandard ports.
2015-12-13osmoappdesc.py: fix wrong index introduced by gtphub.Neels Hofmeyr1-1/+1
vty_app should reference osmo-nitb, but by adding gtphub, apps[-1] has changed. Use index 5, which won't change when adding further items.
2015-12-12indicate the GSM 04.08 channel mode in 'show lchan'Harald Welte1-0/+16
2015-12-12mncc: introduce 'struct gsm_mncc_bridge' for MNCC_BRIDGEHarald Welte3-8/+13
When a MNCC handler wants to issue the MNCC_BRIDGE primitive overt the MNCC interface, this was not possible so far via the MNCC socket. This primitive was so far only available from the internal MNCC handler, more or less by accident I suppose. The reason for this is in the way the array of two call references had been passed into mncc_tx_to_cc().
2015-12-12mncc.c: Convert mncc_names[] to 'struct value_string'Harald Welte2-70/+61
2015-12-08gtphub: log: limit length of hex dumps.Neels Hofmeyr2-4/+7
The debug log prints the received/sent bytes in hex. When this data surpasses the buffer size available for the log string (4096), the log is truncated and lacks a newline character. Limit the amount of dumped bytes to 1000. Sponsored-by: On-Waves ehi
2015-12-07gtphub: add VTY show for peers and peer stats.Neels Hofmeyr1-4/+119
Sponsored-by: On-Waves ehi
2015-12-07gtphub: improve handling of restarted peer.Neels Hofmeyr3-20/+60
Handle peer restart earlier, so that all the tunnels are deleted by the restart code path, instead of the first one being deleted due to reused TEI. That caused confusing logging messages. Also, when receiving Delete confirmations from the peer that didn't restart, don't complain about unknown peer, but acknowledge and remove the half invalidated tunnel. This means that the pending delete entry from the restart code path is not needed / not used, so don't bother to add pending delete entries upon peer restart. The test test_peer_restarted_reusing_tei() hits the situation where a tunnel is removed because of a reused TEI rather than the restart counter. Adjust the test to expect the "out-of-band" delete request earlier on, and to still see the half invalidated tunnel around. Enhance the test by adding the delete response from the peer that didn't restart, and add a final tunnels_are() verification. Sponsored-by: On-Waves ehi
2015-12-07gtphub: log most common message type names.Neels Hofmeyr1-14/+63
Sponsored-by: On-Waves ehi
2015-12-07gtphub: simplify/fix: one TEI mapping per tunnel.Neels Hofmeyr4-125/+144
Because the sender is known, one unique TEI per tunnel suffices to map the TEIs that the peers are sending to gtphub, instead of previously 4 (SGSN<->GGSN interaction on User and Ctrl plane, where each had an own unique TEI). Also, previously, a tunnel's endpoints should also have been checked against each other for TEI reuse, not only against the endpoints of other tunnels. This simplification fixes that problem for free. Thus simplify TEI reuse detection and improve VTY show readability and debugging. Adjust log and VTY output for tunnels. Adjust tests accordingly. Suggested-by: Holger Hans Peter Freyther <holger@moiji-mobile.com> Sponsored-by: On-Waves ehi
2015-12-07gtphub: fix: when checking TEIs, skip 0.Neels Hofmeyr1-1/+4
Sponsored-by: On-Waves ehi
2015-12-07gtphub: log: add TEI reuse msg, fix another TEI msg.Neels Hofmeyr1-2/+5
Sponsored-by: On-Waves ehi
2015-12-07gtphub_test: add test_parallel_context_creation()Neels Hofmeyr2-0/+161
Sponsored-by: On-Waves ehi
2015-12-07gtphub: log: add side str to msg for reused TEINeels Hofmeyr1-1/+2
Sponsored-by: On-Waves ehi
2015-12-07gtphub: add more detailed I/O rate counters.Neels Hofmeyr3-16/+84
Count bytes and packets per peer port, as well es per tunnel enpoint, which adds two more levels of detail. Sponsored-by: On-Waves ehi
2015-12-07gtphub: be strict about unknown cmdline argsNeels Hofmeyr1-1/+2
Sponsored-by: On-Waves ehi
2015-12-07gtphub: tweak logging.Neels Hofmeyr3-48/+46
Less spaces in tunnel strings, adjust tests accordingly. Use side_idx to remove code dup in rate counter output. Sponsored-by: On-Waves ehi
2015-12-07gtphub: logging: have one newline per log.Neels Hofmeyr2-18/+12
Some logging was multiline to ease human reading of debug output. However, in the VTY output, these newlines lack a CR motion. Split multiline logs into separate lines. Also add one missing space. Sponsored-by: On-Waves ehi
2015-12-07gtphub: fix missing newline in log outputNeels Hofmeyr1-1/+1
Sponsored-by: On-Waves ehi
2015-12-07gtphub: enhance gtphub-example.txtNeels Hofmeyr1-2/+14
2015-12-07gtphub: add gtphub-example.txtNeels Hofmeyr1-0/+78
2015-12-05bring the README into the 21st centuryHarald Welte1-22/+25
2015-12-05AUTHORS: Add Jacob and NeelsHarald Welte1-0/+2
2015-12-05remove old obsolete linux kernel and wireshark patchesHarald Welte1-0/+125
Those were relevant in 2008/2009, but not today... Also, move hlrsync to the contrib directory
2015-12-05gsm_data_shared: compute/sprintf the lchan name only onceHarald Welte2-2/+11
We now store the pre-printed lchan name in lchan->name to avoid having to call sprintf every time there is a debug statement somewhere, particularly as most of those debug statements are going to be inactive most of the time.
2015-12-03gtphub: tweak startup log for sgsn_use_senderNeels Hofmeyr1-0/+3
2015-12-03gtphub: add test for SGSN behind NATNeels Hofmeyr2-0/+105
2015-12-03gtphub_test: tweak test_user_data(): no seq routing.Neels Hofmeyr1-4/+4
Don't route User message back by sequence number, rather test that a completely unrelated User message is routed back properly. Sponsored-by: On-Waves ehi
2015-12-03gtphub: implement sgsn_use_sender for NAT.Neels Hofmeyr3-2/+52
If an SGSN is behind NAT, we cannot rely on the default ports. Specifically, if a GGSN sends a message, the forwarding to the SGSN should go to whichever port the SGSN last sent from (whether sequence nr is known or not). Add sgsn_use_sender config and VTY command, and store the sender instead of the GSN Address IE and default port if set. Sponsored-by: On-Waves ehi
2015-12-03gtphub: prepare: keep tunnel ref in gtp_packet_desc.Neels Hofmeyr1-25/+38
Rather than passing a tunnel pointer as function arguments, keep it in the gtp_packet_desc struct passed around anyway. Reason: in the next commit (will add sgsn_use_sender), I need the tunnel to be passed back out to gtphub_handle_buf(), and besides simplifying existing code, this also makes passing the tunnel back out trivial. Sponsored-by: On-Waves ehi
2015-12-03gtphub: tweak an error log messageNeels Hofmeyr1-2/+4
2015-12-03gtphub: Del PDP: replace unnecessary lookup with asserts.Neels Hofmeyr1-33/+6
2015-12-03tests: fix condition to run sgsn, oap, gtphub testsNeels Hofmeyr2-2/+9
Sponsored-by: On-Waves ehi