aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs/gb_proxy.c
AgeCommit message (Collapse)AuthorFilesLines
2018-11-26gbproxy: flush_stored_messages: Get rid of msg paramPau Espin Pedrol1-7/+5
Log line actually makes more sense out of the function where IMSI acq is resolved. We can then get rid of msg param which may cause confusion and add complexitiy to code for no good reason. Change-Id: I6716a260e12a3cf36af0501ce611c6c1e608f537
2018-11-26gbproxy: flush_stored_messages: Log and route using stored_msg infoPau Espin Pedrol1-2/+2
It makes no sense to print every stored_msg with BVCI from msg, same for routing. This will allow getting rid of "msg" completelly in next commit. Change-Id: I95eafbf41012be3e02c68fc996773dd02b174fe6
2018-11-26gbproxy: flush_stored_messages: Move comment to func descriptionPau Espin Pedrol1-2/+2
Change-Id: I14a90d1957a2cbd8fd53002b035fe481ab3abbbf
2018-11-26gbproxy: Remove unneeded parse_ctx paramPau Espin Pedrol1-6/+4
The only use inside the function is only to log information which should actually be provided by tmp_parse_ctx of each stored msg. Change-Id: Ic186b92fa9bd0a2b853a0cf525c6f6feb9493897
2018-11-26gbproxy: Fix abort during APN patchPau Espin Pedrol1-1/+1
gbproxy process was aborted with following message during APN patching: <000e> gb_proxy_patch.c:129 Patching ACT_PDP_REQ to SGSN: Replacing APN 'foo' -> 'bar' msgb(0x5555558797d0): Sub area is not fully contained in the msg data During osmo-sgsn 107fb59e84b12bbf6bdfdd4fc241dbcda7332706 old copy of gprs_msgb_resize_area was replaced by more modern libosmocore version called msgb_resize_area. They are mostly identical but the later has some extra verification asserts. One of this asserts was triggering the process abort, but the bug has always been there as far as I could see in git history. The assert triggers because the bssgp buffer and parse_ctx point to "stored_msg", while the data buffer comes from a different msbg "msg", which is clearly wrong behavior. In the modified line, "msg" (the one which provided the imsi now already stored in link_info through gbproxy_update_link_state_ul()->gbproxy_assign_imsi()) is really not needed anymore, and we want to patch the stored msg going to be forwarded. Related: SYS#4397 Change-Id: I7226fc5bcfbf58c349431d0a39cdb904fefd9e9c
2018-10-30Update wrong references to bsc in sgsn codePau Espin Pedrol1-2/+2
Change-Id: I93f0dc721c2eff8a87fb9248882f24768f708713
2018-08-17gbproxy: Add VTY parameter: link stored-msgs-max-lengthPau Espin Pedrol1-2/+22
It was discovered in some prod setups that some TLLIs can maintain quite long queues of msgb in case its IMSI is not acquired and the tlli is not pruned due to link-list max-{age,length} being set to 0. As a result, the osmo-gpbroxy steadly increases the list size of maintained TLLIs, and some TLLI was found without IMSI catching already 1211 msgb. Let's allow setting a maxiumum length for the queue storing those msgb in a per TLLI base. If the limit is reached, oldest msgb are removed before adding a new one. Depends: libosmocore Change-Id I33b501e89a8f29e4aa121696bcbb13d4b83db40f Related: SYS#4297 Change-Id: I4473be8604f80302df03ffdd5a13280dc072f824
2018-08-17Use osmo_clock_gettime from libosmocorePau Espin Pedrol1-3/+3
Change-Id: Ic638849c6687c376c4c0c36cc286d499a073d6ca
2018-08-15Drop gprs_msgb_copy with libosmocore replacementPau Espin Pedrol1-4/+4
gprs_msgb_copy was introduced in libosmocore 0.94 (f78ec5ce0d0f6038147d9b9e14d81094309ba5d5) as bssgp_msgb_copy. Let's use that one to avoid code duplication. Change-Id: I42a65fd8e4045fafadf5694f2d8d0c5e7ab350a0
2018-07-24gbproxy: Replace '.' in counter names with ':'Pau Espin Pedrol1-6/+6
The '.' is illegal character in counter names, as they are exported via CTRL interface, where '.' has a special meaning that cannot be used by strings comprising the variable name. Change-Id: I93a2e5b6ec66c9edb6e93d95032e788f552af44b
2018-03-15implement support for 3-digit MNC with leading zerosNeels Hofmeyr1-24/+23
Add 3-digit flags and use the new RAI and LAI API from libosmocore throughout the code base to be able to handle an MNC < 100 that has three digits (leading zeros). Note that in gbproxy_test.ok, 0-0 changes to 000-000 instead of 000-00, because the parsed ra buffer is 000000 which results in 000-000, while 00f000 would result in 000-00. IOW this is expected. Change-Id: I7437dfaa586689e2bef0d4be6537e5577a8f6c26
2017-12-27Migrate from OpenSSL to osmo_get_rand_id()Max1-8/+8
This avoids potential licensing incompatibility and makes integration of Debian packaging patches easier. The libosmocore version requirements are fine already but for jenkins tests to pass we have to have Ic77866ce65acf524b768882c751a4f9c0635740b merged into libosmocore master. Related: OS#1694 Change-Id: I2b687b7f07ef05bbd861b8479cad5a958a3dde92
2017-12-20Replace '.' in counter names with ':'Max1-1/+1
The '.' is illegal character in counter names, as they are exported via CTRL interface, where '.' has a special meaning that cannot be used by strings comprising the variable name. Change-Id: I4eb6851d3577f5942ae1a9ab28d3b3ca7ab8e208
2017-09-23gbproxy: ensure peer allocation resultMax1-2/+2
gbproxy_peer_alloc() could return NULL which wasn't checked and used right away. Fix it by making this assumption explicit with OSMO_ASSERT(); While at it, also format log messages consistently. Change-Id: Ib10c954e17a479baef31ded54370b35938e00018
2017-09-06move include/openbsc to include/osmocom/sgsnNeels Hofmeyr1-6/+6
Change-Id: I281ef585fffc2644682c8282224fb1c2da5ca795
2017-08-30split off osmo-sgsn: remove files, apply build1.1.0Neels Hofmeyr1-1/+2
Change-Id: I5d27ff93e56cd13e0e70edd15e2080201e35e91f
2017-08-27gbproxy: log signal value as textMax1-6/+4
Change-Id: I6ed923f5c60a8d64305f4b8e90d1362d6510e1c5
2017-08-27gbproxy: log unhandled BSSGP PDU as textMax1-2/+1
Change-Id: Ibe3c8bd353b3a178e26b0936f25b2e1959f9990c
2017-08-27check for missing result of rate_ctr_group_alloc()Harald Welte1-0/+4
In case the counter group allocation fails, we must handle this gracefully and fail the allocation of the parent object, too. RelateD: OS#2361 Change-Id: I7dad4a4d52fe05f6b990359841b4408df5990e21
2017-08-27move openbsc/* to repos rootNeels Hofmeyr1-0/+1437
This is the first step in creating this repository from the legacy openbsc.git. Like all other Osmocom repositories, keep the autoconf and automake files in the repository root. openbsc.git has been the sole exception, which ends now. Change-Id: I9c6f2a448d9cb1cc088cf1cf6918b69d7e69b4e7