aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gtphub_ares.c
AgeCommit message (Collapse)AuthorFilesLines
2016-04-29use new libosmocore gsm_23_003.h for IMEI/IMSI lengthHarald Welte1-1/+1
... rather than our private definitions everwhere. As an added benefit, gprs_gsup_messages.h is now free of any header dependencies within openbsc.
2015-12-03gtphub: track tunnels explicitly.Neels Hofmeyr1-1/+1
So far, gtphub worked perfectly by only tracking single TEIs ... for probably most uses. But a Ctrl plane tunnel may have expired despite a still active corresponding User plane tunnel. The User plane would continue to work indefinitely, but if any Ctrl messages followed after more than six hours of Ctrl silence, they would have been dropped due to an expired TEI mapping. We want to - combine expiry of a user TEI with its ctrl TEI. (done in this patch) - upon delete PDP context, remove both user and ctrl TEI mappings. (future) - when a peer indicates a restart counter bump, invalidate its tunnels. (future) To facilitate these, track tunnels, complete with both SGSN's and GGSN's address, original and replaced TEIs, all for both user and ctrl plane, in a single struct. A single expiry entry handles the entire tunnel, instead of previously four separate expiries for each endpoint identifier. Add the concept of a "side", being either GGSN or SGSN, to index tunnel endpoint structs, and so on. Track the originating side in the gtp_packet_desc. Add header_tei_rx: set_tei() overwrites header_tei, but the originally received header TEI is still needed to match a Create PDP Context Response up with its Request (and for logging). Adjust the test suite to expect tunnel listing strings instead of TEI mappings, with a bonus of making it a lot easier to grok, and including the IP addresses. Add regression test for refreshing tunnel expiry upon use. Note: the current implementation is as slow as can possibly be, iterating all the tunnels all the time. Optimizations are kept for a future commit, on purpose. BTW, the sequence number mapping/unmapping structures remain unchanged. Sponsored-by: On-Waves ehi
2015-12-03gtphub: ares vty and initNeels Hofmeyr1-1/+1
From sgsn_vty.c, copy the cfg_grx_ggsn_cmd to add an ares server to the static sgsn_instance. This is sort of preliminary. As described in comments, the sgsn_ares functions should actually be separated from the static sgsn structure. gtphub keeps such an sgsn structure just for the sgsn_ares functions. Sponsored-by: On-Waves ehi
2015-12-03gtphub: review some logging.Neels Hofmeyr1-9/+13
Sponsored-by: On-Waves ehi
2015-12-03gtphub: cosmetic: rename a file.Neels Hofmeyr1-0/+218
gtphub_ext.c's initial purpose was to wrap a specific function. The file then turned into everything related to DNS, which fits pretty well. Rename to gtphub_ares.c. Tweak the header comment to reflect the new file name. Sponsored-by: On-Waves ehi