AgeCommit message (Collapse)AuthorFilesLines
2018-12-27systemd service: add save_log_tail35c3Neels Hofmeyr1-0/+1
Change-Id: I6f65e3d774197ca82cfda62e3a32f8fbf044e449
2018-12-06contrib: fix makedistcheck with disabled systemdOliver Smith1-1/+2
EXTRA_DIST files need to be distributed, no matter if the systemd option is configured or not. Change-Id: Ibd348eac3adca88663bd510172efbe4ec0bf3599
2018-12-05contrib/jenkins.sh: build and publish manualsOliver Smith1-2/+20
Add new environment variables WITH_MANUALS and PUBLISH to control if the manuals should be built and uploaded. Describe all environment vars on top of the file. When WITH_MANUALS is set, install osmo-gsm-manuals like any other dependency and add --enable-manuals to the configure flags (for "make" and "make distcheck"). Add the bin subdir of the installed files to PATH, so osmo-gsm-manuals-check-depends can be used by ./configure. Related: OS#3385 Change-Id: I43e3b592c593237eb4df2d70c926c031ddb7b20b
2018-12-04Fix DISTCHECK_CONFIGURE_FLAGS overrideOliver Smith1-1/+1
Set AM_DISTCHECK_CONFIGURE_FLAGS in Makefile.am instead of DISTCHECK_CONFIGURE_FLAGS. This is the recommended way from the automake manual, as otherwise the flag can't be changed by the user anymore. Related: OS#3718 Change-Id: I810b2b96ea077e8bd5ab01df5137e214a4349628
2018-11-27build manuals moved here from osmo-gsm-manuals.gitOliver Smith7-23/+84
Moved to doc/manuals/, with full commit history, in preceding merge commit. Now incorporate in the build system. Build with: $ autoreconf -fi $ ./configure --enable-manuals $ make Shared files from osmo-gsm-manuals.git are found automatically if - the repository is checked out in ../osmo-gsm-manuals; or - if it osmo-gsm-manuals was installed with "make install"; or - OSMO_GSM_MANUALS_DIR is set. Related: OS#3385 Change-Id: I14533676d5774ee0d0ee5054ba77d7dac32cff43
2018-11-27Merge history from osmo-gsm-manuals.gitNeels Hofmeyr9-0/+2162
Change-Id: Ic7cebd4e6f2836be80a6186939f98057969207d4
2018-11-27ggsn: update vty referenceNeels Hofmeyr1-44/+118
Change-Id: I8a5c37505c0180d5c04c7792d6d0afdb0dffb282
2018-11-27vty-ref: Update URI of docbook 5.0 schemaHarald Welte1-2/+2
... to match the /etc/xml/catalog file on debian (no "www" in hostname) Change-Id: Id9f3579c7f2bc3af13fe30b5268f249b6f59ed0d
2018-11-27OsmoGGSN: update vty referenceNeels Hofmeyr1-6/+174
Add new (generic) logging commands, talloc context print commands. Add the jitter buffer logging category. Change-Id: Ifdc735df6221bf6e9b6247912f2958974dcfc4f2
2018-11-27OsmoGGSN: fix VTY additions' node IDsNeels Hofmeyr1-8/+8
Change-Id: I8cd5eb64300151d0de8023ed019568cfdc4fe453
2018-11-27OsmoGGSN vty: update VTY referenceNeels Hofmeyr1-391/+116
Apply VTY reference changes from libosmocore: change node IDs from index numbers to meaningful names from VTY node prompts. Introduce section with common commands, do not repeat the common commands on each child node. Populate section names (so far empty). Add apn / gpdu VTY reference. This is generated using the recent libosmocore vty doc patches that conclude in libosmocore change-id Iedd67750539b676271de0e0e9316d4e6f794406a. Change-Id: Ia269c4bda0aa0b905abcccc75338f5f808e01727
2018-11-27OsmoGGSN VTY ref: prep: convert newlines to unixNeels Hofmeyr1-1480/+1480
To omit whitespace changes in an upcoming patch that updates the VTY reference and will use '\n' line breaks, convert line breaks from '\r\n' to '\n' without any other changes. Change-Id: Id0d1a3a82c3d670cbb041884554b5d79fdfb0f28
2018-11-27OsmoGGSN: typo: privelegesNeels Hofmeyr1-1/+1
Change-Id: Id7e59f5dfcbb632fde6c35ef014e9b85099fe06d
2018-11-27OsmoGGSN: add Routing section for IP forward and masqueradingNeels Hofmeyr1-0/+32
Change-Id: Ie49ca7a45113f49e89ce09017500008cbec757f5
2018-11-27OsmoGGSN: multiple instances: mention GTP portNeels Hofmeyr1-0/+9
Change-Id: I781feeb955ace17d93206bc98d12bc423584ce32
2018-11-27OsmoGGSN: more info on non-root operation / tun creationNeels Hofmeyr1-5/+16
Add examples for 'ip addr add' and mention correspondence to config file, add examples for enabling masquerading and IP forwarding, place the non-root config in its own section and highlight the diffs. Add tiny hint at systemd-networkd. Change-Id: I02bd9cfa35c7f2fb338d5d92c2e968fe80574a78
2018-11-27GGSN: don't say 'NITB'Neels Hofmeyr1-1/+1
Change-Id: I960ce8ee749621176ceaa556a1fe93b54e08b6fc
2018-11-27refactor Makefile build rules, don't use the FORCENeels Hofmeyr1-35/+6
The initial goal was to make sure we don't have overall FORCE rules causing unnecessary rebuilds -- annoying while writing documentation. As I looked through possible dependencies, I finally understood what's going on here. Remove code dup and nicely sort which belongs where in build/Makefile.*.inc. In each, describe in a top comment how to use it, and also unify how they are used: - Rename Makefile.inc to Makefile.docbook.inc and refactor - Add Makefile.vty-reference.inc - Add Makefile.common.inc Make sure that we accurately pick up all dependencies. Drop use of the macro called 'command', that silenced the actual command lines invoked and replaced them with short strings: it obscures what is actually going on and makes the Makefiles hard to read and understand. Each manual's makefile is greatly reduced to few definitions and a Makefile include, e.g. one for asciidoc, one for VTY reference. Move common/bsc_vty_additions.xml to OsmoBSC/vty/libbsc_vty_additions.xml, link from OsmoNITB. It applies only to OsmoBSC and OsmoNITB. Add a script that combines a VTY reference file with *all* additions files found in a manual's vty/ dir. Call this from Makefile.vty-reference.inc. Change-Id: I9758e04162a480e28c7dc83475b514cf7fd25ec0
2018-11-27GGSN: Document how 'ip tuntap' is used for non-root; call netdev 'apn0'Harald Welte1-8/+44
* Some people want to manually create/configure their tun devices, show them how to do this using ip with the correct parameters * Let's not call the network device 'ggsn' but rather 'apn0', as the device has a 1:1 correspondence to the APN, not to the GGSN. Change-Id: I2fef818bfcb8cb521397136539f492922d5f6def
2018-11-27Expand OsmoGGSN manualMax1-6/+51
* add cross-references * add example of running without root priviledges Change-Id: I1743f370ee2b351d2847f2e29e0f59f35cd401f4
2018-11-27OsmoGGSN: Add VTY reference manualHarald Welte4-1/+1575
Change-Id: Iddf6fe26689172d7db001198943c816eaaed7931
2018-11-27initial version of OsmoGGSN user manualHarald Welte6-0/+517
Closes: OS#1721 Change-Id: I7cdf150e8dd4f9dfc5e6d28e780d05dc1e1e5458
2018-11-27Importing history from osmo-gsm-manuals.gitNeels Hofmeyr0-0/+0
Change-Id: I79f406ae78de4a82966cffebac0dcec2abab21c2
2018-11-22properly store IPv6 addresses in struct tun_tStefan Sperling3-10/+17
All addresses in struct tun_t were stored as an in_addr. But IPv6 addresses need an in6_addr, so switch tun_t addresses to the in64_addr wrapper struct. This is an ABI break, as documented in TODO-RELEASE. Fixes an out of bounds memcpy() identified by Coverity. Change-Id: Idd2431ad25d7fa182e52e2bd5231ceb04d427c34 Related: CID#174278
2018-11-22fix a format string directives in queue_seqset()Stefan Sperling1-1/+1
Coverity pointed out that a format string used inappropriate format string directives for variables of type size_t. Change-Id: I889019aad963932fdc032421e60a72c809a93bca Related: CID#135197
2018-11-22fix format string error in ippool_printaddr()Stefan Sperling1-1/+1
The variable this->listsize is an unsigned int, but the format string assumed ptrdiff_t. Found by Coverity. Change-Id: Ib2a55907adae98f8aa7b079f1c9a3b4fc5f67fc5 Related: CID#188879
2018-11-22initialize local variable addr in ippool_new()Stefan Sperling1-1/+1
Coverity points out that addr.len was potentially being used uninitialized, via calls to in46a_inc(&addr). Change-Id: Idb67394e5f4c2072380a33f46c848d92c4317245 Related: CID#174189
2018-11-22replace bogus memcpy() call in ippool_newip()Stefan Sperling1-1/+9
When copying an address to a reused static hash table member with memcpy(), this code mistakenly passed the size of a pointer as the amount of bytes to be copied, rather than the actual size of the address. This means the IP pool could contain bogus IP addresses because only addr->len (a uint8_t) and 3 further bytes of the address were actually copied on 32 bit platforms. On 64 bit platforms, a sufficient amount of bytes were copied for IPv4 to work correctly, but too few bytes were copied for IPv6. This problem was found by Coverity. Replace the bogus memcpy() call with direct assignments to the appropriate struct in64addr union members, and assert that the length recorded for the address actually corresponds to the length used by the address family (IP4, IPv6). Change-Id: Ic21560f7519e776107485a8779702fb1279d065c Related: CID#57921
2018-11-22fix allocation of ippool's hash tableStefan Sperling1-3/+2
The calloc() call in ippool_new() had two problems. The first problem is benign: The order of arguments were reversed. Pass the number of elements in the array first, then the size of each element, as calloc() expects. This problem was found by me. There are more instances of this problem in this file, which I'll address in follow-up patches. The second problem is that the requested allocation was larger than necessary: The hash table is an array of pointers to ippoolm_t, not an array of struct ippoolm_t. Fix the required size passed to calloc(). This problem was found by Coverity. Change-Id: I93fa5bc539771ca19714f6a665558c9140e2ce07 Related: CID#57920
2018-11-21check ioctl() call return value in tun_new()Stefan Sperling1-1/+4
Coverity complains about a missing ioctl() return value check. Check for failure of the TUNSETNOCSUM ioctl and log a warning if it fails. Change-Id: I88da2164d975d7a232619b8d31c5eadeef0f3a80 Related: CID#57661
2018-10-21ippool.c: Use "%td" format string for ptrdiff_tHarald Welte1-6/+6
Change-Id: Iacafa0919baebac6b5a799deb41a673c022c6743 Fixes: Coverity CID#135225
2018-10-21sgsnemu: Fix printing of tun device nameHarald Welte1-1/+1
Change-Id: I6cd89b7b59a6c1d506cfbe9d3088cb844d133313 Fixes: Coverity CID#178638
2018-09-25osmo-ggsn.cfg: Ensure well-formed config file exampleHarald Welte1-26/+26
Change-Id: Ic7fd91745e7442eda741d46748c0a4a02dedef80
2018-09-16libgtp: implement gtp_clear_queues to clear req/resp queueAlexander Couzens2-0/+20
Clearing the request and response queue is useful for debugging to reset "some" state. Otherwise some tests will get un-expected packets. Change-Id: I279d1d7cbf5d37dd5609c2b968f317fe9a0e348d
2018-09-12Install sample cfg file to /etc/osmocompespin/systemdPau Espin Pedrol2-0/+6
Change-Id: If41e69295ac23a61df138ceea83794059f111086
2018-09-10Install systemd services with autotoolsPau Espin Pedrol8-5/+35
Change-Id: I563559f5b501eded44efafc60bb0c9ffdea20b3e
2018-08-06debian/rules: Don't overwrite .tarball-versionHarald Welte1-4/+0
The .tarball-version file should contain the *source version* uniquely identifying the git commit, and not the Debian package name. With https://gerrit.osmocom.org/#/c/osmo-ci/+/10343/ there is a correct .tarball-version file in the .tar.xz of the nightly source packages. Change-Id: I1466936033c2f60edd1078eb41f3508d87da4402 Related: OS#3449
2018-07-23gtp: Add new replacement cb_recovery2 for cb_recoveryPau Espin Pedrol2-12/+45
Sometimes the originating pdp ctx causing the Recovery Procedure is required, in order to drop all pdp ctx but this one, which specs specify should be handled as valid: """ The SGSN receiving the Recovery information element shall handle it as when an Echo Response message is received but shall consider the PDP context being created as active if the response indicates successful context activation at the GGSN. """ Change-Id: I53e92298f2f6b84d662a3300d922e8c2ccb178bc
2018-07-21gtp: Add new API to avoid freeing pdp contexts during DEL CTX REQPau Espin Pedrol2-37/+73
With this API, user is expectd to free the PDP ctx when the confirmation for the release has been received (cb_conf time). This way user can maintain the pdp ctx alive during all this time. Extra code is added to gtp_delete_pdp_resp() since it's now possible to match it and push it up to the user cb_conf. This way, cb_conf() can be used for locally-initiated DEL CTX REQ, while delete_context() cb is left for remotely-initiated DEL CTX REQ. In this later case, when the DEL CTX RESP is sent the ctx is deleted and the delete_context() is called, where the user can do related actions or trigger consequence events (in the case of SGSN, it will drop all related GGSN bits for that PDP ctx and forward the DEACT PDP CTX to the MS). Change-Id: I29d366253bb98dcba328c7ce8aa3e4daf8f75e6c
2018-07-19fix support for multiple IPCP in PDP protocol configuration optionsStefan Sperling1-36/+41
Parse multiple IPCP IEs embedded in Protocol Configuration Options, and return IPCP responses for all of them. Makes the associated TTCN3 GGSN test pass. Depends: Ia1410abb216831864042f95679330f4508e1af3d Change-Id: I51ecab4e35f3ee638e68ca773b0da90cc0294ab0 Related: OS#3319
2018-07-19fix unaligned access in build_ipcp_pco()Stefan Sperling1-20/+31
IPCP data can begin at any byte location in the pco_req->v array. Casting to a 'struct ipcp_hdr' pointer could lead to unaligned access. Parse IPCP data with u_int8_t pointers instead to avoid this problem. Add some length checks while here. pco_contains_proto() and ipcp_contains_option() now receive the minimum size of the data the caller is looking for, and only return pointers to items of sufficient size. Also fix an inifinite loop in ipcp_contains_option() by refusing IPCP options with length small than 2. Previously, a zero length option would trigger an infinite loop in the parser. Change-Id: Ia1410abb216831864042f95679330f4508e1af3d Related: OS#3194
2018-07-13gtp: Log ignore CTX DEL REQ due to no teardown and only 1 ctx activePau Espin Pedrol1-0/+3
Change-Id: Ic950c04d309d5686bfbeab332f79c48678e743ae
2018-07-13gtp: Allow recv DEL CTX REQ in sgsn and DEL CTX RSP in ggsnPau Espin Pedrol1-8/+4
According to 3GPP TS 29.060 section "7.3.5 Delete PDP Context Request", both directions are valid in both GSNs. This allows osmo-sgsn receive delete ctx indication (cb_delete_context) in order to implement GGSN initiated requests. Change-Id: I6927c07be4ddf74defe338d01d947056e15cd14d
2018-07-13gtp: Log type name of unexpected signalling messagePau Espin Pedrol1-4/+8
Change-Id: Iae0f045e4128cf97aa7824d7d774b59bf966cbe8
2018-06-19ggsn: ctrl iface: listen on IP configured by VTYPau Espin Pedrol1-1/+2
Previosuly, the CTRL iface of osmo-ggsn was always bound to Fixes: OS#3287 Change-Id: I9b2c1b310c7dc94ef09642f7f256ae259b41619d
2018-05-31Bump version: → Espin Pedrol1-0/+11
Change-Id: Idbc183ca37196082e95a107901bea53d37aa2ff3
2018-05-28ggsn: make sure ipcp_option_hdr and and ipcp_hdr are packedPhilipp Maier1-2/+2
struct ipcp_option_hdr and struct ipcp_hdr are not declared as packed explicitly, but they are used to parse memory blobs by casting pointers. Add __attribute__((packed)) to ensure that those structs are stored packed. Change-Id: I14e10bb3ce482347b3f0c4d3a75168a55df15f20 Related: OS#3288
2018-05-28ggsn: fix misinterpreted length field in ipcp_contains_option()Philipp Maier1-1/+1
The abort condition of the while loop in ipcp_contains_option() is accessing ipcp->len directly. Unfortunately this field is an uint16_t which as to be interpreted as little endian value. If it is used without prior conversion the value may appear larger than actually intended and the loop will then not stop at the end of end of the buffer. This can cause unpredictable results when the value given with the parameter enum ipcp_options opt is not found. The loop will then eventually cause a segmentation fauld or is likely to hang as soon as cur_opt->len points to a zero byte in memory. - Make sure that ipcp->len interpreted correctly by accessing it through ntohs() Change-Id: Icffde89f9bc5d8fcadf6e2dd6c0b4de03440edd5 Related: OS#3288
2018-05-09ggsn_vty.c: fix: use CONFIG_NODE as parent by defaultVadim Yanitskiy1-0/+4
There are some configuration nodes, which are handled by extenral libraries, such as libosmoctrl. So, when switching back to the parent node, this should be kept in mind. Change-Id: I65be7910dc46166caa34a0984a6763e1477dec99
2018-05-04Bump version: → Espin Pedrol1-0/+6
Change-Id: I4a8bdcbee300296496f039b90795ff981018e17d