aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-08-07Bump version: 1.3.0.50-ea1c-dirty → 1.4.01.4.0Pau Espin Pedrol6-9/+72
Change-Id: I5ca7ada037a9b91c3b747cea6d83654d0b9afed3
2019-08-07Require libosmocore 1.1.0Pau Espin Pedrol2-4/+4
Older commit made use of gsm48_decode_bcd_number2(), which is available in libosmocore 1.1.0 onwards, but forgot to increase configure.ac requirements. Fixes: fb625041601c525c23c96482250157dddb0941a4 Change-Id: I89b37be55fc4ba22b90e9aab9a5989573df2ae38
2019-08-05Remove undefined param passed to {logging,osmo_stats}_vty_add_cmdsPau Espin Pedrol1-2/+2
Since March 15th 2017, libosmocore API logging_vty_add_cmds() had its parameter removed (c65c5b4ea075ef6cef11fff9442ae0b15c1d6af7). However, definition in C file doesn't contain "(void)", which means number of parameters is undefined and thus compiler doesn't complain. Let's remove parameters from all callers before enforcing "(void)" on it. API osmo_stats_vty_add_cmds never had a param list but has seem problem (no "void"), so some users decided to pass a parameter to it. Change-Id: I0a89586ce683ad060212355b37470c349992ec49 Related: OS#4138
2019-07-29sgsnemu: Fix unaligned pointer access during ip/icmp checksumPau Espin Pedrol1-8/+12
Catched by gcc 9.1.0: osmo-ggsn/sgsnemu/sgsnemu.c:1294:2: error: converting a packed struct ip_ping pointer (alignment 1) to a uint16_t {aka short unsigned int} pointer (alignment 2) may result in an unaligned pointer value [-Werror=address-of-packed-member] 1294 | p = (uint16_t *) & pack; Change-Id: I783f104c31234a07f2a13f6dbc577a71b25b36a7
2019-07-21sgsnemu: Fix format string argument countHarald Welte1-4/+8
Change-Id: I6bb8c3df53a585913d5e0351ecad2e6ae9f0b886 Closes: CID#178643
2019-07-10contrib/jenkins.sh: run "make maintainer-clean"Oliver Smith1-0/+1
Related: OS#3047 Change-Id: I0ad159a3973d28ac79ea7fb433401c72b247c2b0
2019-07-01configure.ac: some versions of linux/if.h require including sys/socket.hPau Espin Pedrol1-2/+6
Related: OS#3230 Change-Id: Iba869a75745cea01024fa3ce04917c02fa608a13
2019-07-01configure.ac: Use prefered AC_CONFIG_HEADERS over AM_CONFIG_HEADERPau Espin Pedrol1-2/+1
This macro is preferred by autofoo upstream. It was added around automake 1.7, and offers backward compatibility with AM_CONFIG_HEADER. Related: OS#3230 Change-Id: I88707d4895d9c231715d5252d2cfab589b42fe0c
2019-07-01configure.ac: Use brackets in AC_INIT paramsPau Espin Pedrol1-1/+1
Change applied as a result of running "autoupdate". Change-Id: I955b535737f0a0cbdf25377609cec8f3d8d3eb45
2019-07-01configure.ac: Replace obosolete macro AC_CANONICAL_SYSTEMPau Espin Pedrol1-1/+1
$ autoconf -Wall configure.ac:11: warning: The macro `AC_CANONICAL_SYSTEM' is obsolete. configure.ac:11: You should run autoupdate. autoupdate applied the change present in this commit. Change-Id: Iee59e6e9a7670867d5bc55ba96f79130bc6982f6
2019-07-01ggsn: Use structures instead of raw arrays when parsing ipcp_hdrPau Espin Pedrol1-8/+8
We have a structure to handle that data type, so let's use it. Change-Id: I991e53544b733df7773d66280ffa19a2a5123d97
2019-07-01ggsn: Avoid unaligned mem access reading PCO proto idPau Espin Pedrol1-1/+1
Change-Id: I3d80833319869503691a52927892e6ac30744915
2019-07-01ggsn: More logging from PCO handling (e.g. in case of malconfiguration)Harald Welte1-3/+18
Change-Id: I38c2c4178ff4fd795f54638adec63166b1c0838e
2019-07-01ggsn: Add minimalistic PAP supportHarald Welte1-1/+86
Some modems are configured to use PAP as an additional authentication mechanism beyond the GSM authentication that's part of GMM. Let's handle such PAP authentication requests by simply acknowledging them all, without actually checking any credentials database. This is the most sane thing we can do for now, without adding external requirements / interfaces like radius servers or the like. Closes: OS#3914 Change-Id: I81875f30f9f1497199253497f84718510747f731
2019-06-21gtp: queue: Add unit test queue_testPau Espin Pedrol4-0/+6961
Closes: OS#1740 Change-Id: Id09bc5e23aa7a4b864822bc92cc23a4b60db52c3
2019-06-20gtp: queue.c: Document queue APIsPau Espin Pedrol1-9/+46
Change-Id: I8523a0d0508d7fb870a4a9119aa8eb4c3a4d6f17
2019-06-20gtp: Add missing headersPau Espin Pedrol2-0/+3
Those headers are using types defined in other places (like sockaddr_in) and don't explicitly include them, which makes future queue_test fail. Change-Id: I65e12a067d89ef71be3719636b64f4d93ea73cc4
2019-06-20cosmetic: gtp: queue: remove trailing whitespacePau Espin Pedrol2-6/+6
Change-Id: I20c83cd607ae8e1025fdc1a810c0d27bad80b178
2019-06-19manuals: Add script to regenerate vty/counter documentationDaniel Willmann2-0/+18
Related: OS#1700 Change-Id: I2f51ff19d2a1d7bcfdf569309a79a6e91a848302
2019-06-04sgsnemu: Replace use of deprecated libgtp API pdp_newpdp with new onePau Espin Pedrol1-1/+1
Related: OS#2873 Change-Id: I9742b82c382ae2e63f8aff4c5c32e2450059082b
2019-06-04ggsn: vty: Require ggsn param in <show pdp-context> cmdPau Espin Pedrol2-8/+22
Other similar commands already do it. This way we also get rid of deprecated APIs, supporting search when more than one GSN is set up. Related: OS#2873 Change-Id: I8357e20076348c8ded5e9f5b8e7252566b0fbfea
2019-06-04ggsn_vty_reference.xml: Update from last code changesPau Espin Pedrol1-11/+52
Change-Id: I5de2e5223e4532bbbec77b928fbdecb57ef2bca7
2019-06-04gtp: Make use of new libgtp APIs with multi-gsn supportPau Espin Pedrol1-23/+22
Drop use of deprecated APIs everywhere in libgtp and use the new ones instead. Related: OS#2873 Change-Id: Ibf56a063f01d1f95a2a3271416da6e062e85fdfa
2019-06-04gtp: Introduce new pdp APIs (and deprecate old ones) to support multiple GSNPau Espin Pedrol5-37/+90
Move static global pdp storage arrays to be per GSN. This way now several GSN per process are supported without collisions. * pdp_init() is defined in public API but it's actually only intended for use (and currently only used) internally in gtp_new(). So let's document that and re-use it for backward compatibility with now deprecated API, where only one GSN per process is supported. * Back pointer to gsn_t (pdp->gsn) moved from gtp.c:gtp_new() to gtp_pdp_newpdp(), since it makes more sense to have it there. This way backpointer is always set, even in case were app calls pdp_newpdp() API directly instead of creating them through gtp.c, like osmo-sgsn does. * Create new versions of required APIs with a pointer to gsn_t where the pdp ctx is to be created/found. Some APIs receiving a pointer to a pdp ctx can be left intact because we have a backpointer to its gsn_t. * pdp_getpdp() is nowhere used, and makes little sense now that we have pdpa reachable in gsn->pdpa, so let's deprecate it without adding a replacement. * Deprecate gtp.h gtp_newpdp(), since it's nowhere used and useless (does same as new gtp_pdp_newpdp() and doesn't allow for old_pdp to be passed as parameter). Fixes: OS#2873 Change-Id: I653cbdc185165592d985e3efab6e3f1add97877b
2019-06-04ggsn: Fix undefined behaviour shifting beyond sign bitPau Espin Pedrol1-2/+2
Fixes following ASan complaint during VTY "show running-config": osmo-ggsn/ggsn/ggsn_vty.c:657:37: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Change-Id: I2b8d163dbc108b0fb5a1e820dc23181835d12869
2019-05-31cosmetic: gtp.h: Remove trailing whitespacesPau Espin Pedrol1-7/+7
Change-Id: I60f8cf5e36bcef767f90b150a488a800445bf744
2019-05-31pdp: Drop unused code for hashipPau Espin Pedrol2-78/+0
Nowadays we have one tun device per APN, so we don't need this hash table because we use the ippool of the APN to find the related PDP ctx pointer. Change-Id: Ife3f222daa87f0630ff34ffc3e63f4dad2ad914b
2019-05-31ggsn: Use gtp_delete_context_req2() everywhereOliver Smith3-7/+40
Replace calls to gtp_delete_context_req() with gtp_delete_context_req2(). Related: OS#2741 Change-Id: Iecc8c5ac45207e7e20129559c4ac7f3c67dfb36a
2019-05-31gtp: Re-arrange free pdp ctx code in non-teardown scenarioPau Espin Pedrol1-13/+14
Code modified actually behaves the same, since gtp_freepdp() also calls delete cb, and this way it's more consistent with rest of the code base. Change-Id: I299765816e9d885497110d2e834f7ccdc943052c
2019-05-31cosmetic: gtp: Document free pdp ctx in non-teardown scenarioPau Espin Pedrol1-1/+25
Change-Id: Ia47ac792111fe1e9aa68222b32b5da823642206b
2019-05-31gtp: Refactor code to use gtp_freepdp(_teardown) APIsPau Espin Pedrol2-50/+32
* API gtp_freepdp was already there but was not really being used by anyone currently, so we can change its behaviour to call cb_delete_ctx. It makes sense to call the cb in there too to be consistent with rest of APIs. * Add API gtp_freepdp_teardown, which calls gtp_freepdp on pdp and its secondary contexts. It will also be used later on by osmo-ggsn. * Use new APIs in internal code to simplify it. Change-Id: I9f0b774e9385a7a8d81ec9702f158e2f9a50d571
2019-05-31gtp_create_pdp_ind: simplify code by reordering and compacting parsingPau Espin Pedrol1-99/+71
Move all parsing with same conditions under same blocks to make code easier to follow and make it more compact. Change-Id: I52d5a3543ce6cf764bd84303b5a0d8b0643d998d
2019-05-31pdp: Introduce new API pdp_count_secondaryPau Espin Pedrol3-10/+20
Change-Id: Id2d84ad1cdb0f3b500efeda4cc0fbccb24ae0c61
2019-05-31gtp: Fix typo dublicate->duplicatePau Espin Pedrol1-11/+11
Change-Id: Ic572c216e74fa937dfd12f9f3dc03de18b6b123e
2019-05-31gtp: Take queue_resp into account to schedule retrans timerPau Espin Pedrol1-3/+15
Before this patch they were not taken into account, which means some resp messages could stay more time than required enqueued. Change-Id: Iebf405b2310a34785f3b363cc2a9f415281f6030
2019-05-31ggsn: Start gtp retrans timer during startupPau Espin Pedrol1-0/+1
This timer was added in osmo-ggsn.git dda21ed7d4a897c9284c69175d0da598598eae40, but it was never initially started since it was introducing, and as a result retransmissions never being triggered. Also as a consequence, gtp_retrans is never called. That function is responsible from triggering retransmissions and to free old responses waiting in the resp queue (to check for duplicates). Since it's never called, the retransmit resp queue will grow over time. Fixes: dda21ed7d4a897c9284c69175d0da598598eae40 Fixes: OS#3997 Change-Id: Ie4adc52829446539fbbb5e9e0cf75a04f91c7eea
2019-05-31debian: create -doc subpackage with pdf manualsOliver Smith4-2/+18
I have verified, that the resulting debian packages build in my own OBS namespace (see the -doc packages): https://download.opensuse.org/repositories/home:/osmith42/Debian_9.0/all/ https://build.opensuse.org/project/show/home:osmith42 Depends: Ib7251cca9116151e473798879375cd5eb48ff3ad (osmo-ci) Related: OS#3899 Change-Id: I5563e023dc3c8b158a79ce0c9e1478e117b0ec37
2019-05-30gtp: Document spec reasoning drop of Rx DeleteCtxReqPau Espin Pedrol1-0/+8
Change-Id: I563fc0b48595d71ebdf56a50f4e9984eee423676
2019-05-29ggsn: Drop unused param force in apn_stop()Pau Espin Pedrol3-12/+12
Change-Id: I920679c7062d480c1cfaa3d89c90a0ed4a2ef58b
2019-05-19osmo-ggsn: properly show subscriber's MSISDN in the VTYVadim Yanitskiy1-1/+7
Instead of printing subscriber's MSISDN as a hex-string, let's attempt to decode it using gsm48_decode_bcd_number2(). Change-Id: I3f3a105dc8d0d582f2b9d8e1ff6c5785369e569b
2019-05-14osmo-ggsn: print requested / actual APN in PDP infoVadim Yanitskiy2-0/+14
An actual APN can be different from the one that was requested by user, e.g. when 'default-apn' VTY parameter is used. The one that was requested is already being stored in the PDP context state. Let's also store a chosen APN in create_context_ind(). Change-Id: I9cbe195f64e5b83d5158c175aad2e81ba2487850
2019-05-13osmo-ggsn: check result of osmo_apn_to_str()Vadim Yanitskiy1-5/+7
Change-Id: I03d0eb266dca176f342e77a54f0291cc5bd7df43
2019-05-13osmo-ggsn: add VTY command to show PDP context by IPv4Vadim Yanitskiy1-0/+42
Change-Id: Iad60de34c562803a1a1fc024287d1a60e071afab
2019-05-13osmo-ggsn: fix VTY command for getting PDP contexts by APNVadim Yanitskiy1-11/+37
Change-Id: I0a7f4b245c4664afdae83c660358acb1a5f88ce5
2019-04-11ggsn.c: Refactor PCO processing during PDP activationHarald Welte1-85/+95
The existing PCO processing is implemented in a rather convoluted way. We scan the list of PCO elements several times for different PCO protocols. Let's change to a straight-forward model where we simply do one iteration over the list of PCO elements and generate responses step by step. Change-Id: I4a7d09279b6b259e2b95f1f51159b16838b2d94c
2019-04-11ggsn: Fix build_ipcp_pco() in presence of invalid IPCP contentHarald Welte1-6/+7
When build_ipcp_pco() iterated over the PCO list, it didn't use the "outer" pco length as an increment, but used the "inner" IPCP length. If an IPCP message with an invalid "inner" length was being processed (see pcap file attached to OS#3914), the PCO iteration beyond that broken IPCP would fail, possibly rendering false hits. Let's make pco_contains_proto() return a pointer to the the pco_element, so that the caller can use the outer length as an increment. Change-Id: I8e9cffde092c8c5824abfaeecb742afcf949802c Related: OS#3914
2019-04-11ggsn: Remove magic numbers from ipcp_contains_option()Harald Welte1-6/+7
Let's remove some magic numbers and use a data structure instead. Change-Id: I5b1abc6f403f85986407e9e8359924dfcb58031a
2019-04-11ggsn: const-ify input / read-only arguments of PCO related functionsHarald Welte1-6/+8
Change-Id: Ia0877988180ded4e3c033d7f1fb6e1c2acd60163
2019-04-11ggsn: Remove magic numbers from pco_contains_proto()Harald Welte1-6/+11
Let's remove some magic numbers and use a data structure to describe the PCO element header. Change-Id: I9871ffced677320aa82438332bfdb951ab129f04
2019-04-11process_pco() const-ify 'apn' argumentHarald Welte1-4/+4
Change-Id: I2a96b0fbe077c7c49342553de0880bfc58318669