aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2021-03-23WIP: debugging libosmocorelynxis/sns_debuggingAlexander Couzens1-9/+14
Change-Id: If6de2e1cdb7835340a3535272bbefe4019d64d69
2021-03-23try to fix the NS alive/recovinerAlexander Couzens1-5/+26
Change-Id: I85ea81223c830e6cc26fab4fe64157c392399daa
2021-03-23WIP: Actually start Tns-test after SNS-CONFIG creates NS-VCHarald Welte1-10/+30
the previous commit fixed the state transition, but also caused neither Tns-alive nor Tns-test to run Change-Id: I07ea3fd5cec3d4acf4051930a1a3c746d6fd597c
2021-03-23gprs_ns2_vc_fsm: In IP-SNS/ALIVE mode, initial state is ALIVE/UNBLOCKEDHarald Welte1-8/+5
Only when the ALIVE procedure fails, we mark a NS-VC as RECOVERING. Change-Id: Ieb860827c2149306b135c0e6c8b3cd3bbb78851e
2021-03-23gprs_ns2_sns: Fix memory leak when creating ip[46]_local arraysHarald Welte1-3/+2
Prior to this patch, we would unconditionally allocate new memory for the local SNS IP endpoints. This results in a memory leak on every SNS-SIZE procedure. Let's move to talloc_realloc() which recycles any previously allocated memory. Change-Id: I12cb670e087c6d6190f3f5bf8483ea62008ae06f
2021-03-23gprs_ns2: Add comments explaining the nsvc->sns_only fieldHarald Welte3-0/+7
Change-Id: I16009a1b03d8027de2be56b7d5013b755c9550fd
2021-03-23gprs_ns2_sns: Allow VTY configuration of default binds for IP-SNSHarald Welte3-2/+106
In the IP-SNS SGSN role, we need to inform the BSS of our local IP endpoints. For statically configured NSEs, those are explicitly stated on a per-NSE level. For dynamically created IP-SNS NSEs, we are adding a new VTY command, using which the administrator can configure which binds should be advertised as IP endpoints to such BSS. Change-Id: Id01c29b07e9203c9305f2129361a4f5aaefa2c52 Related: OS#3373
2021-03-23gprs_ns2: dynamic NS-VC + NSE creation for IP-SNS in SGSN roleHarald Welte1-0/+62
Related: OS#3373 Change-Id: Ie10bb3531fae2e651da04f965d964de6eb1e7a97
2021-03-23gprs_ns2_vty: Permit VTY configuration of bind->accept_snsHarald Welte1-1/+49
Related: OS#3373 Change-Id: Ifb52cd245b10bf47d42d57d167d6d6c02b12ee12
2021-03-23gprs_ns2_sns: Implement checks during processing of inbound SNS-SIZEHarald Welte1-1/+59
As per 3GPP TS 48.016 section 6.2.4.1, we need to perform some consistency checks during the SNS-SIZE procedure. Let's implement them. Change-Id: I1638f04ba45fef3ba0b237948dff6022267141fb Related: OS#3373
2021-03-23gprs_ns2_sns: Assume the SGSN has a very large number of max. NSVCHarald Welte1-2/+3
It is the SGSN's job to ensure sufficient NS-VC capacity. As the SGSN doesn't tell the BSS, we should not make assumptions of only 4. Change-Id: I41f493643cf51d7853959ab9c7bbc0ffae4e1f4b
2021-03-23gprs_ns2_sns: SNS-SIZE contains the actual number of local endpointsHarald Welte1-2/+2
The SNS-SIZE sent from BSS to SGSN contains the actual number of local IP endpoints on the BSS side, and not the maximum number of remote IP endpoints supported. Change-Id: I62a8bca4a3f7c47bcb9f292b045fa867d8877a09
2021-03-23gprs_ns2_sns: Verify mandatory IE presence in incoming SNS-SIZEHarald Welte1-2/+11
Change-Id: I40571e313c3332d8cead8fb4aa9768d0d083804d
2021-03-23gprs_ns2_sns: Don't clear remote IP endpoints in SGSN roleHarald Welte1-7/+15
In BSS role, we can clear local + remote endpoints when sending SNS-CONFIG, as we are first. In SGSN role, we must not clear remote endpoints when sending SNS-CONFIG, as we are last, and the BSS has just previously told us its IP endpoints in the BSS-originated SNS-CONFIG. Change-Id: I58549707ac5a3a0aae5f9348ed76f16c09ad3e46 Related: OS#3373
2021-03-23gprs_ns2_vty: Allow creating NSE in sgsn-roleHarald Welte2-3/+8
Change-Id: I694fa6c80d04d13cb1afaae93a9ae43b6dfd2207 Related: OS#3373
2021-03-23gprs_ns2: Introduce gprs_ns2_create_nse2() for SGSN side SNSHarald Welte4-3/+26
gprs_ns2_create_nse() doesn't allow the caller to specify if the BSS or the SGSN role of IP-SNS shall be implemented. Add gprs_ns2_create_nse2() to fix that. Change-Id: I6db8c36f7c69b592d7d0fbcf323804f7e9912be2 Related: OS#3373
2021-03-23gprs_ns2_sns: Rename BSS-side states to include 'bss' in nameHarald Welte1-47/+48
Clearly separate those states that only occur on the BSS side from those of the SGSN side (which already have a prefix) Change-Id: Iebc97637063b2676abff4a7dce50272d9b4e336b Related: OS#3373
2021-03-23gprs_ns2_sns: Add some more OSMO_ASSERT about BSS roleHarald Welte1-1/+17
Some functions are only to be called when operating in BSS role, let's enforce that by sprinkling some OSMO_ASSERT() around. Related: OS#3373 Change-Id: I20d1bd8df62e0bb84696e291756e2d96acf49246
2021-03-23gprs_ns2_sns: Support for SGSN-side IP-SNSHarald Welte2-5/+276
This adds the core functionality of implementing the SGSN-side of IP-SNS inside a new FSM. The SGSN-side FSM shares states, events, structures and code with the BSS-side whenever possible. Note that this commit does not yet use the SGSN-side FSM, that is part of subsequent commits. Closes: OS#3373 Change-Id: I780413ffacd9cb71f64cc38057aae781eeb59b2b
2021-03-22osmo-aka-verify: Fix use case with OP and not OPcHarald Welte1-1/+5
Change-Id: Ic6b5da83276ce2618cd80c6d34d3322bad7b4c48
2021-03-21utils/osmo-aka-verify: fix swapped CK/IK argumentsVadim Yanitskiy1-1/+1
The positions of arguments in the call to "milenage_check" do not match the ordering of the parameters: * "ck" is passed to "ik" * "ik" is passed to "ck" Let's simply reorder the arguments of milenage_check() to match the ordering in milenage_f2345(). Change-Id: Ia003d3c9d88fb8f6740791583855a709b8639160 Fixes: CID#220324
2021-03-20utils: osmo-aka-verify to verify UMTS AKA (SIM side)Harald Welte3-1/+247
This new utility implements the UMTS AKA procedures of the SIM side. It can be used to manually verify the correctness of authentication tuples received from the network. Change-Id: I497747fbf09f633dcd7c592bd9af7fca9a820645
2021-03-19Revert "stats: log error when missing stats values"Oliver Smith3-156/+0
This reverts commit d290439b4afe928e7e341540cb92f1abf36a82cb, which caused "stats values skipped" messages to appear even if they were not skipped. Revert for now, replace with a proper version in the future. Related: SYS#4877 Change-Id: Ib43bd53188a4d31d771feb921ea14abe1a3ec877
2021-03-18tlv: Fix length returned by t{l16,16l}v_putDaniel Willmann2-2/+34
Every other function returns a pointer to the first byte after the tlv that was just written. tl16v seems to be a copy and paste error from tlv16 above and t16lv seems to count the 16-bit tag twice. The new tests verify that the return value of *_put(buf, tag, len, val) points to buf + *_GROSS_LEN(len). Change-Id: I268a7e11fb5dce67ce1bd7974ab86c4d2bd002f7
2021-03-17stats: log error when missing stats valuesOliver Smith3-0/+156
Let the user know when the stats were not consumed fast enough for the given FIFO length. Related: SYS#4877 Change-Id: If0e8ab55103007693101538fb6ea310075217774
2021-03-17tests/stats: enable logging in test outputOliver Smith5-164/+179
Move test output from stdout to stderr and enable logging to stderr. This is in preparation for the next patch, which will add a new log message when osmo_stat_item_get_next() skips a value. Related: SYS#4877 Change-Id: Ie0eaec2f93ac6859397a6bfca45039fdcc27cb9e
2021-03-10gprs_ns2_sns: Split allstate action in generic and BSS-specific partHarald Welte1-37/+50
Related: OS#3373 Change-Id: Icd40bd76df12795b4efcaf5865c6cf00da145f94
2021-03-10gprs_ns2: Encapsulate setting NSE dialectHarald Welte3-37/+53
Setting the NSE dialect possibly involves the creating (or destruction) of a IP-SNS FSM. Encapsulate that, rather than having every caller re-implement that. Change-Id: I24fdc26fbcfda039bd58ea166f4d5c2fd1801da1
2021-03-10gprs_ns2_sns: Unify handling of SNS-CONFIG for IPv4 + IPv6Harald Welte1-108/+72
Related: OS#3373 Change-Id: I49e5ca4a09bc772ef5a0cd5c2a76c8b200e56d1b
2021-03-09stats: Ensure that each osmo_stat_item only reports once per intervalDaniel Willmann3-18/+38
We should never report multiple values for a metric. It is confusing for the log reporter and wrong for statsd. Statsd will record only one value, but will it be the first, last, ...? This can happen if an osmo_stat_item changes more than once within the same reporting interval. With this patch only one aggregate value is sent to the log reporters. The value reported is the maximum during this interval. Other aggregations could be possible (min, last), but reporting a (useful) average is not because the values don't include a timestamp and most osmo_stat_items change at unregular intervals. Change-Id: I366ab1c66f4ae6363111ea4e41b66b7d5bcade9c Related: SYS#4877
2021-03-05gprs_ns2_sns: refactor ns2_sns_st_size_onenter()Harald Welte1-31/+40
Let's move computing of the local IP endpoints to a separate function, so it can not only be used when entering the SNS_SIZE state. Preparation for SGSN-side IP-SNS. Change-Id: I5d7ce419135a8ef538cf9abcb76a49049ed7d5f9 Related: OS#3373
2021-03-05gprs_ns2_vty: Clarify VTY help string wordingHarald Welte1-9/+9
Change-Id: I7d70f8cc811c2f4aabf9fc00e4e612dfc4b031d3
2021-03-05gprs_ns2_sns: Remove TODO (spec agrees, the correct cause code is used)Harald Welte1-1/+0
Change-Id: I6c431ba9e30d19425bf1cc1cc4d081949058610b
2021-03-05gprs_ns2_sns: Implement error log in case no binds found for NSEHarald Welte1-1/+1
Change-Id: I66ce4b429ad2597343b48210fdcbc95a1f34cbcd
2021-03-05TODO-RELEASE: Request increasing _LAST_OSMOVTY_NODE next releaseHarald Welte2-0/+8
We've used up all but one "library reserved" VTY nodes at this point, and we should definitely add some more reserved nodes in the next libosmovty ABI version / release. Change-Id: Idfe1e7d97f3f29fc219e80dcb6ce6bb768733adf
2021-03-04gprs_ns2: Pass peer/remote sockaddr argument to ns2_create_vc()Harald Welte4-2/+5
This is a preparation towards auto-creating SNS NS-VCs in SGSN role Related: OS#3373 Change-Id: Idf92712079cd9b7e4ff2cf8df314b372d63e6e52
2021-03-04gprs_ns2: Remove any references to DNS; we use DLNS in NS2.Harald Welte2-4/+0
Related: OS#5058 Change-Id: I1f047e022a029d5f982deae0b30fec9e5a00d1ac
2021-03-04gprs_ns2_sns: Dispatch inbound SNS-ACK to FSMHarald Welte1-2/+3
We don't really handle inbound SNS-ACK yet (as we don't originate SNS ADD/DEL/CHGWEIGHT procedures yet). However, the message receive code should already dispatch those events to the FSM, just like we do for the (equally unimplemented) handling of inbound SNS-SIZE which is already dispatched to the FSM. Change-Id: If6d5f96d85e6f05534fe49376f4473d912535ad4
2021-03-04gprs_ns2: Log all transmitted SNS messagesHarald Welte1-0/+15
We already have similar log statements for all NS-{RESET,BLOCK,UNBLOCK,...} and it's confusing that even a debug-level NS log file doesn't show transmitting SNS messages at all. Change-Id: I0d31c3911d3acd6ac7296c370e920d53412d8289
2021-03-04cosmetic: ssn: some more commentsHarald Welte1-3/+3
Change-Id: I87f76ab19d834d96a268b0d47b9dfe2424151d63
2021-03-03gprs_ns2: don't OSMO_ASSERT() while freeing NS-VC.Alexander Couzens1-2/+3
When freeing the NS-VC there are cases when the NSE is still alive. This means that gprs_ns2_free_nsvc() calls ns2_prim_status_ind(), which in turn calls ns2_count_transfer_cap(). The latter must deal with such a situation rather than OSMO_ASSERT() Change-Id: I4f32dee705c9886717339fe7cce5b4cd8d2c18f7
2021-03-01gprs_bssgp: use BVCI_SIGNALLING/BVCI_PTM instead of 0/1Alexander Couzens1-4/+3
Makes more understandable and clear what's meant in the code. Related: OS#3879 Change-Id: I9d0545fac0af0dcc1783040a376a9b8e65a92699
2021-03-01gprs_bssgp: add support for SGSN oriented RESETAlexander Couzens2-13/+59
To support SGSN oriented RESET introduce a role flag to track what's running the gprs_bssgp (local side). Related: OS#3879 Change-Id: Ibcbaffa94cbdc4296a8a7c372304ac11d50d9559
2021-02-26osmo-release.sh: support epochOliver Smith1-1/+18
Related: OS#5046 Change-Id: I5d9d18d7cc84f185222ee176e6546bb3553a3598
2021-02-25tests/gb: Fix printf format errors on ARM 32 bitsPau Espin Pedrol1-6/+6
Seen building on RPI4 32 bits raspbian: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘size_t’ {aka ‘unsigned int’} [-Werror=format=] Change-Id: I62199bfc7f3a78403334f5580f31fa5743223c9b
2021-02-24osmo-release.sh: Properly rearrange var init and sanity checksPau Espin Pedrol1-7/+5
Change-Id: If62024fafcd30bc3399115248116e15e141b1cbb
2021-02-24osmo-release.sh: Check LIBVERSION matches rpm *.spec.inPau Espin Pedrol1-41/+81
Change-Id: I7b8d56cc255167407370c888647255d8992f4202
2021-02-24osmo-release.sh: Drop repeated DRY_RUN early exitPau Espin Pedrol1-3/+0
Change-Id: Ib45fa3f5f89e1f7321d6ceace1b9336e5416c38c
2021-02-24osmo-release.sh: Check configure.ac dependency versions match those in rpm ↵Pau Espin Pedrol1-5/+48
*.spec.in Change-Id: I694f4055b39f91aaa0cf5997af67feefad99fdf5
2021-02-24Bump version: 1.5.0.3-45cf → 1.5.11.5.1Harald Welte1-0/+10
Change-Id: I6eea93d9723f7e6ffd1f9eb3d260a5b666cb2124