aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2015-12-12utils: Support new fields in the v1 of meas_feed in meas_json.achemeris/meas_jsonAlexander Chemeris2-4/+24
2015-12-12utils: 'meas_json' utility to convert measurement feed into a JSON feed.Alexander Chemeris2-1/+174
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 Welte10-6175/+0
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
2015-12-03gtphub: check TEI presence in Create PDP Ctx ResponseNeels Hofmeyr1-0/+10
Sponsored-by: On-Waves ehi
2015-12-03gtphub: improve logging for invalid packetNeels Hofmeyr1-4/+7
Sponsored-by: On-Waves ehi
2015-12-03gtphub: cosmeticNeels Hofmeyr1-9/+4
During the peer review session with Holger, these things were deemed fixable. No need to have a static gtp_packet_desc in gtphub_handle_buf. No need to memcpy, direct assignment does the job. Remove obsolete comments. Fix a stray space. Sponsored-by: On-Waves ehi
2015-12-03gtphub: fix restart cleanup peer matching.Neels Hofmeyr3-4/+11
Adjust test expectations accordingly. Sponsored-by: On-Waves ehi
2015-12-03gtphub: wrap gtphub_write() for test suite.Neels Hofmeyr6-27/+84
Sponsored-by: On-Waves ehi
2015-12-03gtphub: fix use after free.Neels Hofmeyr1-27/+37
A tunnel pointer was still being checked after deleting by a call to expiring_item_del(). 'continue' to the next tun. Sponsored-by: On-Waves ehi
2015-12-03gtphub: add restart counter testNeels Hofmeyr2-0/+165
Sponsored-by: On-Waves ehi
2015-12-03gtphub: Add a debug logNeels Hofmeyr1-0/+6
Sponsored-by: On-Waves ehi
2015-12-03gtphub: add test for reused TEI.Neels Hofmeyr2-0/+78
Sponsored-by: On-Waves ehi
2015-12-03gtphub: fix: add a missing NULL checkNeels Hofmeyr1-0/+2
Sponsored-by: On-Waves ehi
2015-12-03gtphub: cosmetic: early continue for less indentNeels Hofmeyr1-21/+22
Sponsored-by: On-Waves ehi
2015-12-03gtphub: monitor GSNs' restart counters.Neels Hofmeyr2-19/+120
If a GSN indicates that it has reset, tear down each known tunnel for that GSN individually (don't send the GSNs on the other side a different restart counter, because they represent more than just this GSN). Sponsored-by: On-Waves ehi
2015-12-03gtphub: cosmeticNeels Hofmeyr1-50/+50
Move the SGSN read callback next to the GGSN read callback. Comments. Tweak an initialization to NULL. Sponsored-by: On-Waves ehi
2015-12-03gtphub_test: add test for Del PDP from GGSN side.Neels Hofmeyr2-6/+58
Sponsored-by: On-Waves ehi
2015-12-03gtphub_test: add some cleanup asserts.Neels Hofmeyr1-0/+5
Sponsored-by: On-Waves ehi
2015-12-03gtphub: handle Delete PDP Context.Neels Hofmeyr4-19/+229
During resolution of the header TEI, also return the tunnel struct that resolved the TEI, so the Delete PDP Ctx code does not need to look it up again. Upon Delete PDP Ctx Request, remember the IEs and that a request was made. Upon Delete PDP Ctx Response, find the pending delete and remove the corresponding tunnel, iff the response indicates success. Add a context deletion to regression tests, rename the test appropriately. Sponsored-by: On-Waves ehi
2015-12-03gtphub: remove obsolete todo commentNeels Hofmeyr1-2/+0
Sponsored-by: On-Waves ehi
2015-12-03gtphub: fix segfault when empty config.Neels Hofmeyr1-2/+12
gsn_addr_from_str(): return error upon NULL string. Add some debug logging. With an empty config, no bind addresses were set, and the address parser did not check for a NULL pointer, resulting in a segfault. Sponsored-by: On-Waves ehi
2015-12-03gtphub: be more fatal about not finding an unused TEI.Neels Hofmeyr1-2/+10
Sponsored-by: On-Waves ehi
2015-12-03gtphub: fix some style complaints from cppcheckNeels Hofmeyr3-14/+5
Sponsored-by: On-Waves ehi