[S] Change in libosmo-gprs[master]: llc: fix l3par check in gprs_llc_lle_generate_xid()
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/35300?usp=email ) Change subject: llc: fix l3par check in gprs_llc_lle_generate_xid() .. llc: fix l3par check in gprs_llc_lle_generate_xid() A NULL pointer dereference is possible if this function is called with l3par being NULL, but l3par_len being greater than 0. Change-Id: I80c18a45a248b85901d455bfb17e81734fa5961d Fixes: CID#300602 --- M src/llc/llc.c 1 file changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/00/35300/1 diff --git a/src/llc/llc.c b/src/llc/llc.c index 48d1ba6..f8c6ba1 100644 --- a/src/llc/llc.c +++ b/src/llc/llc.c @@ -475,7 +475,7 @@ xid_fields[2].type = OSMO_GPRS_LLC_XID_T_N201_I; xid_fields[2].val = lle->params.n201_i; - if (l3par_len > 0) { + if (l3par != NULL && l3par_len > 0) { xid_fields[3].type = OSMO_GPRS_LLC_XID_T_L3_PAR; xid_fields[3].var.val_len = l3par_len; if (l3par_len > 0) { -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/35300?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I80c18a45a248b85901d455bfb17e81734fa5961d Gerrit-Change-Number: 35300 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange
[S] Change in libosmo-gprs[master]: llc: fix unsigned rc in gprs_llc_lle_tx_xid_resp()
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/35299?usp=email ) Change subject: llc: fix unsigned rc in gprs_llc_lle_tx_xid_resp() .. llc: fix unsigned rc in gprs_llc_lle_tx_xid_resp() Change-Id: I724a1052fff2a43484c8bbf58b115d0769050191 Fixes: CID#300608 --- M src/llc/llc.c 1 file changed, 12 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/99/35299/1 diff --git a/src/llc/llc.c b/src/llc/llc.c index dc1a7b6..48d1ba6 100644 --- a/src/llc/llc.c +++ b/src/llc/llc.c @@ -534,10 +534,10 @@ int gprs_llc_lle_tx_xid_resp(struct gprs_llc_lle *lle, uint8_t *l3par, unsigned int l3par_len) { uint8_t bytes_response[1024]; - unsigned int rc, i; + int rc; /* Replace the SNDCP L3 xid_field with response from our upper layer: */ - for (i = 0; i < lle->rx_xid_len; i++) { + for (unsigned int i = 0; i < lle->rx_xid_len; i++) { struct gprs_llc_xid_field *xid_field_l3; if (lle->rx_xid[i].type != OSMO_GPRS_LLC_XID_T_L3_PAR) continue; -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/35299?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I724a1052fff2a43484c8bbf58b115d0769050191 Gerrit-Change-Number: 35299 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange
[S] Change in osmocom-bb[master]: layer23: fix incorrect check in gsm_arfcn_refer_pcs()
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/35298?usp=email ) Change subject: layer23: fix incorrect check in gsm_arfcn_refer_pcs() .. layer23: fix incorrect check in gsm_arfcn_refer_pcs() Change-Id: I1f4107bdbb0f696ed3bd3cceaa94353ebe69f78f Fixes: 046ee64e3dd7bf285d0e965996bde47acae53099 Fixes: CID#336542 --- M src/host/layer23/src/common/sysinfo.c 1 file changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/98/35298/1 diff --git a/src/host/layer23/src/common/sysinfo.c b/src/host/layer23/src/common/sysinfo.c index 7fdc6ff..efbc519 100644 --- a/src/host/layer23/src/common/sysinfo.c +++ b/src/host/layer23/src/common/sysinfo.c @@ -70,7 +70,7 @@ uint16_t gsm_arfcn_refer_pcs(uint16_t cell_arfcn, const struct gsm48_sysinfo *cell_s, uint16_t arfcn) { /* If ARFCN is not one of the overlapping channel of PCS and DCS. */ - if (arfcn < 512 && arfcn > 810) + if (arfcn < 512 || arfcn > 810) return arfcn; /* If the 'cell' does not refer to PCS. */ -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35298?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I1f4107bdbb0f696ed3bd3cceaa94353ebe69f78f Gerrit-Change-Number: 35298 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange
[M] Change in libosmocore[master]: tests/soft_uart: cosmetic: improve readability of the test output
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35296?usp=email ) Change subject: tests/soft_uart: cosmetic: improve readability of the test output .. Patch Set 1: (1 comment) File tests/soft_uart/soft_uart_test.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-12992): https://gerrit.osmocom.org/c/libosmocore/+/35296/comment/726dd4e0_ef07e24f PS1, Line 30: } while(0) space required before the open parenthesis '(' -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35296?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Icf5410f0b292d41532e0cbd17e6ca0509c76cbd5 Gerrit-Change-Number: 35296 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Fri, 08 Dec 2023 22:03:55 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
[S] Change in libosmocore[master]: soft_uart: cosmetic: use consistent naming for the Rx buffer msgb
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35295?usp=email ) Change subject: soft_uart: cosmetic: use consistent naming for the Rx buffer msgb .. soft_uart: cosmetic: use consistent naming for the Rx buffer msgb In osmo_soft_uart_flush_rx() we use "soft_uart_rx", so be consistent. Change-Id: Id637a39bab8ecd04bca5580bb48f965b501f5b2e --- M src/core/soft_uart.c 1 file changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/95/35295/1 diff --git a/src/core/soft_uart.c b/src/core/soft_uart.c index 6cc8ab4..c6a6dbd 100644 --- a/src/core/soft_uart.c +++ b/src/core/soft_uart.c @@ -492,7 +492,7 @@ suart->rx.flow_state = SUART_FLOW_ST_IDLE; } else if (enable && !suart->rx.running) { if (!suart->rx.msg) - suart->rx.msg = msgb_alloc_c(suart, suart->cfg.rx_buf_size, "soft_uart rx"); + suart->rx.msg = msgb_alloc_c(suart, suart->cfg.rx_buf_size, "soft_uart_rx"); suart->rx.running = true; suart->rx.flow_state = SUART_FLOW_ST_IDLE; } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35295?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id637a39bab8ecd04bca5580bb48f965b501f5b2e Gerrit-Change-Number: 35295 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange
[M] Change in libosmocore[master]: tests/soft_uart: cosmetic: improve readability of the test output
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35296?usp=email ) Change subject: tests/soft_uart: cosmetic: improve readability of the test output .. tests/soft_uart: cosmetic: improve readability of the test output Change-Id: Icf5410f0b292d41532e0cbd17e6ca0509c76cbd5 --- M tests/soft_uart/soft_uart_test.c M tests/soft_uart/soft_uart_test.ok 2 files changed, 102 insertions(+), 61 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/96/35296/1 diff --git a/tests/soft_uart/soft_uart_test.c b/tests/soft_uart/soft_uart_test.c index 9ca9bd9..c8aef15 100644 --- a/tests/soft_uart/soft_uart_test.c +++ b/tests/soft_uart/soft_uart_test.c @@ -24,6 +24,11 @@ #include #include +#define SUART_TEST_BEGIN \ + do { \ + printf("\nExecuting %s\n", __func__); \ + } while(0) + static struct { size_t data_len; const uint8_t *data; @@ -96,15 +101,17 @@ struct osmo_soft_uart_cfg cfg; struct osmo_soft_uart *suart; + SUART_TEST_BEGIN; + suart = osmo_soft_uart_alloc(NULL, __func__, _test_default_cfg); OSMO_ASSERT(suart != NULL); osmo_soft_uart_set_rx(suart, true); - printf(" %s(): testing 8-N-1 (no data)\n", __func__); + printf(" testing 8-N-1 (no data)\n"); test_rx_exec(suart, "F1F1F"); - printf(" %s(): testing 8-N-1 (fill up flush)\n", __func__); + printf(" testing 8-N-1 (fill up flush)\n"); cfg = suart_test_default_cfg; cfg.rx_buf_size = 4; osmo_soft_uart_configure(suart, ); @@ -120,7 +127,7 @@ "F" /* flush! (for sanity) */ ); - printf(" %s(): testing 8-N-1 (HELLO)\n", __func__); + printf(" testing 8-N-1 (HELLO)\n"); cfg = suart_test_default_cfg; cfg.num_stop_bits = 1; osmo_soft_uart_configure(suart, ); @@ -134,7 +141,7 @@ "0 0010 1F" /* 'O', flush! */ ); - printf(" %s(): testing 8-N-1 (framing errors)\n", __func__); + printf(" testing 8-N-1 (framing errors)\n"); test_rx_exec(suart, "1" /* no data */ "0 0" /* stop bit != 1, expect flush */ "0 01010101 0" /* stop bit != 1, expect flush */ @@ -142,7 +149,7 @@ "F" /* flush! */ ); - printf(" %s(): testing 8-N-2 (HELLO)\n", __func__); + printf(" testing 8-N-2 (HELLO)\n"); cfg = suart_test_default_cfg; cfg.num_stop_bits = 2; osmo_soft_uart_configure(suart, ); @@ -156,7 +163,7 @@ "0 0010 1F1F" /* 'O', flush! */ ); - printf(" %s(): testing 8-N-2 (framing errors)\n", __func__); + printf(" testing 8-N-2 (framing errors)\n"); test_rx_exec(suart, "1" /* no data */ "0 00" /* stop bit != 1, expect flush */ "0 01010101 01" /* stop bit != 1, expect flush */ @@ -166,7 +173,7 @@ ); - printf(" %s(): testing 8-E-1 (invalid parity)\n", __func__); + printf(" testing 8-E-1 (invalid parity)\n"); cfg = suart_test_default_cfg; cfg.parity_mode = OSMO_SUART_PARITY_EVEN; osmo_soft_uart_configure(suart, ); @@ -176,7 +183,7 @@ "0 1 1" /* odd parity, expect flush */ "F" /* flush! (for sanity) */ ); - printf(" %s(): testing 8-E-1 (valid parity)\n", __func__); + printf(" testing 8-E-1 (valid parity)\n"); test_rx_exec(suart, "111" /* no data */ "0 0 1" "0 0 1" @@ -190,7 +197,7 @@ "F" /* flush! */ ); - printf(" %s(): testing 8-O-1 (invalid parity)\n", __func__); + printf(" testing 8-O-1 (invalid parity)\n"); cfg = suart_test_default_cfg; cfg.parity_mode = OSMO_SUART_PARITY_ODD; osmo_soft_uart_configure(suart, ); @@ -200,7 +207,7 @@ "0 0 1" /* even parity, expect flush */ "F" /* flush! (for sanity) */ ); - printf(" %s(): testing 8-O-1 (valid parity)\n", __func__); + printf(" testing 8-O-1 (valid parity)\n"); test_rx_exec(suart, "111" /* no data */ "0 1 1" "0 1 1" @@ -267,6 +274,8 @@ struct osmo_soft_uart *suart; int rc; + SUART_TEST_BEGIN; + suart = osmo_soft_uart_alloc(NULL, __func__, _test_default_cfg); OSMO_ASSERT(suart != NULL); @@ -280,40 +289,40 @@
[M] Change in libosmocore[master]: soft_uart: fix the Rx flushing logic, add a unit test
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35297?usp=email ) Change subject: soft_uart: fix the Rx flushing logic, add a unit test .. soft_uart: fix the Rx flushing logic, add a unit test Coverity tells us that with the current logic it's possible (in theory) that we may dereference NULL pointer in osmo_soft_uart_flush_rx(). This is highly unlikely, because the Rx buffer gets allocated once when the Rx is enabled and remains even after the Rx gets disabled. The Rx flags cannot be anything than 0x00 before the Rx gets enabled. Even though this NULL pointer dereference is unlikely, the Rx flushing logic is still not entirely correct. As can be seen from the unit test output, the Rx callback of the application may be called with an empty msgb if the following conditions are both met: a) the osmo_soft_uart_flush_rx() is invoked manually, and b) a parity and/or a framing error has occurred previously. We should not be checking suart->rx.flags in osmo_soft_uart_flush_rx(), since this is already done in suart_rx_ch(), which is calling it. Removing this check also eliminates a theoretical possibility of the NULL pointer dereference, so we're killing two birds with one stone. - Do not check suart->rx.flags in osmo_soft_uart_flush_rx(). - Add a unit test for various flush()ing scenarios. Change-Id: I5179f5fd2361e4e96ac9bf48e80b99e53a7e4712 Fixes: CID#336545 --- M src/core/soft_uart.c M tests/soft_uart/soft_uart_test.c M tests/soft_uart/soft_uart_test.ok 3 files changed, 60 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/97/35297/1 diff --git a/src/core/soft_uart.c b/src/core/soft_uart.c index c6a6dbd..f969ab7 100644 --- a/src/core/soft_uart.c +++ b/src/core/soft_uart.c @@ -79,7 +79,7 @@ * \param[in] suart soft-UART instance holding the receive buffer. */ void osmo_soft_uart_flush_rx(struct osmo_soft_uart *suart) { - if ((suart->rx.msg && msgb_length(suart->rx.msg)) || suart->rx.flags) { + if (suart->rx.msg && msgb_length(suart->rx.msg)) { osmo_timer_del(>rx.timer); if (suart->cfg.rx_cb) { suart->cfg.rx_cb(suart->cfg.priv, suart->rx.msg, suart->rx.flags); diff --git a/tests/soft_uart/soft_uart_test.c b/tests/soft_uart/soft_uart_test.c index c8aef15..43f49b9 100644 --- a/tests/soft_uart/soft_uart_test.c +++ b/tests/soft_uart/soft_uart_test.c @@ -224,6 +224,27 @@ osmo_soft_uart_free(suart); } +static void test_rx_flush(void) +{ + struct osmo_soft_uart *suart; + + SUART_TEST_BEGIN; + + suart = osmo_soft_uart_alloc(NULL, __func__, _test_default_cfg); + OSMO_ASSERT(suart != NULL); + + printf("calling osmo_soft_uart_flush_rx() while Rx disabled\n"); + osmo_soft_uart_flush_rx(suart); + + printf("enabling the receiver\n"); + osmo_soft_uart_set_rx(suart, true); + + printf("calling osmo_soft_uart_flush_rx() while Rx enabled, but no data\n"); + osmo_soft_uart_flush_rx(suart); + + osmo_soft_uart_free(suart); +} + static void test_tx_rx_exec_one(struct osmo_soft_uart *suart, size_t n_bits_total, size_t n_bits_frame) { @@ -566,6 +587,7 @@ int main(int argc, char **argv) { test_rx(); + test_rx_flush(); test_tx_rx(); /* test pulling small number of bits at a time */ diff --git a/tests/soft_uart/soft_uart_test.ok b/tests/soft_uart/soft_uart_test.ok index 6edac16..c42d0f5 100644 --- a/tests/soft_uart/soft_uart_test.ok +++ b/tests/soft_uart/soft_uart_test.ok @@ -51,7 +51,6 @@ suart_rx_cb(flags=02): 01 suart_rx_cb(flags=02): ff test_rx_exec() @ 49: flush the Rx buffer -suart_rx_cb(flags=02): testing 8-E-1 (valid parity) test_rx_exec() @ 63: flush the Rx buffer suart_rx_cb(flags=00): 00 ff aa 55 @@ -62,13 +61,17 @@ suart_rx_cb(flags=02): 01 suart_rx_cb(flags=02): ff test_rx_exec() @ 42: flush the Rx buffer -suart_rx_cb(flags=02): testing 8-O-1 (valid parity) test_rx_exec() @ 63: flush the Rx buffer suart_rx_cb(flags=00): 00 ff aa 55 test_rx_exec() @ 120: flush the Rx buffer suart_rx_cb(flags=00): 80 e0 f8 fe +Executing test_rx_flush +calling osmo_soft_uart_flush_rx() while Rx disabled +enabling the receiver +calling osmo_soft_uart_flush_rx() while Rx enabled, but no data + Executing test_tx_rx testing 8-N-1 suart_tx_cb(len=4/4): de ad be ef -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35297?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I5179f5fd2361e4e96ac9bf48e80b99e53a7e4712 Gerrit-Change-Number: 35297 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange
[S] Change in libosmocore[master]: core: fix wrong logic in _osmo_it_q_dequeue()
Attention is currently required from: fixeria. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/35294?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: core: fix wrong logic in _osmo_it_q_dequeue() .. core: fix wrong logic in _osmo_it_q_dequeue() If the given queue is empty, queue->list.next points to >list. Current implementation would call llist_del() on the queue's llist_head, decrement queue->current_length (which will be 0), and return a pointer to >list to the caller. This is completely wrong. - Use the existing item_dequeue(), which does exactly what we need. - Do not decrement the current_length if nothing was dequeued. - Uncomment code in the unit test, we should not crash anymore. Change-Id: I63094df73b166b549616c869ad908e9f4f7d46d1 Fixes: CID#336557 --- M src/core/it_q.c M tests/it_q/it_q_test.c M tests/it_q/it_q_test.ok 3 files changed, 25 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/94/35294/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35294?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I63094df73b166b549616c869ad908e9f4f7d46d1 Gerrit-Change-Number: 35294 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: fixeria Gerrit-MessageType: newpatchset
[M] Change in libosmocore[master]: tests/it_q: add tc_enqueue/dequeue testcase
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35293?usp=email ) Change subject: tests/it_q: add tc_enqueue/dequeue testcase .. tests/it_q: add tc_enqueue/dequeue testcase This patch is adding a simple testcase, which does the following: * enqueue up to the limit (12 items), * dequeue up to the limit (12 items). Everything works as expected, unless you attempt to dequeue from an empty queue: the test binary segfaults. The problem is explained and fixed in a subsequent patch. Change-Id: Ie0edbf00e656fbe231952bdbccfd37d143e8b2b1 Related: CID#336557 --- M tests/it_q/it_q_test.c M tests/it_q/it_q_test.ok 2 files changed, 67 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/93/35293/1 diff --git a/tests/it_q/it_q_test.c b/tests/it_q/it_q_test.c index 28e32d8..9545183 100644 --- a/tests/it_q/it_q_test.c +++ b/tests/it_q/it_q_test.c @@ -68,6 +68,48 @@ osmo_it_q_destroy(q1); } +static void tc_enqueue_dequeue(void) +{ + const unsigned int qlen = 12; + struct it_q_test1 *item; + struct osmo_it_q *q1; + int rc; + + ENTER_TC; + + printf("allocating q1\n"); + q1 = osmo_it_q_alloc(OTC_GLOBAL, "q1", 12, NULL, NULL); + OSMO_ASSERT(q1); + +#if 0 + printf("try dequeueing from an empty queue\n"); + osmo_it_q_dequeue(q1, , list); + OSMO_ASSERT(item == NULL); +#endif + + printf("adding queue entries up to the limit\n"); + for (unsigned int i = 0; i < qlen; i++) { + item = talloc_zero(OTC_GLOBAL, struct it_q_test1); + rc = osmo_it_q_enqueue(q1, item, list); + OSMO_ASSERT(rc == 0); + } + + printf("removing queue entries up to the limit\n"); + for (unsigned int i = 0; i < qlen; i++) { + osmo_it_q_dequeue(q1, , list); + OSMO_ASSERT(item != NULL); + talloc_free(item); + } + +#if 0 + printf("try dequeueing from an empty queue\n"); + osmo_it_q_dequeue(q1, , list); + OSMO_ASSERT(item == NULL); +#endif + + osmo_it_q_destroy(q1); +} + static int g_read_cb_count; static void q_read_cb(struct osmo_it_q *q, struct llist_head *item) @@ -115,6 +157,7 @@ { tc_alloc(); tc_queue_length(); + tc_enqueue_dequeue(); tc_eventfd(); return 0; } diff --git a/tests/it_q/it_q_test.ok b/tests/it_q/it_q_test.ok index 7f102c6..91ba0ce 100644 --- a/tests/it_q/it_q_test.ok +++ b/tests/it_q/it_q_test.ok @@ -9,6 +9,11 @@ adding queue entries up to the limit attempting to add more than the limit +== Entering test case tc_enqueue_dequeue +allocating q1 +adding queue entries up to the limit +removing queue entries up to the limit + == Entering test case tc_eventfd allocating q1 adding 30 queue entries up to the limit -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35293?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie0edbf00e656fbe231952bdbccfd37d143e8b2b1 Gerrit-Change-Number: 35293 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange
[S] Change in libosmocore[master]: core: fix wrong logic in _osmo_it_q_dequeue()
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35294?usp=email ) Change subject: core: fix wrong logic in _osmo_it_q_dequeue() .. core: fix wrong logic in _osmo_it_q_dequeue() If the given queue is empty, queue->list.next points to >list. Current implementation would call llist_del() on the queue's llist_head, decrement queue->current_length (which will be 0), and return a pointer to >list to the caller. This is completely wrong. - Use the existing item_dequeue(), which does exactly what we need. - Do not decrement the current_length if nothing was dequeued. - Uncomment code in the unit test, we should not crash anymore. Change-Id: I63094df73b166b549616c869ad908e9f4f7d46d1 Fixes: CID#336557 --- M src/core/it_q.c M tests/it_q/it_q_test.c 2 files changed, 23 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/94/35294/1 diff --git a/src/core/it_q.c b/src/core/it_q.c index a3ff420..810dc90 100644 --- a/src/core/it_q.c +++ b/src/core/it_q.c @@ -245,7 +245,7 @@ /*! Thread-safe de-queue from an inter-thread message queue. * \param[in] queue Inter-thread queue from which to dequeue - * \returns dequeued message buffer; NULL if none available + * \returns llist_head of dequeued message; NULL if none available */ struct llist_head *_osmo_it_q_dequeue(struct osmo_it_q *queue) { @@ -254,12 +254,9 @@ pthread_mutex_lock(>mutex); - if (llist_empty(>list)) - l = NULL; - l = queue->list.next; - OSMO_ASSERT(l); - llist_del(l); - queue->current_length--; + l = item_dequeue(>list); + if (l != NULL) + queue->current_length--; pthread_mutex_unlock(>mutex); diff --git a/tests/it_q/it_q_test.c b/tests/it_q/it_q_test.c index 9545183..6025e39 100644 --- a/tests/it_q/it_q_test.c +++ b/tests/it_q/it_q_test.c @@ -81,11 +81,9 @@ q1 = osmo_it_q_alloc(OTC_GLOBAL, "q1", 12, NULL, NULL); OSMO_ASSERT(q1); -#if 0 printf("try dequeueing from an empty queue\n"); osmo_it_q_dequeue(q1, , list); OSMO_ASSERT(item == NULL); -#endif printf("adding queue entries up to the limit\n"); for (unsigned int i = 0; i < qlen; i++) { @@ -101,11 +99,9 @@ talloc_free(item); } -#if 0 printf("try dequeueing from an empty queue\n"); osmo_it_q_dequeue(q1, , list); OSMO_ASSERT(item == NULL); -#endif osmo_it_q_destroy(q1); } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35294?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I63094df73b166b549616c869ad908e9f4f7d46d1 Gerrit-Change-Number: 35294 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange
[S] Change in libosmocore[master]: tests/soft_uart: assert that osmo_soft_uart_rx_ubits() returns 0
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35292?usp=email ) Change subject: tests/soft_uart: assert that osmo_soft_uart_rx_ubits() returns 0 .. tests/soft_uart: assert that osmo_soft_uart_rx_ubits() returns 0 According to Coverity, we check return value of this function in all other cases except this one (9 out of 10 times), so let's add the missing assert(), just to be sure. Change-Id: I675f4089cc990be5fcda792276b6808742f6f0d7 Fixes: CID#336557 --- M tests/soft_uart/soft_uart_test.c 1 file changed, 17 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/92/35292/1 diff --git a/tests/soft_uart/soft_uart_test.c b/tests/soft_uart/soft_uart_test.c index 0e84d5a..9ca9bd9 100644 --- a/tests/soft_uart/soft_uart_test.c +++ b/tests/soft_uart/soft_uart_test.c @@ -68,12 +68,14 @@ { for (unsigned int i = 0; input[i] != '\0'; i++) { ubit_t ubit; + int rc; switch (input[i]) { case '0': case '1': ubit = input[i] - '0'; - osmo_soft_uart_rx_ubits(suart, , 1); + rc = osmo_soft_uart_rx_ubits(suart, , 1); + OSMO_ASSERT(rc == 0); /* 0 on success */ break; case 'F': printf("%s() @ %u: flush the Rx buffer\n", __func__, i); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35292?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I675f4089cc990be5fcda792276b6808742f6f0d7 Gerrit-Change-Number: 35292 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange
[S] Change in osmo-ci[master]: Revert "coverity: build osmo-trx with USRP1 support"
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/35291?usp=email ) Change subject: Revert "coverity: build osmo-trx with USRP1 support" .. Revert "coverity: build osmo-trx with USRP1 support" This reverts commit 27e5f8ac15cd2d40897e16fdd98381370973d0b7. libusrp is not actively maintained by the Osmocom community (nor by anybody else, as far as I know) and we don't want to see dozens of CIDs in Coverity's defect browser, which nobody is going to fix... Change-Id: I5f47bbcc1388fd7bbe6830481e6a8abcdc582029 --- M coverity/build_Osmocom.sh M coverity/prepare_source_Osmocom.sh 2 files changed, 15 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/91/35291/1 diff --git a/coverity/build_Osmocom.sh b/coverity/build_Osmocom.sh index 3bf9d4b..8fde7e6 100755 --- a/coverity/build_Osmocom.sh +++ b/coverity/build_Osmocom.sh @@ -43,15 +43,6 @@ popd } -build_libusrp() { - pushd libusrp - PM=$PARALLEL_MAKE - PARALLEL_MAKE="" - do_build - PARALLEL_MAKE=$PM - popd -} - build_osmocombb() { pushd osmocom-bb/src/ make nofirmware @@ -72,7 +63,6 @@ build_default asn1c build_default libosmocore build_libasn1c -build_libusrp build_default libosmo-abis build_default libosmo-gprs build_default libosmo-netif @@ -115,7 +105,6 @@ build_default osmo-trx \ --with-mstrx \ - --with-usrp1 \ --with-uhd \ --with-lms \ --with-ipc diff --git a/coverity/prepare_source_Osmocom.sh b/coverity/prepare_source_Osmocom.sh index 2c69356..6237f84 100755 --- a/coverity/prepare_source_Osmocom.sh +++ b/coverity/prepare_source_Osmocom.sh @@ -20,7 +20,6 @@ libosmo-pfcp libosmo-sccp libsmpp34 - libusrp osmo-bsc osmo-msc osmo-mgw -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35291?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I5f47bbcc1388fd7bbe6830481e6a8abcdc582029 Gerrit-Change-Number: 35291 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange
[S] Change in osmo-bsc[master]: gsm_data: use ABIS_RSL_CHAN_NR_CBITS_* in gsm_pchan2chan_nr()
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35289?usp=email ) Change subject: gsm_data: use ABIS_RSL_CHAN_NR_CBITS_* in gsm_pchan2chan_nr() .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35289?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic9370d8d7f13cce0f9c6e60a920d04161a7d6844 Gerrit-Change-Number: 35289 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Attention: fixeria Gerrit-Comment-Date: Fri, 08 Dec 2023 19:12:12 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-bsc[master]: gsm_data: fix wrong variable set in gsm_pchan2chan_nr()
Attention is currently required from: fixeria, laforge, neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35288?usp=email ) Change subject: gsm_data: fix wrong variable set in gsm_pchan2chan_nr() .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35288?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic9c7c2e46e24dab0b721221e9adcbbae2ca56d23 Gerrit-Change-Number: 35288 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Attention: neels Gerrit-Attention: laforge Gerrit-Attention: fixeria Gerrit-Comment-Date: Fri, 08 Dec 2023 19:11:36 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in libosmocore[master]: socket: Fix uninitialized mem ptr free in osmo_sock_init2_multiaddr2()
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35290?usp=email ) Change subject: socket: Fix uninitialized mem ptr free in osmo_sock_init2_multiaddr2() .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35290?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I06b810fde7bf750fcb42d6d9e6223883e26f5f0b Gerrit-Change-Number: 35290 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: fixeria Gerrit-CC: Jenkins Builder Gerrit-Attention: pespin Gerrit-Comment-Date: Fri, 08 Dec 2023 19:08:58 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in libosmocore[master]: socket: Fix uninitialized mem ptr free in osmo_sock_init2_multiaddr2()
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35290?usp=email ) Change subject: socket: Fix uninitialized mem ptr free in osmo_sock_init2_multiaddr2() .. socket: Fix uninitialized mem ptr free in osmo_sock_init2_multiaddr2() The goto tag was wrong, probably due to a copy-paste mistype while reimplementing the function. Closes: Coverity CID#336546 Change-Id: I06b810fde7bf750fcb42d6d9e6223883e26f5f0b --- M src/core/socket.c 1 file changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/90/35290/1 diff --git a/src/core/socket.c b/src/core/socket.c index c600732..5b7489d 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -905,7 +905,7 @@ if (family == AF_INET && loc_has_v6only_addr) { LOGP(DLGLOBAL, LOGL_ERROR, "Cannot bind an IPv6 address to an AF_INET socket\n"); rc = -EINVAL; - goto ret_freeaddrinfo; + goto ret_freeaddrinfo_loc; } } /* figure out remote side of socket */ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35290?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I06b810fde7bf750fcb42d6d9e6223883e26f5f0b Gerrit-Change-Number: 35290 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
[S] Change in osmo-bsc[master]: gsm_data: fix wrong variable set in gsm_pchan2chan_nr()
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35288?usp=email ) Change subject: gsm_data: fix wrong variable set in gsm_pchan2chan_nr() .. gsm_data: fix wrong variable set in gsm_pchan2chan_nr() I believe the actual intention was to reset the 'lchan_nr' variable, and not the 'chan_nr'. The 'lchan_nr' is used to compose the 'cbits': cbits = 0x04; cbits += lchan_nr; If the value is 4, then the result is: cbits = 0x04 + 4 = 0x08 which corresponds to SDCCH8 (not SDCCH4), and is clearly wrong. Change-Id: Ic9c7c2e46e24dab0b721221e9adcbbae2ca56d23 Fixes: ec1b5a0e9 "gsm_ts2chan_nr(): add assertions for lchan_nr" Fixes: CID#336586 --- M src/osmo-bsc/gsm_data.c 1 file changed, 25 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/88/35288/1 diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 580fa84..4d77e75 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -485,8 +485,8 @@ * See osmo-bts-xxx/oml.c:opstart_compl(). */ if (lchan_nr == CCCH_LCHAN) - chan_nr = 0; - else if (lchan_nr >= 4) + lchan_nr = 0; + else if (lchan_nr > 4) return -EINVAL; cbits = 0x04; cbits += lchan_nr; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35288?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic9c7c2e46e24dab0b721221e9adcbbae2ca56d23 Gerrit-Change-Number: 35288 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange
[S] Change in osmo-bsc[master]: gsm_data: use ABIS_RSL_CHAN_NR_CBITS_* in gsm_pchan2chan_nr()
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35289?usp=email ) Change subject: gsm_data: use ABIS_RSL_CHAN_NR_CBITS_* in gsm_pchan2chan_nr() .. gsm_data: use ABIS_RSL_CHAN_NR_CBITS_* in gsm_pchan2chan_nr() Change-Id: Ic9370d8d7f13cce0f9c6e60a920d04161a7d6844 --- M src/osmo-bsc/gsm_data.c 1 file changed, 16 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/89/35289/1 diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 4d77e75..b11607e 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -460,22 +460,20 @@ if (vamos_is_secondary) cbits = ABIS_RSL_CHAN_NR_CBITS_OSMO_VAMOS_Bm_ACCHs; else - cbits = 0x01; + cbits = ABIS_RSL_CHAN_NR_CBITS_Bm_ACCHs; break; case GSM_PCHAN_PDCH: if (lchan_nr != 0) return -EINVAL; - cbits = RSL_CHAN_OSMO_PDCH >> 3; + cbits = ABIS_RSL_CHAN_NR_CBITS_OSMO_PDCH; break; case GSM_PCHAN_TCH_H: if (lchan_nr >= 2) return -EINVAL; if (vamos_is_secondary) cbits = ABIS_RSL_CHAN_NR_CBITS_OSMO_VAMOS_Lm_ACCHs(lchan_nr); - else { - cbits = 0x02; - cbits += lchan_nr; - } + else + cbits = ABIS_RSL_CHAN_NR_CBITS_Lm_ACCHs(lchan_nr); break; case GSM_PCHAN_CCCH_SDCCH4: case GSM_PCHAN_CCCH_SDCCH4_CBCH: @@ -488,21 +486,19 @@ lchan_nr = 0; else if (lchan_nr > 4) return -EINVAL; - cbits = 0x04; - cbits += lchan_nr; + cbits = ABIS_RSL_CHAN_NR_CBITS_SDCCH4_ACCH(lchan_nr); break; case GSM_PCHAN_SDCCH8_SACCH8C: case GSM_PCHAN_SDCCH8_SACCH8C_CBCH: if (lchan_nr >= 8) return -EINVAL; - cbits = 0x08; - cbits += lchan_nr; + cbits = ABIS_RSL_CHAN_NR_CBITS_SDCCH8_ACCH(lchan_nr); break; default: case GSM_PCHAN_CCCH: if (lchan_nr != 0) return -EINVAL; - cbits = 0x10; + cbits = ABIS_RSL_CHAN_NR_CBITS_BCCH; break; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35289?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic9370d8d7f13cce0f9c6e60a920d04161a7d6844 Gerrit-Change-Number: 35289 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange
[M] Change in libosmo-netif[master]: stream_srv_link: osmo_stream_srv_link_get_sockname() now returns the ...
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35287?usp=email ) Change subject: stream_srv_link: osmo_stream_srv_link_get_sockname() now returns the full set of addresses .. stream_srv_link: osmo_stream_srv_link_get_sockname() now returns the full set of addresses As a result, internal stream_srv_link logging will also show the whole set of listening addresses. This is mostly fine since it mainly happens only once, during connection accept(), and this way it provides full view of where from and where to the client connected. Related: SYS#5581 Change-Id: I216502a9aeafe638940f110bc9fddf2504b2ac3a --- M src/stream_srv.c 1 file changed, 47 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/87/35287/1 diff --git a/src/stream_srv.c b/src/stream_srv.c index 0dca10a..98b996b 100644 --- a/src/stream_srv.c +++ b/src/stream_srv.c @@ -85,7 +85,7 @@ struct osmo_stream_srv_link { struct osmo_fd ofd; char*name; - charsockname[OSMO_SOCK_NAME_MAXLEN]; + charsockname[OSMO_STREAM_MAX_ADDRS * INET6_ADDRSTRLEN + OSMO_STREAM_MAX_ADDRS + 2 + 6 + 1]; char*addr[OSMO_STREAM_MAX_ADDRS]; uint8_t addrcnt; uint16_tport; @@ -338,22 +338,42 @@ return link->data; } +/* Similar to osmo_sock_multiaddr_get_name_buf(), but aimed at listening sockets (only local part): */ +static char *get_local_sockname_buf(char *buf, size_t buf_len, int fd, int proto) +{ + char hostbuf[OSMO_STREAM_MAX_ADDRS][INET6_ADDRSTRLEN]; + size_t num_hostbuf = ARRAY_SIZE(hostbuf); + char portbuf[6]; + struct osmo_strbuf sb = { .buf = buf, .len = buf_len }; + bool need_more_bufs; + int rc; + + rc = osmo_sock_multiaddr_get_ip_and_port(fd, proto, [0][0], +_hostbuf, sizeof(hostbuf[0]), +portbuf, sizeof(portbuf), true); + if (rc < 0) + return NULL; + + need_more_bufs = num_hostbuf > ARRAY_SIZE(hostbuf); + if (need_more_bufs) + num_hostbuf = ARRAY_SIZE(hostbuf); + OSMO_STRBUF_APPEND(sb, osmo_multiaddr_ip_and_port_snprintf, + [0][0], num_hostbuf, sizeof(hostbuf[0]), portbuf); + if (need_more_bufs) + OSMO_STRBUF_PRINTF(sb, ""); + + return buf; +} + /*! \brief Get description of the stream server link e. g. 127.0.0.1:1234 * \param[in] link Stream Server Link to examine * \returns Link description or NULL in case of error */ char *osmo_stream_srv_link_get_sockname(const struct osmo_stream_srv_link *link) { - static char buf[INET6_ADDRSTRLEN + 6]; - int rc = osmo_sock_get_local_ip(link->ofd.fd, buf, INET6_ADDRSTRLEN); - if (rc < 0) - return NULL; + static char buf[sizeof(link->sockname)]; - buf[strnlen(buf, INET6_ADDRSTRLEN + 6)] = ':'; - - rc = osmo_sock_get_local_ip_port(link->ofd.fd, buf + strnlen(buf, INET6_ADDRSTRLEN + 6), 6); - if (rc < 0) - return NULL; - + if (!get_local_sockname_buf(buf, sizeof(buf), link->ofd.fd, link->proto)) + OSMO_STRLCPY_ARRAY(buf, ""); return buf; } @@ -443,7 +463,7 @@ return -EIO; } - OSMO_STRLCPY_ARRAY(link->sockname, osmo_stream_srv_link_get_sockname(link)); + get_local_sockname_buf(link->sockname, sizeof(link->sockname), link->ofd.fd, link->proto); return 0; } -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35287?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I216502a9aeafe638940f110bc9fddf2504b2ac3a Gerrit-Change-Number: 35287 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
[S] Change in libosmo-netif[master]: stream_cli: Introduce API osmo_stream_srv_get_sockname()
pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/libosmo-netif/+/35286?usp=email ) Change subject: stream_cli: Introduce API osmo_stream_srv_get_sockname() .. stream_cli: Introduce API osmo_stream_srv_get_sockname() Similar to what osmo_stream_srv_link and osmo_stream_cli already have. Change-Id: I171befd1fdf40c3cbb3fc7e4c3eedf82128b0712 Related: SYS#5580 --- M TODO-RELEASE M include/osmocom/netif/stream.h M src/stream_srv.c 3 files changed, 27 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/86/35286/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35286?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I171befd1fdf40c3cbb3fc7e4c3eedf82128b0712 Gerrit-Change-Number: 35286 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset
[S] Change in libosmo-netif[master]: stream_cli: Introduce API osmo_stream_srv_get_sockname()
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35286?usp=email ) Change subject: stream_cli: Introduce API osmo_stream_srv_get_sockname() .. stream_cli: Introduce API osmo_stream_srv_get_sockname() Similar to what osmo_stream_srv_link and osmo_stream_cli already have. Change-Id: I171befd1fdf40c3cbb3fc7e4c3eedf82128b0712 Related: SYS#5580 --- M include/osmocom/netif/stream.h M src/stream_srv.c 2 files changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/86/35286/1 diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h index 681f9ec..2e6aa97 100644 --- a/include/osmocom/netif/stream.h +++ b/include/osmocom/netif/stream.h @@ -64,6 +64,7 @@ void osmo_stream_srv_set_closed_cb(struct osmo_stream_srv *conn, int (*closed_cb)(struct osmo_stream_srv *conn)); void *osmo_stream_srv_get_data(struct osmo_stream_srv *conn); struct osmo_stream_srv_link *osmo_stream_srv_get_master(struct osmo_stream_srv *conn); +const char *osmo_stream_srv_get_sockname(const struct osmo_stream_srv *conn); struct osmo_fd *osmo_stream_srv_get_ofd(struct osmo_stream_srv *srv); int osmo_stream_srv_get_fd(const struct osmo_stream_srv *srv); void osmo_stream_srv_destroy(struct osmo_stream_srv *conn); diff --git a/src/stream_srv.c b/src/stream_srv.c index f5a0b42..0dca10a 100644 --- a/src/stream_srv.c +++ b/src/stream_srv.c @@ -836,6 +836,19 @@ return conn->data; } +/*! \brief Get the stream server socket description. + * \param[in] cli Stream Server to examine + * \returns Socket description or NULL in case of error */ +const char *osmo_stream_srv_get_sockname(const struct osmo_stream_srv *conn) +{ + static char buf[OSMO_STREAM_MAX_ADDRS * OSMO_SOCK_NAME_MAXLEN]; + + osmo_sock_multiaddr_get_name_buf(buf, sizeof(buf), +osmo_stream_srv_get_fd(conn), conn->srv->proto); + + return buf; +} + /*! \brief Get Osmocom File Descriptor of the stream server * \param[in] conn Stream Server * \returns Pointer to \ref osmo_fd */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35286?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I171befd1fdf40c3cbb3fc7e4c3eedf82128b0712 Gerrit-Change-Number: 35286 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
[S] Change in libosmo-netif[master]: stream_cli: osmo_stream_cli_get_sockname() now returns the full set o...
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-netif/+/35285?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: stream_cli: osmo_stream_cli_get_sockname() now returns the full set of addresses .. stream_cli: osmo_stream_cli_get_sockname() now returns the full set of addresses This is used by API callers, and internally to log connected/disconnected events. Related: SYS#5581 Change-Id: I249ee7cad824cf971faabe06d10de2426c1b0c8b --- M TODO-RELEASE M src/stream_cli.c 2 files changed, 18 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/85/35285/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35285?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I249ee7cad824cf971faabe06d10de2426c1b0c8b Gerrit-Change-Number: 35285 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
[S] Change in libosmo-netif[master]: stream_cli: osmo_stream_cli_get_sockname() now returns the full set o...
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35285?usp=email ) Change subject: stream_cli: osmo_stream_cli_get_sockname() now returns the full set of addresses .. stream_cli: osmo_stream_cli_get_sockname() now returns the full set of addresses This is used by API callers, and internally to log connected/disconnected events. Related: SYS#5581 Change-Id: I249ee7cad824cf971faabe06d10de2426c1b0c8b --- M src/stream_cli.c 1 file changed, 16 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/85/35285/1 diff --git a/src/stream_cli.c b/src/stream_cli.c index 4f2963d..1b9994c 100644 --- a/src/stream_cli.c +++ b/src/stream_cli.c @@ -685,9 +685,10 @@ * \returns Socket description or NULL in case of error */ char *osmo_stream_cli_get_sockname(const struct osmo_stream_cli *cli) { - static char buf[OSMO_SOCK_NAME_MAXLEN]; + static char buf[OSMO_STREAM_MAX_ADDRS * OSMO_SOCK_NAME_MAXLEN]; - osmo_sock_get_name_buf(buf, OSMO_SOCK_NAME_MAXLEN, osmo_stream_cli_get_fd(cli)); + osmo_sock_multiaddr_get_name_buf(buf, sizeof(buf), +osmo_stream_cli_get_fd(cli), cli->proto); return buf; } -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35285?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I249ee7cad824cf971faabe06d10de2426c1b0c8b Gerrit-Change-Number: 35285 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
[M] Change in libosmo-netif[master]: stream: Use new multiaddr APIs to log whole set of sock addresses
pespin has abandoned this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35240?usp=email ) Change subject: stream: Use new multiaddr APIs to log whole set of sock addresses .. Abandoned -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35240?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I7ae300595825836cc7d6fa07238c0c2f15d14e85 Gerrit-Change-Number: 35240 Gerrit-PatchSet: 5 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-MessageType: abandon
[S] Change in libosmo-netif[master]: netif: sctp.h: Introduce value_string for enum sctp_spinfo_state
Attention is currently required from: laforge, pespin. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-netif/+/35280?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Code-Review+1 by laforge, Verified+1 by Jenkins Builder Change subject: netif: sctp.h: Introduce value_string for enum sctp_spinfo_state .. netif: sctp.h: Introduce value_string for enum sctp_spinfo_state This can be used by apps retrieving struct sctp_paddrinfo through getsockopt(SCTP_GET_PEER_ADDR_INFO). The relevant field is spinfo_state: osmo_sctp_spinfo_state_str(pinfo.spinfo_state); Related: SYS#6636 Change-Id: I78a0bd8279a04f4011c7273e0f542981308e482f --- M include/osmocom/netif/sctp.h M src/sctp.c 2 files changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/80/35280/3 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35280?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I78a0bd8279a04f4011c7273e0f542981308e482f Gerrit-Change-Number: 35280 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: laforge Gerrit-Attention: pespin Gerrit-MessageType: newpatchset
[S] Change in libosmo-netif[master]: netif: sctp.h: Introduce value_string for enum sctp_sstat_state
Attention is currently required from: laforge, pespin. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-netif/+/35283?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+1 by laforge, Verified+1 by Jenkins Builder Change subject: netif: sctp.h: Introduce value_string for enum sctp_sstat_state .. netif: sctp.h: Introduce value_string for enum sctp_sstat_state This can be used by apps retrieving struct sctp_status through getsockopt(SCTP_STATUS). The relevant field is spinfo_state: osmo_sctp_sstat_state_str(st.sstat_state); Change-Id: Id7d8a9ad7b32406ac603e520b33809d7ae5c762f Related: SYS#6636 --- M include/osmocom/netif/sctp.h M src/sctp.c 2 files changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/83/35283/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35283?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Id7d8a9ad7b32406ac603e520b33809d7ae5c762f Gerrit-Change-Number: 35283 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: laforge Gerrit-Attention: pespin Gerrit-MessageType: newpatchset
[M] Change in libosmo-sccp[master]: vty: Introduce show cs7 instance asp-assoc-status
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35284?usp=email ) Change subject: vty: Introduce show cs7 instance asp-assoc-status .. vty: Introduce show cs7 instance asp-assoc-status Change-Id: I96ef4c0500991c9b86ab5991fb338ea20a18ff33 Depends: libosmocore.git Change-Id I3e1c84526b006baff435bbbca49dc6cf7d201cf5 Depends: libosmo-netif.git Change-Id I78a0bd8279a04f4011c7273e0f542981308e482f Related: SYS#6636 --- M TODO-RELEASE M src/osmo_ss7_vty.c M tests/vty/ss7_asp_test.vty 3 files changed, 175 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/84/35284/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 1913dc6..25eeb6e 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -11,4 +11,4 @@ libosmo-netif >1.4.0 osmo_stream_{srv,cli}_get_fd() libosmocore >1.9.0 osmo_sock_multiaddr_get_ip_and_port(), osmo_multiaddr_ip_and_port_snprintf() libosmocore >1.9.0 osmo_sock_sctp_get_peer_addr_info() -libosmo-netif >1.4.0osmo_sctp_spinfo_state_str() +libosmo-netif >1.4.0osmo_sctp_spinfo_state_str(), osmo_sctp_sstat_state_str() diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 0a1ad92..7896b48 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -28,6 +28,7 @@ #include #include +#include #include @@ -1422,6 +1423,154 @@ return show_asp_remaddr(vty, id, asp_name); } +static void show_one_asp_assoc_status_tcp(struct vty *vty, struct osmo_ss7_asp *asp) +{ + struct osmo_sockaddr osa = {}; + struct tcp_info tcpi = {}; + socklen_t len; + int fd, rc; + int rx_pend_bytes = 0; + + fd = ss7_asp_get_fd(asp); + if (fd < 0) { + vty_out(vty, "%-12s uninitialized%s", asp->cfg.name, VTY_NEWLINE); + return; + } + + len = sizeof(osa.u.sas); + rc = getpeername(fd, , ); + + len = sizeof(tcpi); + rc = getsockopt(fd, SOL_TCP, TCP_INFO, , ); + if (rc < 0) { + char buf_err[128]; + strerror_r(errno, buf_err, sizeof(buf_err)); + vty_out(vty, "%-12s getsockopt(TCP_INFO) failed: %s%s", + asp->cfg.name, buf_err, VTY_NEWLINE); + return; + } + + rc = ioctl(fd, FIONREAD, _pend_bytes); + + vty_out(vty, "%-12s TCP_%-19s %-9s %-10s %-8u %-9u %-7u %-9u %-46s%s", + asp->cfg.name, + get_value_string(tcp_info_state_values, tcpi.tcpi_state), + "-", "-", tcpi.tcpi_rcv_wnd, tcpi.tcpi_unacked, rx_pend_bytes, + tcpi.tcpi_pmtu, osmo_sockaddr_to_str(), + VTY_NEWLINE); +} + +#ifdef HAVE_LIBSCTP +static void show_one_asp_assoc_status_sctp(struct vty *vty, struct osmo_ss7_asp *asp) +{ + struct osmo_sockaddr osa = {}; + struct sctp_status st; + socklen_t len; + int fd, rc; + + fd = ss7_asp_get_fd(asp); + if (fd < 0) { + vty_out(vty, "%-12s uninitialized%s", asp->cfg.name, VTY_NEWLINE); + return; + } + + memset(, 0, sizeof(st)); + len = sizeof(st); + rc = getsockopt(fd, IPPROTO_SCTP, SCTP_STATUS, , ); + if (rc < 0) { + char buf_err[128]; + strerror_r(errno, buf_err, sizeof(buf_err)); + vty_out(vty, "%-12s getsockopt(SCTP_STATUS) failed: %s%s", asp->cfg.name, buf_err, VTY_NEWLINE); + return; + } + + osa.u.sas = st.sstat_primary.spinfo_address; + vty_out(vty, "%-12s SCTP_%-18s %-9u %-10u %-8u %-9u %-7u %-9u %-46s%s", + asp->cfg.name, + osmo_sctp_sstat_state_str(st.sstat_state), + st.sstat_instrms, st.sstat_outstrms, + st.sstat_rwnd, st.sstat_unackdata, st.sstat_penddata, + st.sstat_fragmentation_point, + osmo_sockaddr_to_str(), + VTY_NEWLINE); +} +#endif + +static void show_one_asp_assoc_status(struct vty *vty, struct osmo_ss7_asp *asp) +{ + int proto = ss7_asp_proto_to_ip_proto(asp->cfg.proto); + + switch (proto) { + case IPPROTO_TCP: + show_one_asp_assoc_status_tcp(vty, asp); + break; +#ifdef HAVE_LIBSCTP + case IPPROTO_SCTP: + show_one_asp_assoc_status_sctp(vty, asp); + break; +#endif + default: + vty_out(vty, "%-12s unknown proto %u%s", asp->cfg.name, proto, VTY_NEWLINE); + break; + } +} + +static int show_asp_assoc_status(struct vty *vty, int id, const char *asp_name) +{ + struct osmo_ss7_instance *inst; + struct osmo_ss7_asp *asp = NULL; + + inst = osmo_ss7_instance_find(id); + if (!inst) { + vty_out(vty, "No SS7 instance %d found%s", id, VTY_NEWLINE); + return CMD_WARNING; + } + + if (asp_name) { + asp =
[M] Change in libosmo-sccp[master]: vty: Introduce show cs7 instance asp-remaddr
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35281?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: vty: Introduce show cs7 instance asp-remaddr .. vty: Introduce show cs7 instance asp-remaddr Depends: libosmocore.git Change-Id I3e1c84526b006baff435bbbca49dc6cf7d201cf5 Depends: libosmo-netif.git Change-Id I78a0bd8279a04f4011c7273e0f542981308e482f Related: SYS#6636 Change-Id: Ie5ac1d0ee74d2b977b1f5319cd88566df7994fd0 --- M TODO-RELEASE M src/osmo_ss7_vty.c M tests/vty/ss7_asp_test.vty 3 files changed, 204 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/81/35281/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35281?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ie5ac1d0ee74d2b977b1f5319cd88566df7994fd0 Gerrit-Change-Number: 35281 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin Gerrit-MessageType: newpatchset
[S] Change in libosmo-netif[master]: netif: sctp.h: Introduce value_string for enum sctp_spinfo_state
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35280?usp=email ) Change subject: netif: sctp.h: Introduce value_string for enum sctp_spinfo_state .. Patch Set 2: (1 comment) File src/sctp.c: https://gerrit.osmocom.org/c/libosmo-netif/+/35280/comment/90403782_28475958 PS2, Line 80: {} I would have used { 0, NULL } for consistency with above. But not critical, of course -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35280?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I78a0bd8279a04f4011c7273e0f542981308e482f Gerrit-Change-Number: 35280 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: pespin Gerrit-Comment-Date: Fri, 08 Dec 2023 16:05:37 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
[S] Change in libosmo-netif[master]: netif: sctp.h: Introduce value_string for enum sctp_sstat_state
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35283?usp=email ) Change subject: netif: sctp.h: Introduce value_string for enum sctp_sstat_state .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35283?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Id7d8a9ad7b32406ac603e520b33809d7ae5c762f Gerrit-Change-Number: 35283 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: pespin Gerrit-Comment-Date: Fri, 08 Dec 2023 16:05:06 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in libosmo-netif[master]: netif: sctp.h: Introduce value_string for enum sctp_spinfo_state
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35280?usp=email ) Change subject: netif: sctp.h: Introduce value_string for enum sctp_spinfo_state .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35280?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I78a0bd8279a04f4011c7273e0f542981308e482f Gerrit-Change-Number: 35280 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: pespin Gerrit-Comment-Date: Fri, 08 Dec 2023 16:04:51 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in pysim[master]: isim: Replace legacy imperative address TLV encoder/decoder with cons...
Attention is currently required from: laforge. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/35278?usp=email to look at the new patch set (#4). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: isim: Replace legacy imperative address TLV encoder/decoder with construct .. isim: Replace legacy imperative address TLV encoder/decoder with construct We've recently introduced IPv{4,6}Adapter construct classes and can switch to this instead of using the old imperative encoder/decoder functions {enc,dec}_addr_tlv(). Aside from code cleanup, this also means we now support the IPv6 address type in EF.PCSCF. Change-Id: I4d01ccfe473a8a80fbee33fdcbd8a19b39da85ac --- M pySim/ts_31_103.py M pysim-testdata/pySim-trace_test_gsmtap.pcapng.ok 2 files changed, 33 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/78/35278/4 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35278?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I4d01ccfe473a8a80fbee33fdcbd8a19b39da85ac Gerrit-Change-Number: 35278 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: laforge Gerrit-MessageType: newpatchset
[M] Change in pysim[master]: isim: Replace legacy imperative address TLV encoder/decoder with cons...
Attention is currently required from: laforge. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/35278?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: isim: Replace legacy imperative address TLV encoder/decoder with construct .. isim: Replace legacy imperative address TLV encoder/decoder with construct We've recently introduced IPv{4,6}Adapter construct classes and can switch to this instead of using the old imperative encoder/decoder functions {enc,dec}_addr_tlv(). Aside from code cleanup, this also means we now support the IPv6 address type in EF.PCSCF. Change-Id: I4d01ccfe473a8a80fbee33fdcbd8a19b39da85ac --- M pySim/ts_31_103.py M pysim-testdata/pySim-trace_test_gsmtap.pcapng.ok 2 files changed, 33 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/78/35278/3 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35278?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I4d01ccfe473a8a80fbee33fdcbd8a19b39da85ac Gerrit-Change-Number: 35278 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: laforge Gerrit-MessageType: newpatchset
[S] Change in libosmo-netif[master]: netif: sctp.h: Introduce value_string for enum sctp_sstat_state
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35283?usp=email ) Change subject: netif: sctp.h: Introduce value_string for enum sctp_sstat_state .. netif: sctp.h: Introduce value_string for enum sctp_sstat_state This can be used by apps retrieving struct sctp_status through getsockopt(SCTP_STATUS). The relevant field is spinfo_state: osmo_sctp_sstat_state_str(st.sstat_state); Change-Id: Id7d8a9ad7b32406ac603e520b33809d7ae5c762f Related: SYS#6636 --- M include/osmocom/netif/sctp.h M src/sctp.c 2 files changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/83/35283/1 diff --git a/include/osmocom/netif/sctp.h b/include/osmocom/netif/sctp.h index 374cf6e..9dcb6dd 100644 --- a/include/osmocom/netif/sctp.h +++ b/include/osmocom/netif/sctp.h @@ -53,3 +53,8 @@ extern const struct value_string osmo_sctp_spinfo_state_strs[]; static inline const char *osmo_sctp_spinfo_state_str(enum sctp_spinfo_state val) { return get_value_string(osmo_sctp_spinfo_state_strs, val); } + +enum sctp_sstat_state; +extern const struct value_string osmo_sctp_sstat_state_strs[]; +static inline const char *osmo_sctp_sstat_state_str(enum sctp_sstat_state val) +{ return get_value_string(osmo_sctp_sstat_state_strs, val); } diff --git a/src/sctp.c b/src/sctp.c index c725d2f..daa19cf 100644 --- a/src/sctp.c +++ b/src/sctp.c @@ -79,3 +79,17 @@ { SCTP_UNKNOWN, "UNKNOWN" }, {} }; + +/* linux/sctp.h enum sctp_sstat_state */ +const struct value_string osmo_sctp_sstat_state_strs[] = { + { SCTP_EMPTY, "EMPTY" }, + { SCTP_CLOSED, "CLOSED" }, + { SCTP_COOKIE_WAIT, "COOKIE_WAIT" }, + { SCTP_COOKIE_ECHOED, "COOKIE_ECHOED" }, + { SCTP_ESTABLISHED, "ESTABLISHED" }, + { SCTP_SHUTDOWN_PENDING,"SHUTDOWN_PENDING" }, + { SCTP_SHUTDOWN_SENT, "SHUTDOWN_SENT" }, + { SCTP_SHUTDOWN_RECEIVED, "SHUTDOWN_RECEIVED" }, + { SCTP_SHUTDOWN_ACK_SENT, "SHUTDOWN_ACK_SENT" }, + {} +}; -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35283?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Id7d8a9ad7b32406ac603e520b33809d7ae5c762f Gerrit-Change-Number: 35283 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
[S] Change in pysim[master]: bertlv_parse_len: Fix input data is smaller than num length octets
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35282?usp=email ) Change subject: bertlv_parse_len: Fix input data is smaller than num length octets .. bertlv_parse_len: Fix input data is smaller than num length octets This can happen if there's a file with invalid encoding on the card, such as a tag followed by all-ff. Let's gracefully ignore it and return zero bytes as response. Change-Id: Ic44557368a6034dbf4bb021ab23a57927c22def0 --- M pySim/utils.py 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/82/35282/1 diff --git a/pySim/utils.py b/pySim/utils.py index 44800fb..23b26f9 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -314,6 +314,8 @@ else: num_len_oct = binary[0] & 0x7f length = 0 +if len(binary) < num_len_oct + 1: +return (0, b'') for i in range(1, 1+num_len_oct): length <<= 8 length |= binary[i] -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35282?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ic44557368a6034dbf4bb021ab23a57927c22def0 Gerrit-Change-Number: 35282 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange
[S] Change in libosmo-netif[master]: netif: sctp.h: Introduce value_string for enum sctp_spinfo_state
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-netif/+/35280?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: netif: sctp.h: Introduce value_string for enum sctp_spinfo_state .. netif: sctp.h: Introduce value_string for enum sctp_spinfo_state This can be used by apps retrieving struct sctp_paddrinfo through getsockopt(SCTP_GET_PEER_ADDR_INFO). The relevant field is spinfo_state: osmo_sctp_spinfo_state_str(pinfo.spinfo_state); Related: SYS#6636 Change-Id: I78a0bd8279a04f4011c7273e0f542981308e482f --- M include/osmocom/netif/sctp.h M src/sctp.c 2 files changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/80/35280/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35280?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I78a0bd8279a04f4011c7273e0f542981308e482f Gerrit-Change-Number: 35280 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin Gerrit-MessageType: newpatchset
[M] Change in libosmo-sccp[master]: vty: Introduce show cs7 instance asp-remaddr
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35281?usp=email ) Change subject: vty: Introduce show cs7 instance asp-remaddr .. vty: Introduce show cs7 instance asp-remaddr Depends: libosmocore.git Change-Id I3e1c84526b006baff435bbbca49dc6cf7d201cf5 Depends: libosmo-netif.git Change-Id I78a0bd8279a04f4011c7273e0f542981308e482f Related: SYS#6636 Change-Id: Ie5ac1d0ee74d2b977b1f5319cd88566df7994fd0 --- M TODO-RELEASE M src/osmo_ss7_vty.c M tests/vty/ss7_asp_test.vty 3 files changed, 203 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/81/35281/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index c7771bd..1913dc6 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -10,3 +10,5 @@ libosmocore >1.9.0 osmo_sock_multiaddr_{add,del}_local_addr() libosmo-netif >1.4.0 osmo_stream_{srv,cli}_get_fd() libosmocore >1.9.0 osmo_sock_multiaddr_get_ip_and_port(), osmo_multiaddr_ip_and_port_snprintf() +libosmocore >1.9.0 osmo_sock_sctp_get_peer_addr_info() +libosmo-netif >1.4.0osmo_sctp_spinfo_state_str() diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 39329b8..878e8dd 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -47,6 +47,11 @@ #include "sccp_internal.h" #include "ss7_internal.h" +#ifdef HAVE_LIBSCTP +#include +#include +#endif + #define XUA_VAR_STR"(sua|m3ua|ipa)" #define XUA_VAR_HELP_STR \ @@ -1244,6 +1249,178 @@ return show_asp(vty, id, asp_name); } +#include +/* netinet/tcp.h */ +static const struct value_string tcp_info_state_values[] = { + { TCP_ESTABLISHED, "ESTABLISHED" }, + { TCP_SYN_SENT, "SYN_SENT" }, + { TCP_SYN_RECV, "SYN_RECV" }, + { TCP_FIN_WAIT1,"FIN_WAIT1" }, + { TCP_FIN_WAIT2,"FIN_WAIT2" }, + { TCP_TIME_WAIT,"TIME_WAIT" }, + { TCP_CLOSE,"CLOSE" }, + { TCP_CLOSE_WAIT, "CLOSE_WAIT" }, + { TCP_LAST_ACK, "LAST_ACK" }, + { TCP_LISTEN, "LISTEN" }, + { TCP_CLOSING, "CLOSING" }, + {} +}; + +static void show_one_asp_remaddr_tcp(struct vty *vty, struct osmo_ss7_asp *asp) +{ + struct osmo_sockaddr osa = {}; + struct tcp_info tcpi = {}; + socklen_t len; + int fd, rc; + + fd = ss7_asp_get_fd(asp); + if (fd < 0) { + vty_out(vty, "%-12s %-46s uninitialized%s", asp->cfg.name, "", VTY_NEWLINE); + return; + } + + len = sizeof(osa.u.sas); + rc = getpeername(fd, , ); + + len = sizeof(tcpi); + rc = getsockopt(fd, SOL_TCP, TCP_INFO, , ); + if (rc < 0) { + char buf_err[128]; + strerror_r(errno, buf_err, sizeof(buf_err)); + vty_out(vty, "%-12s %-46s getsockopt(TCP_INFO) failed: %s%s", + asp->cfg.name, osmo_sockaddr_to_str(), buf_err, VTY_NEWLINE); + return; + } + + vty_out(vty, "%-12s %-46s TCP_%-19s %-8u %-8u %-8u %-8u%s", + asp->cfg.name, + osmo_sockaddr_to_str(), + get_value_string(tcp_info_state_values, tcpi.tcpi_state), + tcpi.tcpi_snd_cwnd, tcpi.tcpi_rtt, + tcpi.tcpi_rto, tcpi.tcpi_pmtu, + VTY_NEWLINE); +} + +#ifdef HAVE_LIBSCTP +static void show_one_asp_remaddr_sctp(struct vty *vty, struct osmo_ss7_asp *asp) +{ + struct sctp_paddrinfo pinfo[OSMO_SOCK_MAX_ADDRS]; + struct osmo_sockaddr osa = {}; + size_t pinfo_cnt = ARRAY_SIZE(pinfo); + bool more_needed; + int fd, rc; + unsigned int i; + + fd = ss7_asp_get_fd(asp); + if (fd < 0) { + vty_out(vty, "%-12s %-46s uninitialized%s", asp->cfg.name, "", VTY_NEWLINE); + return; + } + + rc = osmo_sock_sctp_get_peer_addr_info(fd, [0], _cnt); + if (rc < 0) { + char buf_err[128]; + strerror_r(errno, buf_err, sizeof(buf_err)); + vty_out(vty, "%-12s %-46s getsockopt(SCTP_GET_PEER_ADDR_INFO) failed: %s%s", asp->cfg.name, "", buf_err, VTY_NEWLINE); + return; + } + + more_needed = pinfo_cnt > ARRAY_SIZE(pinfo); + if (pinfo_cnt > ARRAY_SIZE(pinfo)) + pinfo_cnt = ARRAY_SIZE(pinfo); + + for (i = 0; i < pinfo_cnt; i++) { + osa.u.sas = pinfo[i].spinfo_address; + vty_out(vty, "%-12s %-46s SCTP_%-18s %-8u %-8u %-8u %-8u%s", + asp->cfg.name, + osmo_sockaddr_to_str(), + osmo_sctp_spinfo_state_str(pinfo[i].spinfo_state), + pinfo[i].spinfo_cwnd, pinfo[i].spinfo_srtt, + pinfo[i].spinfo_rto, pinfo[i].spinfo_mtu, + VTY_NEWLINE); + } + + if (more_needed) +
[M] Change in libosmo-sccp[master]: vty: show cs7 instance asp: Swap columns SCTP Role and Remote Address...
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35253?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: vty: show cs7 instance asp: Swap columns SCTP Role and Remote Address list .. vty: show cs7 instance asp: Swap columns SCTP Role and Remote Address list The Remote Address is by far the potentially largest column, as well as the one with more variable length, so move it to the end for better formatting. Change-Id: I4854219f8898266ae47b9117ef79dbad30a5b0fd --- M TODO-RELEASE M src/osmo_ss7_vty.c M tests/vty/ss7_asp_test.vty 3 files changed, 49 insertions(+), 37 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/53/35253/3 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35253?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I4854219f8898266ae47b9117ef79dbad30a5b0fd Gerrit-Change-Number: 35253 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin Gerrit-MessageType: newpatchset
[M] Change in libosmo-sccp[master]: vty: Introduce cmd 'show cs7 instance asp name ASP_NAME'
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35275?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: vty: Introduce cmd 'show cs7 instance asp name ASP_NAME' .. vty: Introduce cmd 'show cs7 instance asp name ASP_NAME' Allow printing only a specific asp by name. Useful when user is only interested in a uniqe ASP and there's lots of them configured. Related: SYS#6636 Change-Id: I08426272069ce5f3c8403b08dcaf686547bee336 --- M src/osmo_ss7_vty.c M tests/vty/ss7_asp_test.vty 2 files changed, 84 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/75/35275/3 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35275?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I08426272069ce5f3c8403b08dcaf686547bee336 Gerrit-Change-Number: 35275 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
[S] Change in libosmo-netif[master]: netif: sctp.h: Introduce value_string for enum sctp_spinfo_state
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35280?usp=email ) Change subject: netif: sctp.h: Introduce value_string for enum sctp_spinfo_state .. netif: sctp.h: Introduce value_string for enum sctp_spinfo_state This can be used by apps retrieving struct sctp_paddrinfo through getsockopt(SCTP_GET_PEER_ADDR_INFO). The relevant field is spinfo_state: osmo_sctp_spinfo_state_str(pinfo.spinfo_state); Related: SYS#6636 Change-Id: I78a0bd8279a04f4011c7273e0f542981308e482f --- M include/osmocom/netif/sctp.h M src/sctp.c 2 files changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/80/35280/1 diff --git a/include/osmocom/netif/sctp.h b/include/osmocom/netif/sctp.h index bb8acda..374cf6e 100644 --- a/include/osmocom/netif/sctp.h +++ b/include/osmocom/netif/sctp.h @@ -48,3 +48,8 @@ extern const struct value_string osmo_sctp_op_error_strs[]; static inline const char *osmo_sctp_op_error_str(enum osmo_sctp_op_error val) { return get_value_string(osmo_sctp_op_error_strs, val); } + +enum sctp_spinfo_state; +extern const struct value_string osmo_sctp_spinfo_state_strs[]; +static inline const char *osmo_sctp_spinfo_state_str(enum sctp_spinfo_state val) +{ return get_value_string(osmo_sctp_spinfo_state_strs, val); } diff --git a/src/sctp.c b/src/sctp.c index 7f4f54b..a81077e 100644 --- a/src/sctp.c +++ b/src/sctp.c @@ -69,3 +69,13 @@ { OSMO_SCTP_OP_ERR_PROTO_VERSION, "Protocol Violation" }, { 0, NULL } }; + +/* linux/sctp.h enum sctp_spinfo_state */ +const struct value_string osmo_sctp_spinfo_state_strs[] = { + { SCTP_INACTIVE,"INACTIVE" }, + { SCTP_POTENTIALLY_FAILED, "POTENTIALLY_FAILED" }, + { SCTP_ACTIVE, "ACTIVE" }, + { SCTP_UNCONFIRMED, "UNCONFIRMED" }, + { SCTP_UNKNOWN, "UNKNOWN" }, + {} +}; -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35280?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I78a0bd8279a04f4011c7273e0f542981308e482f Gerrit-Change-Number: 35280 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
[M] Change in osmo-ci[master]: coverity: add job to check for failed uploads
Attention is currently required from: fixeria, osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35267?usp=email ) Change subject: coverity: add job to check for failed uploads .. Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35267?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ideabcb30f9f8f365acff2de7751eb74a2762a7a6 Gerrit-Change-Number: 35267 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Attention: osmith Gerrit-Attention: fixeria Gerrit-Comment-Date: Fri, 08 Dec 2023 14:28:46 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[L] Change in pysim[master]: move {enc,dec}_addr_tlv functions from pySim.util to pySim.legacy.util
Attention is currently required from: laforge. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/35279?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: move {enc,dec}_addr_tlv functions from pySim.util to pySim.legacy.util .. move {enc,dec}_addr_tlv functions from pySim.util to pySim.legacy.util In the previous commit we've stopped using those functions from modern pySim-shell code. Hence, the only remaining user is the legacy tools, so we can move the code to the legacy module. Change-Id: I6f18ccb36fc33bc204c01f9ece135676510e67ec --- M pySim/legacy/cards.py M pySim/legacy/utils.py M pySim/utils.py 3 files changed, 135 insertions(+), 123 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/79/35279/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35279?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I6f18ccb36fc33bc204c01f9ece135676510e67ec Gerrit-Change-Number: 35279 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: laforge Gerrit-MessageType: newpatchset
[S] Change in pysim[master]: usim: Properly decode/encode IPv4 + IPv6 addresses
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35277?usp=email ) Change subject: usim: Properly decode/encode IPv4 + IPv6 addresses .. usim: Properly decode/encode IPv4 + IPv6 addresses use normal textual representation for IPv4 and IPv6 addresses Change-Id: I2c6c377f4502af37639e555826c85d5dcf602f9b --- M pySim/construct.py M pySim/ts_31_102.py 2 files changed, 42 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/77/35277/1 diff --git a/pySim/construct.py b/pySim/construct.py index af96b49..31caf0e 100644 --- a/pySim/construct.py +++ b/pySim/construct.py @@ -7,6 +7,7 @@ from pySim.utils import b2h, h2b, swap_nibbles import gsm0338 import codecs +import ipaddress """Utility code related to the integration of the 'construct' declarative parser.""" @@ -138,6 +139,32 @@ def _encode(self, obj, context, path): return obj.encode(self.codec, self.err) +class Ipv4Adapter(Adapter): +""" +Encoder converts from 4 bytes to string representation (A.B.C.D). +Decoder converts from string representation (A.B.C.D) to four bytes. +""" +def _decode(self, obj, context, path): +ia = ipaddress.IPv4Address(obj) +return ia.compressed + +def _encode(self, obj, context, path): +ia = ipaddress.IPv4Address(obj) +return ia.packed + +class Ipv6Adapter(Adapter): +""" +Encoder converts from 16 bytes to string representation. +Decoder converts from string representation to 16 bytes. +""" +def _decode(self, obj, context, path): +ia = ipaddress.IPv6Address(obj) +return ia.compressed + +def _encode(self, obj, context, path): +ia = ipaddress.IPv6Address(obj) +return ia.packed + def filter_dict(d, exclude_prefix='_'): """filter the input dict to ensure no keys starting with 'exclude_prefix' remain.""" diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py index 74a2c4c..87bd8c7 100644 --- a/pySim/ts_31_102.py +++ b/pySim/ts_31_102.py @@ -875,14 +875,15 @@ class EF_ePDGId(TransparentEF): _test_de_encode = [ ( '801100657064672e6f736d6f636f6d2e6f7267', {'e_pdg_id': {"type_of_ePDG_address": "FQDN", "ePDG_address" : "epdg.osmocom.org" } } ), -( '800501c0a8a001', {'e_pdg_id': {"type_of_ePDG_address": "IPv4", "ePDG_address" : "c0a8a001" } } ), +( '800501c0a8a001', {'e_pdg_id': {"type_of_ePDG_address": "IPv4", "ePDG_address" : "192.168.160.1" } } ), +( '80110220010db80023', {'e_pdg_id': {"type_of_ePDG_address": "IPv6", "ePDG_address" : "2001:db8::23" } } ), ] class ePDGId(BER_TLV_IE, tag=0x80): _construct = Struct('type_of_ePDG_address'/Enum(Byte, FQDN=0, IPv4=1, IPv6=2), 'ePDG_address'/Switch(this.type_of_ePDG_address, {'FQDN': Utf8Adapter(GreedyBytes), - 'IPv4': HexAdapter(GreedyBytes), - 'IPv6': HexAdapter(GreedyBytes)})) + 'IPv4': Ipv4Adapter(GreedyBytes), + 'IPv6': Ipv6Adapter(GreedyBytes)})) def __init__(self, fid='6ff3', sfid=None, name='EF.ePDGId', desc='Home ePDG Identifier', **kwargs): super().__init__(fid, sfid=sfid, name=name, desc=desc, **kwargs) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35277?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I2c6c377f4502af37639e555826c85d5dcf602f9b Gerrit-Change-Number: 35277 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange
[M] Change in pysim[master]: move {enc,dec}_addr_tlv functions from pySim.util to pySim.legacy.util
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35279?usp=email ) Change subject: move {enc,dec}_addr_tlv functions from pySim.util to pySim.legacy.util .. move {enc,dec}_addr_tlv functions from pySim.util to pySim.legacy.util In the previous commit we've stopped using those functions from modern pySim-shell code. Hence, the only remaining user is the legacy tools, so we can move the code to the legacy module. Change-Id: I6f18ccb36fc33bc204c01f9ece135676510e67ec --- M pySim/legacy/cards.py M pySim/legacy/utils.py M pySim/utils.py 3 files changed, 93 insertions(+), 81 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/79/35279/1 diff --git a/pySim/legacy/cards.py b/pySim/legacy/cards.py index 496ce78..9d1e2c1 100644 --- a/pySim/legacy/cards.py +++ b/pySim/legacy/cards.py @@ -8,11 +8,10 @@ from pySim.cards import SimCardBase, UiccCardBase from pySim.utils import dec_iccid, enc_iccid, dec_imsi, enc_imsi, dec_msisdn, enc_msisdn -from pySim.utils import dec_addr_tlv, enc_addr_tlv from pySim.utils import enc_plmn, get_addr_type from pySim.utils import is_hex, h2b, b2h, h2s, s2h, lpad, rpad from pySim.legacy.utils import enc_ePDGSelection, format_xplmn_w_act, format_xplmn, dec_st, enc_st -from pySim.legacy.utils import format_ePDGSelection +from pySim.legacy.utils import format_ePDGSelection, dec_addr_tlv, enc_addr_tlv from pySim.legacy.ts_51_011 import EF, DF from pySim.legacy.ts_31_102 import EF_USIM_ADF_map from pySim.legacy.ts_31_103 import EF_ISIM_ADF_map diff --git a/pySim/legacy/utils.py b/pySim/legacy/utils.py index 1b6b5d1..d79253b 100644 --- a/pySim/legacy/utils.py +++ b/pySim/legacy/utils.py @@ -210,3 +210,82 @@ res['epdg_priority'] = epdg_priority_str res['epdg_fqdn_format'] = epdg_fqdn_format_str == '00' and 'Operator Identifier FQDN' or 'Location based FQDN' return res + + +def dec_addr_tlv(hexstr): +""" +Decode hex string to get EF.P-CSCF Address or EF.ePDGId or EF.ePDGIdEm. +See 3GPP TS 31.102 version 13.4.0 Release 13, section 4.2.8, 4.2.102 and 4.2.104. +""" + +# Convert from hex str to int bytes list +addr_tlv_bytes = h2i(hexstr) + +# Get list of tuples containing parsed TLVs +tlvs = TLV_parser(addr_tlv_bytes) + +for tlv in tlvs: +# tlv = (T, L, [V]) +# T = Tag +# L = Length +# [V] = List of value + +# Invalid Tag value scenario +if tlv[0] != 0x80: +continue + +# Empty field - Zero length +if tlv[1] == 0: +continue + +# Uninitialized field +if all([v == 0xff for v in tlv[2]]): +continue + +# First byte in the value has the address type +addr_type = tlv[2][0] +# TODO: Support parsing of IPv6 +# Address Type: 0x00 (FQDN), 0x01 (IPv4), 0x02 (IPv6), other (Reserved) +if addr_type == 0x00: # FQDN +# Skip address tye byte i.e. first byte in value list +content = tlv[2][1:] +return (i2s(content), '00') + +elif addr_type == 0x01: # IPv4 +# Skip address tye byte i.e. first byte in value list +# Skip the unused byte in Octect 4 after address type byte as per 3GPP TS 31.102 +ipv4 = tlv[2][2:] +content = '.'.join(str(x) for x in ipv4) +return (content, '01') +else: +raise ValueError("Invalid address type") + +return (None, None) + + +def enc_addr_tlv(addr, addr_type='00'): +""" +Encode address TLV object used in EF.P-CSCF Address, EF.ePDGId and EF.ePDGIdEm. +See 3GPP TS 31.102 version 13.4.0 Release 13, section 4.2.8, 4.2.102 and 4.2.104. + +Default values: + - addr_type: 00 - FQDN format of Address +""" + +s = "" + +# TODO: Encoding of IPv6 address +if addr_type == '00': # FQDN +hex_str = s2h(addr) +s += '80' + ('%02x' % ((len(hex_str)//2)+1)) + '00' + hex_str +elif addr_type == '01': # IPv4 +ipv4_list = addr.split('.') +ipv4_str = "" +for i in ipv4_list: +ipv4_str += ('%02x' % (int(i))) + +# Unused bytes shall be set to 'ff'. i.e 4th Octet after Address Type is not used +# IPv4 Address is in octet 5 to octet 8 of the TLV data object +s += '80' + ('%02x' % ((len(ipv4_str)//2)+2)) + '01' + 'ff' + ipv4_str + +return s diff --git a/pySim/utils.py b/pySim/utils.py index 44800fb..3b9731d 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -751,85 +751,6 @@ return ret -def dec_addr_tlv(hexstr): -""" -Decode hex string to get EF.P-CSCF Address or EF.ePDGId or EF.ePDGIdEm. -See 3GPP TS 31.102 version 13.4.0 Release 13, section 4.2.8, 4.2.102 and 4.2.104. -""" - -# Convert from hex str to int bytes list -addr_tlv_bytes = h2i(hexstr) - -# Get list of tuples containing
[S] Change in pysim[master]: isim: Replace legacy imperative address TLV encoder/decoder with cons...
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35278?usp=email ) Change subject: isim: Replace legacy imperative address TLV encoder/decoder with construct .. isim: Replace legacy imperative address TLV encoder/decoder with construct We've recently introduced IPv{4,6}Adapter construct classes and can switch to this instead of using the old imperative encoder/decoder functions {enc,dec}_addr_tlv(). Aside from code cleanup, this also means we now support the IPv6 address type in EF.PCSCF. Change-Id: I4d01ccfe473a8a80fbee33fdcbd8a19b39da85ac --- M pySim/ts_31_103.py 1 file changed, 25 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/78/35278/1 diff --git a/pySim/ts_31_103.py b/pySim/ts_31_103.py index 5268c70..a4a7656 100644 --- a/pySim/ts_31_103.py +++ b/pySim/ts_31_103.py @@ -135,19 +135,18 @@ class EF_PCSCF(LinFixedEF): _test_de_encode = [ ( '802c0070637363662e696d732e6d6e633030302e6d63633733382e7075622e336770706e6574776f726b2e6f7267', - { "addr": "pcscf.ims.mnc000.mcc738.pub.3gppnetwork.org", "addr_type": "00" } ), + {'pcscf_address': { "address": "pcscf.ims.mnc000.mcc738.pub.3gppnetwork.org", "type_of_address": "FQDN" } } ), ] +class PcscfAddress(BER_TLV_IE, tag=0x80): +_construct = Struct('type_of_address'/Enum(Byte, FQDN=0, IPv4=1, IPv6=2), +'address'/Switch(this.type_of_address, + {'FQDN': Utf8Adapter(GreedyBytes), + 'IPv4': Ipv4Adapter(GreedyBytes), + 'IPv6': Ipv6Adapter(GreedyBytes)})) + def __init__(self, fid='6f09', sfid=None, name='EF.P-CSCF', desc='P-CSCF Address', **kwargs): super().__init__(fid=fid, sfid=sfid, name=name, desc=desc, **kwargs) - -def _decode_record_hex(self, raw_hex, **kwargs): -addr, addr_type = dec_addr_tlv(raw_hex) -return {"addr": addr, "addr_type": addr_type} - -def _encode_record_hex(self, json_in, **kwargs): -addr = json_in['addr'] -addr_type = json_in['addr_type'] -return enc_addr_tlv(addr, addr_type) +self._tlv = EF_PCSCF.PcscfAddress # TS 31.103 Section 4.2.9 class EF_GBABP(TransparentEF): -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35278?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I4d01ccfe473a8a80fbee33fdcbd8a19b39da85ac Gerrit-Change-Number: 35278 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange
[M] Change in libosmocore[master]: socket: Introduce API osmo_sock_sctp_get_peer_addr_info()
Attention is currently required from: laforge, pespin. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/35276?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: socket: Introduce API osmo_sock_sctp_get_peer_addr_info() .. socket: Introduce API osmo_sock_sctp_get_peer_addr_info() This is a convenience helper to reetrieve the whole set of remote addresses and call getsockopt() on them, making it easy for users to analyse the full set of remote addresses of a socket simply providing an fd. Related: SYS#6636 Change-Id: I3e1c84526b006baff435bbbca49dc6cf7d201cf5 --- M TODO-RELEASE M include/osmocom/core/socket.h M src/core/libosmocore.map M src/core/socket.c 4 files changed, 97 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/76/35276/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35276?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3e1c84526b006baff435bbbca49dc6cf7d201cf5 Gerrit-Change-Number: 35276 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: laforge Gerrit-Attention: pespin Gerrit-MessageType: newpatchset
[M] Change in libosmocore[master]: socket: Introduce API osmo_sock_sctp_get_peer_addr_info()
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35276?usp=email ) Change subject: socket: Introduce API osmo_sock_sctp_get_peer_addr_info() .. socket: Introduce API osmo_sock_sctp_get_peer_addr_info() This is a convenience helper to reetrieve the whole set of remote addresses and call getsockopt() on them, making it easy for users to analyse the full set of remote addresses of a socket simply providing an fd. Related: SYS#6636 Change-Id: I3e1c84526b006baff435bbbca49dc6cf7d201cf5 --- M TODO-RELEASE M include/osmocom/core/socket.h M src/core/socket.c 3 files changed, 121 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/76/35276/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 316c0ec..9f5240f 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -9,6 +9,7 @@ #library whatdescription / commit summary line core ADD osmo_sock_multiaddr_{add,del}_local_addr() core ADD osmo_sock_multiaddr_get_ip_and_port(), osmo_multiaddr_ip_and_port_snprintf(), osmo_sock_multiaddr_get_name_buf() +core ADD osmo_sock_sctp_get_peer_addr_info() core ADD gsmtap_inst_fd2() core, DEPRECATE gsmtap_inst_fd() isdn ABI change add states and flags for external T200 handling gsmABI change add T200 timer states to lapdm_datalink diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h index dd14556..cd9547a 100644 --- a/include/osmocom/core/socket.h +++ b/include/osmocom/core/socket.h @@ -211,5 +211,7 @@ int osmo_sock_set_dscp(int fd, uint8_t dscp); int osmo_sock_set_priority(int fd, int prio); +int osmo_sock_sctp_get_peer_addr_info(int fd, struct sctp_paddrinfo *pinfo, size_t *pinfo_cnt); + #endif /* (!EMBEDDED) */ /*! @} */ diff --git a/src/core/socket.c b/src/core/socket.c index c600732..70b1885 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -2653,6 +2653,109 @@ return setsockopt(fd, SOL_SOCKET, SO_PRIORITY, , sizeof(prio)); } +/*! Get multiple IP addresses and/or port number on socket in separate string buffers + * \param[in] fd file descriptor of socket. + * \param[out] ip_proto IPPROTO of the socket, eg: IPPROTO_SCTP. + * \param[out] ip Pointer to memory holding consecutive buffers of size ip_len. + * \param[out] ip_cnt length ip array pointer. on return it contains the number of addresses found. + * \param[in] ip_len length of each of the string buffer in the the ip array. + * \param[out] port number (will be filled in when not NULL). + * \param[in] port_len length of the port buffer. + * \param[in] local (true) or remote (false) name will get looked at. + * \returns 0 on success; negative otherwise. + * + * Upon return, ip_cnt can be set to a higher value than the one set by the + * caller. This can be used by the caller to find out the required array length + * and then obtaining by calling the function twice. Only up to ip_cnt addresses + * are filed in, as per the value provided by the caller. + * + * Usage example retrieving all (up to OSMO_SOCK_MAX_ADDRS, 32) bound IP addresses and bound port: + * char hostbuf[OSMO_SOCK_MAX_ADDRS][INET6_ADDRSTRLEN]; + * size_t num_hostbuf = ARRAY_SIZE(hostbuf); + * char portbuf[6]; + * rc = osmo_sock_multiaddr_get_ip_and_port(fd, IPPROTO_SCTP, [0][0], _hostbuf, + * sizeof(hostbuf[0]), portbuf, sizeof(portbuf), true); + * if (rc < 0) + * goto error; + * if (num_hostbuf > ARRAY_SIZE(hostbuf)) + * goto not_enough_buffers; + */ + +/*! Fill in array of struct sctp_paddrinfo with each of the remote addresses of an SCTP socket + * \param[in] fd file descriptor of SCTP socket + * \param[out] pinfo Pointer to memory holding an array of struct sctp_paddrinfo (pinfo_cnt length). + * \param[out] pinfo_cnt length of pinfo array (in elements). On return it contains the number of addresses found. + * \returns 0 on success; negative otherwise + * + * Upon return, pinfo_cnt can be set to a higher value than the one set by the + * caller. This can be used by the caller to find out the required array length + * and then obtaining by calling the function twice. Only up to pinfo_cnt addresses + * are filled in, as per the value provided by the caller. + * + * Usage example retrieving struct sctp_paddringo for all (up to OSMO_SOCK_MAX_ADDRS, 32) remote IP addresses: + * struct sctp_paddrinfo pinfo[OSMO_SOCK_MAX_ADDRS]; + * size_t pinfo_cnt = ARRAY_SIZE(pinfo); + * rc = osmo_sock_sctp_get_peer_addr_info(fd, [0], _hostbuf, pinfo_cnt); + * if (rc < 0) + * goto error; + * if (pinfo_cnt > ARRAY_SIZE(hostbuf)) + * goto not_enough_buffers; + */ +int osmo_sock_sctp_get_peer_addr_info(int fd, struct sctp_paddrinfo *pinfo, size_t *pinfo_cnt) +{ + struct sockaddr *addrs = NULL; + unsigned int n_addrs, i; +
[M] Change in osmo-ci[master]: coverity: add job to check for failed uploads
Attention is currently required from: fixeria, pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35267?usp=email ) Change subject: coverity: add job to check for failed uploads .. Patch Set 3: (1 comment) File coverity/badge_status.sh: https://gerrit.osmocom.org/c/osmo-ci/+/35267/comment/1d4f10db_0ab91880 PS2, Line 11: wget --no-verbose -O "$BADGE" "https://scan.coverity.com/projects/7523/badge.svg; > some small documentation on how this script accomplished its aim (downloading > an svg image containg […] Done. also updated the script to check for "passed" now that I know how the svg looks like when it did not fail :) -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35267?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ideabcb30f9f8f365acff2de7751eb74a2762a7a6 Gerrit-Change-Number: 35267 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-CC: pespin Gerrit-Attention: pespin Gerrit-Attention: fixeria Gerrit-Comment-Date: Fri, 08 Dec 2023 13:54:34 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment
[M] Change in osmo-ci[master]: coverity: add job to check for failed uploads
Attention is currently required from: fixeria, osmith. Hello Jenkins Builder, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ci/+/35267?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Code-Review+1 by fixeria, Verified+1 by Jenkins Builder Change subject: coverity: add job to check for failed uploads .. coverity: add job to check for failed uploads Related: SYS#6685 Change-Id: Ideabcb30f9f8f365acff2de7751eb74a2762a7a6 --- A coverity/badge_status.sh M jobs/README.adoc A jobs/coverity-status.yml 3 files changed, 85 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/67/35267/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35267?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ideabcb30f9f8f365acff2de7751eb74a2762a7a6 Gerrit-Change-Number: 35267 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-CC: pespin Gerrit-Attention: osmith Gerrit-Attention: fixeria Gerrit-MessageType: newpatchset
[M] Change in libosmo-sccp[master]: vty: show cs7 instance asp: Allow printing only a specific asp by name
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35275?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: vty: show cs7 instance asp: Allow printing only a specific asp by name .. vty: show cs7 instance asp: Allow printing only a specific asp by name Change-Id: I08426272069ce5f3c8403b08dcaf686547bee336 --- M src/osmo_ss7_vty.c M tests/vty/ss7_asp_test.vty 2 files changed, 60 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/75/35275/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35275?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I08426272069ce5f3c8403b08dcaf686547bee336 Gerrit-Change-Number: 35275 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
[M] Change in libosmo-sccp[master]: vty: show cs7 instance asp: Print loc and rem addr retrieved from socket
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35274?usp=email ) Change subject: vty: show cs7 instance asp: Print loc and rem addr retrieved from socket .. vty: show cs7 instance asp: Print loc and rem addr retrieved from socket Until now, we were in general printing the list of remote addresses that were stored in config, because we didn't have an easy way to retrieve the addresses from the socket. Since recently some libosmocore APIs make that easy, so use them now. If the socket is not yet created, then log the addrress list from the config. Furthermore, take the chance to print now both local and remote addresses. Related: SYS#6636 Change-Id: I607e4c2dd37f07bf1c07c88681918184e92202ea --- M src/osmo_ss7_asp.c M src/osmo_ss7_vty.c M src/ss7_internal.h M tests/vty/ss7_asp_test.vty 4 files changed, 104 insertions(+), 46 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/74/35274/1 diff --git a/src/osmo_ss7_asp.c b/src/osmo_ss7_asp.c index 55e5a29..f867ce5 100644 --- a/src/osmo_ss7_asp.c +++ b/src/osmo_ss7_asp.c @@ -1134,3 +1134,19 @@ { return asp->cfg.proto; } + +/*! \brief Get the fd of a given ASP + * \param[in] asp The ASP for which the fd is requested + * \returns The fd of the ASP if acailable, negative otherwise + */ +int ss7_asp_get_fd(const struct osmo_ss7_asp *asp) +{ + if (asp->cfg.is_server) { + if (asp->server) + return osmo_stream_srv_get_fd(asp->server); + } else { + if (asp->client) + return osmo_stream_cli_get_fd(asp->client); + } + return -1; +} diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 35f0dda..91a1eb7 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -1133,13 +1133,39 @@ return buf; } +/* Similar to osmo_sock_multiaddr_get_name_buf(), but aimed at listening sockets (only local part): */ +static char *get_sockname_buf(char *buf, size_t buf_len, int fd, int proto, bool local) +{ + char hostbuf[OSMO_SOCK_MAX_ADDRS][INET6_ADDRSTRLEN]; + size_t num_hostbuf = ARRAY_SIZE(hostbuf); + char portbuf[6]; + struct osmo_strbuf sb = { .buf = buf, .len = buf_len }; + bool need_more_bufs; + int rc; + + rc = osmo_sock_multiaddr_get_ip_and_port(fd, proto, [0][0], +_hostbuf, sizeof(hostbuf[0]), +portbuf, sizeof(portbuf), local); + if (rc < 0) + return NULL; + + need_more_bufs = num_hostbuf > ARRAY_SIZE(hostbuf); + if (need_more_bufs) + num_hostbuf = ARRAY_SIZE(hostbuf); + OSMO_STRBUF_APPEND(sb, osmo_multiaddr_ip_and_port_snprintf, + [0][0], num_hostbuf, sizeof(hostbuf[0]), portbuf); + if (need_more_bufs) + OSMO_STRBUF_PRINTF(sb, ""); + + return buf; +} + DEFUN(show_cs7_asp, show_cs7_asp_cmd, "show cs7 instance <0-15> asp", SHOW_STR CS7_STR INST_STR INST_STR "Application Server Process (ASP)\n") { struct osmo_ss7_instance *inst; struct osmo_ss7_asp *asp; - char buf[512]; char as_buf[64]; int id = atoi(argv[0]); @@ -1149,28 +1175,32 @@ return CMD_WARNING; } - vty_out(vty, " Current Primary Link%s", VTY_NEWLINE); - vty_out(vty, "ASP Name AS Name State Type Role SCTP Role Remote Addresses%s", VTY_NEWLINE); - vty_out(vty, " - - ---%s", VTY_NEWLINE); + vty_out(vty, "ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses%s", VTY_NEWLINE); + vty_out(vty, " - - --- ---%s", VTY_NEWLINE); llist_for_each_entry(asp, >asp_list, list) { - if (asp->cfg.proto == OSMO_SS7_ASP_PROT_IPA && asp->cfg.remote.port == 0 && asp->server) { - int fd = osmo_stream_srv_get_fd(asp->server); - char hostbuf[64]; - char portbuf[16]; - osmo_sock_get_ip_and_port(fd, hostbuf, sizeof(hostbuf), - portbuf, sizeof(portbuf), false); - snprintf(buf, sizeof(buf), "%s:%s", hostbuf, portbuf); - } else - osmo_ss7_asp_peer_snprintf(buf, sizeof(buf), >cfg.remote); - vty_out(vty, "%-12s %-12s %-13s %-4s %-4s %-9s %-23s%s", + char buf_loc[OSMO_SOCK_MAX_ADDRS * INET6_ADDRSTRLEN + OSMO_SOCK_MAX_ADDRS + 2 + 6 + 1]; + char
[M] Change in libosmo-sccp[master]: vty: show cs7 instance asp: Allow printing only a specific asp by name
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35275?usp=email ) Change subject: vty: show cs7 instance asp: Allow printing only a specific asp by name .. vty: show cs7 instance asp: Allow printing only a specific asp by name Change-Id: I08426272069ce5f3c8403b08dcaf686547bee336 --- M src/osmo_ss7_vty.c M tests/vty/ss7_asp_test.vty 2 files changed, 60 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/75/35275/1 diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 91a1eb7..94f3498 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -1160,14 +1160,45 @@ return buf; } +static void show_one_asp(struct vty *vty, struct osmo_ss7_asp *asp) +{ + char as_buf[64]; + char buf_loc[OSMO_SOCK_MAX_ADDRS * INET6_ADDRSTRLEN + OSMO_SOCK_MAX_ADDRS + 2 + 6 + 1]; + char buf_rem[sizeof(buf_loc)]; + + int fd = ss7_asp_get_fd(asp); + if (fd > 0) { + int proto = ss7_asp_proto_to_ip_proto(asp->cfg.proto); + if (!get_sockname_buf(buf_loc, sizeof(buf_loc), fd, proto, true)) + OSMO_STRLCPY_ARRAY(buf_loc, ""); + if (!get_sockname_buf(buf_rem, sizeof(buf_rem), fd, proto, false)) + OSMO_STRLCPY_ARRAY(buf_rem, ""); + } else { + osmo_ss7_asp_peer_snprintf(buf_loc, sizeof(buf_loc), >cfg.local); + osmo_ss7_asp_peer_snprintf(buf_rem, sizeof(buf_rem), >cfg.remote); + } + + vty_out(vty, "%-12s %-12s %-13s %-4s %-4s %-9s %-23s %-23s%s", + asp->cfg.name, + as_list_for_asp(asp, as_buf, sizeof(as_buf)), + asp->fi ? osmo_fsm_inst_state_name(asp->fi) : "uninitialized", + get_value_string(osmo_ss7_asp_protocol_vals, asp->cfg.proto), + osmo_str_tolower(get_value_string(osmo_ss7_asp_role_names, asp->cfg.role)), + asp->cfg.is_server ? "server" : "client", + buf_loc, buf_rem, + VTY_NEWLINE); +} + DEFUN(show_cs7_asp, show_cs7_asp_cmd, - "show cs7 instance <0-15> asp", - SHOW_STR CS7_STR INST_STR INST_STR "Application Server Process (ASP)\n") + "show cs7 instance <0-15> asp [ASP_NAME]", + SHOW_STR CS7_STR INST_STR INST_STR + "Application Server Process (ASP)\n" + "Name of the Application Server Process (ASP)") { struct osmo_ss7_instance *inst; - struct osmo_ss7_asp *asp; - char as_buf[64]; + struct osmo_ss7_asp *asp = NULL; int id = atoi(argv[0]); + const char *asp_name = argc >= 2 ? argv[1] : NULL; inst = osmo_ss7_instance_find(id); if (!inst) { @@ -1175,34 +1206,24 @@ return CMD_WARNING; } + if (asp_name) { + asp = osmo_ss7_asp_find_by_name(inst, asp_name); + if (!asp) { + vty_out(vty, "No ASP %s found%s", asp_name, VTY_NEWLINE); + return CMD_WARNING; + } + } + vty_out(vty, "ASP Name AS Name State Type Role SCTP Role Local Addresses Remote Addresses%s", VTY_NEWLINE); vty_out(vty, " - - --- ---%s", VTY_NEWLINE); - llist_for_each_entry(asp, >asp_list, list) { - char buf_loc[OSMO_SOCK_MAX_ADDRS * INET6_ADDRSTRLEN + OSMO_SOCK_MAX_ADDRS + 2 + 6 + 1]; - char buf_rem[sizeof(buf_loc)]; - int fd = ss7_asp_get_fd(asp); - if (fd > 0) { - int proto = ss7_asp_proto_to_ip_proto(asp->cfg.proto); - if (!get_sockname_buf(buf_loc, sizeof(buf_loc), fd, proto, true)) - OSMO_STRLCPY_ARRAY(buf_loc, ""); - if (!get_sockname_buf(buf_rem, sizeof(buf_rem), fd, proto, false)) - OSMO_STRLCPY_ARRAY(buf_rem, ""); - } else { - osmo_ss7_asp_peer_snprintf(buf_loc, sizeof(buf_loc), >cfg.local); - osmo_ss7_asp_peer_snprintf(buf_rem, sizeof(buf_rem), >cfg.remote); - } - - vty_out(vty, "%-12s %-12s %-13s %-4s %-4s %-9s %-23s %-23s%s", - asp->cfg.name, - as_list_for_asp(asp, as_buf, sizeof(as_buf)), - asp->fi? osmo_fsm_inst_state_name(asp->fi) : "uninitialized", - get_value_string(osmo_ss7_asp_protocol_vals, asp->cfg.proto), - osmo_str_tolower(get_value_string(osmo_ss7_asp_role_names, asp->cfg.role)), - asp->cfg.is_server ? "server" : "client", - buf_loc, buf_rem, - VTY_NEWLINE); + if (asp) {
[S] Change in osmo-ci[master]: coverity: readlink /opt/coverity/current
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35269?usp=email ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: coverity: readlink /opt/coverity/current .. coverity: readlink /opt/coverity/current Show where the symlink points at the start of the job, so we can see which coverity version is currently installed. Related: SYS#6685 Change-Id: If4a7c71759a6eb436eb47024565f169c6134e2e2 --- M coverity/jenkins.sh 1 file changed, 15 insertions(+), 0 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved osmith: Verified diff --git a/coverity/jenkins.sh b/coverity/jenkins.sh index dfe3067..b33ae86 100755 --- a/coverity/jenkins.sh +++ b/coverity/jenkins.sh @@ -3,6 +3,8 @@ set -e -x +readlink /opt/coverity/current + export PATH=$PATH:/opt/coverity/current/bin base_dir="$HOME/osmo-ci/coverity" -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35269?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: If4a7c71759a6eb436eb47024565f169c6134e2e2 Gerrit-Change-Number: 35269 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged
[S] Change in osmo-ci[master]: coverity: readlink /opt/coverity/current
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35269?usp=email ) Change subject: coverity: readlink /opt/coverity/current .. Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35269?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: If4a7c71759a6eb436eb47024565f169c6134e2e2 Gerrit-Change-Number: 35269 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Dec 2023 13:40:21 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-ci[master]: ansible: fix updating /opt/coverity/current
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35268?usp=email ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: ansible: fix updating /opt/coverity/current .. ansible: fix updating /opt/coverity/current Remove the previous /opt/coverity/current symlink, before creating the new one. Otherwise the new symlink would be created inside "current" pointing at the old version, instead of replacing "current" with the new symlink. # ln -svf /opt/coverity/2023.6.2/* /opt/coverity/current '/opt/coverity/current/cov-analysis-linux64-2023.6.2' -> '/opt/coverity/2023.6.2/cov-analysis-linux64-2023.6.2' # readlink /opt/covervity/current /opt/coverity/2022.06/cov-analysis-linux64-2022.6.0 Add the verbosity flag to the command while at it. (The glob is unrelated, why it is needed is described in I2b96d1e47f2697706a042937b2852f0fc5032a7b) Related: SYS#6685 Change-Id: I4ecb4997829b3cc61c839d089bda44f821ca8b85 --- M ansible/roles/install-coverity/tasks/main.yml 1 file changed, 26 insertions(+), 1 deletion(-) Approvals: fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve osmith: Verified diff --git a/ansible/roles/install-coverity/tasks/main.yml b/ansible/roles/install-coverity/tasks/main.yml index 246fa36..ca4a24c 100644 --- a/ansible/roles/install-coverity/tasks/main.yml +++ b/ansible/roles/install-coverity/tasks/main.yml @@ -37,7 +37,7 @@ when: coverity_copy.failed == False - name: create link /opt/coverity/current - shell: ln -sf /opt/coverity/{{ coverity_version }}/* /opt/coverity/current + shell: rm -vf /opt/coverity/current && ln -svf /opt/coverity/{{ coverity_version }}/* /opt/coverity/current args: warn: false when: coverity_copy.failed == False -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35268?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I4ecb4997829b3cc61c839d089bda44f821ca8b85 Gerrit-Change-Number: 35268 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged
[S] Change in osmo-ci[master]: ansible: fix updating /opt/coverity/current
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35268?usp=email ) Change subject: ansible: fix updating /opt/coverity/current .. Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35268?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I4ecb4997829b3cc61c839d089bda44f821ca8b85 Gerrit-Change-Number: 35268 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Dec 2023 13:40:10 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-ci[master]: README: document how to upgrade coverity
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35265?usp=email ) Change subject: README: document how to upgrade coverity .. README: document how to upgrade coverity Change-Id: I551df9f36112f34cf76d0247f1ebc1e58ae0a896 --- M README.md 1 file changed, 29 insertions(+), 5 deletions(-) Approvals: pespin: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/README.md b/README.md index cfbda3a..f0a3dc9 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,26 @@ Scripts and files that did not fit into other directories. ## coverity -Scripts used to submit the osmocom sources for coverity scan. -This depends on these, which are not included in osmo-ci: -- a tokens.txt file in coverity/ -- see coverity/get_token.sh -- a cov-analysis-linux64-8.5.0 in coverity/ - (or the like, may need to adjust some scripts to match) +Scripts used to submit the osmocom sources for coverity scan. This depends on a +`tokens.txt`, see `coverity/get_token.sh`. + +### how to upgrade +* Download the latest version from [here](https://scan.coverity.com/download) +* Find the "upgrade considerations" [here](https://sig-product-docs.synopsys.com/bundle/coverity-docs/page/upgrade-guide/topics/important_upgrade_considerations.html) +* Place the resulting `cov-analysis-linux64-$VERSION.tar.gz` in `ansible/files` +* Adjust `coverity_version` in `ansible/roles/install-coverity/defaults/main.yml` +* Deploy the ansible playbook: +``` +$ cd ansible +$ ansible-playbook -v -i hosts setup-jenkins-slave.yml -l coverity_slaves -t coverity +``` +* On success, only one task should be skipped (the "Please download..." task): +``` +PLAY RECAP +build2-deb11build-ansible : ok=8changed=4unreachable=0failed=0 skipped=1rescued=0ignored=0 +build3-deb11build-ansible : ok=9changed=4unreachable=0failed=0 skipped=1rescued=0ignored=0 +build4-deb12build-ansible : ok=9changed=4unreachable=0failed=0 skipped=1rescued=0ignored=0 +``` ## jobs Jenkins Job Builder YAML files defining jenkins jobs. Read `jobs/README.adoc` -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35265?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I551df9f36112f34cf76d0247f1ebc1e58ae0a896 Gerrit-Change-Number: 35265 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged
[M] Change in osmo-ci[master]: README: update and convert to markdown
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35264?usp=email ) Change subject: README: update and convert to markdown .. README: update and convert to markdown * Describe all directories * Update the text slightly * Convert to markdown, so it shows up formatted at: https://gitea.osmocom.org/osmocom/osmo-ci Change-Id: I9735eb30cf7260d211d5ea4da83ad09d31c93593 --- D README.adoc A README.md 2 files changed, 62 insertions(+), 30 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/README.adoc b/README.adoc deleted file mode 100644 index 23d723b..000 --- a/README.adoc +++ /dev/null @@ -1,30 +0,0 @@ -Scripts used for the CI handling and coverity uploads - -coverity: scripts used to submit the osmocom sources for coverity scan. -This depends on these, which are not included in osmo-ci: -- a tokens.txt file in coverity/ -- see coverity/get_token.sh -- a cov-analysis-linux64-8.5.0 in coverity/ - (or the like, may need to adjust some scripts to match) - -jobs: Jenkins Job Builder YAML files defining jenkins jobs. Read jobs/README.adoc -for more information about deployment. - -scripts: used by jenkins jobs. Various osmo*/contrib/jenkins.sh scripts assume -osmo-ci to be checked out in the build slave user's home, i.e. using a PATH of -$HOME/osmo-ci/scripts. - -obs-patches: patches to build projects for various debian distributions, e.g. -a patch for limesuite that fixes the libwxgtk3.0-dev => libwxgtk3.0-gtk3-dev -rename in control/debian for debian10. Used by osmo_obs_distro_specific_patch() -in scripts/common-obs.sh. - -_docker_playground: Clone of docker-playground.git, so the scripts can build -required docker images. This dir gets created on demand by scripts/common.sh, -and automatically fetched and reset to "origin/master" (override with -$OSMO_BRANCH_DOCKER_PLAYGROUND). The fetch and reset gets skipped if -_docker_playground is a symlink. For development, set it up as follows: - - $ git clone https://gitea.osmocom.org/osmocom/docker-playground - $ git clone https://gitea.osmocom.org/osmocom/osmo-ci - $ cd osmo-ci - $ ln -s ../docker-playground _docker_playground diff --git a/README.md b/README.md new file mode 100644 index 000..cfbda3a --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +# Osmocom CI and infrastructure files + +## ansible +Ansible rules for setting up machines of the Osmocom infrastructure. +See `ansible/README.md`. + +## contrib +Scripts and files that did not fit into other directories. + +## coverity +Scripts used to submit the osmocom sources for coverity scan. +This depends on these, which are not included in osmo-ci: +- a tokens.txt file in coverity/ -- see coverity/get_token.sh +- a cov-analysis-linux64-8.5.0 in coverity/ + (or the like, may need to adjust some scripts to match) + +## jobs +Jenkins Job Builder YAML files defining jenkins jobs. Read `jobs/README.adoc` +for more information about deployment. + +## lint +The linter running on patches submitted via gerrit. See the wiki page +[Linting](https://osmocom.org/projects/cellular-infrastructure/wiki/Linting) +for more information. + +## qemu-kvm +A script to create a virtual machine with kernel gtp ggsn for qemu-kvm. + +## scripts +Scripts used by jenkins jobs. Various `osmo*/contrib/jenkins.sh` scripts assume +osmo-ci to be checked out in the build slave user's home, i.e. using a PATH of +`$HOME/osmo-ci/scripts`. + +## _docker_playground +A clone of +[docker-playground](https://gitea.osmocom.org/osmocom/docker-playground), +so the scripts can build required docker images. This dir gets created on +demand by scripts/common.sh, and automatically fetched and reset to +"origin/master" (override with `$OSMO_BRANCH_DOCKER_PLAYGROUND`). The fetch and +reset gets skipped if _docker_playground is a symlink. For development, set it +up as follows: + +``` +$ git clone https://gitea.osmocom.org/osmocom/docker-playground +$ git clone https://gitea.osmocom.org/osmocom/osmo-ci +$ cd osmo-ci +$ ln -s ../docker-playground _docker_playground +``` -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35264?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I9735eb30cf7260d211d5ea4da83ad09d31c93593 Gerrit-Change-Number: 35264 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged
[S] Change in osmo-ci[master]: coverity: upgrade to 2023.6.2
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35266?usp=email ) Change subject: coverity: upgrade to 2023.6.2 .. coverity: upgrade to 2023.6.2 Change-Id: I91f087fa3b39e1e0bc48739f92c4c23b3c0aa34f --- M ansible/roles/install-coverity/defaults/main.yml 1 file changed, 10 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved fixeria: Looks good to me, approved diff --git a/ansible/roles/install-coverity/defaults/main.yml b/ansible/roles/install-coverity/defaults/main.yml index 4a74887..7be5be6 100644 --- a/ansible/roles/install-coverity/defaults/main.yml +++ b/ansible/roles/install-coverity/defaults/main.yml @@ -1,4 +1,4 @@ --- -coverity_version: 2022.06 +coverity_version: 2023.6.2 coverity_installer_file: "cov-analysis-linux64-{{ coverity_version }}.tar.gz" -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35266?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I91f087fa3b39e1e0bc48739f92c4c23b3c0aa34f Gerrit-Change-Number: 35266 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged
[M] Change in osmo-ci[master]: README: update and convert to markdown
Attention is currently required from: fixeria. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35264?usp=email ) Change subject: README: update and convert to markdown .. Patch Set 2: Code-Review+2 (1 comment) Patchset: PS2: re-apply fixeria's +1 (just fixed a broken link afterwards) + Pau's +1 = 2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35264?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I9735eb30cf7260d211d5ea4da83ad09d31c93593 Gerrit-Change-Number: 35264 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Attention: fixeria Gerrit-Comment-Date: Fri, 08 Dec 2023 13:37:02 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in pysim[master]: USIM: add support for EG.ePDGIdEm (Emergency ePDG)
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35271?usp=email ) Change subject: USIM: add support for EG.ePDGIdEm (Emergency ePDG) .. USIM: add support for EG.ePDGIdEm (Emergency ePDG) Change-Id: I71cb7a4b9323f57b96db2d9f12f1567eda63f742 --- M pySim/ts_31_102.py 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/71/35271/1 diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py index 28781e1..d1f0f36 100644 --- a/pySim/ts_31_102.py +++ b/pySim/ts_31_102.py @@ -1479,6 +1479,7 @@ EF_IPS(), EF_ePDGId(service=(106, 107)), # FIXME: from EF_ePDGSelection onwards +EF_ePDGId('6ff5', None, 'EF.ePDGIdEm', desc='Emergency ePDG Identifier', service=(110, 111)), EF_FromPreferred(service=114), EF_eAKA(), # FIXME: DF_SoLSA service=23 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35271?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I71cb7a4b9323f57b96db2d9f12f1567eda63f742 Gerrit-Change-Number: 35271 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange
[S] Change in pysim[master]: usim: ePDGId + ePDGSelection: Fix encoder/decoder + add test cases
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35273?usp=email ) Change subject: usim: ePDGId + ePDGSelection: Fix encoder/decoder + add test cases .. usim: ePDGId + ePDGSelection: Fix encoder/decoder + add test cases Change-Id: Idca19b6fdabae6cc708e92c7714fa0903ea5a1ee --- M pySim/ts_31_102.py 1 file changed, 20 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/73/35273/1 diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py index 4ae74ec..74a2c4c 100644 --- a/pySim/ts_31_102.py +++ b/pySim/ts_31_102.py @@ -873,9 +873,13 @@ # TS 31.102 Section 4.2.103 class EF_ePDGId(TransparentEF): -class ePDGId(BER_TLV_IE, tag=0x80, nested=[]): +_test_de_encode = [ +( '801100657064672e6f736d6f636f6d2e6f7267', {'e_pdg_id': {"type_of_ePDG_address": "FQDN", "ePDG_address" : "epdg.osmocom.org" } } ), +( '800501c0a8a001', {'e_pdg_id': {"type_of_ePDG_address": "IPv4", "ePDG_address" : "c0a8a001" } } ), +] +class ePDGId(BER_TLV_IE, tag=0x80): _construct = Struct('type_of_ePDG_address'/Enum(Byte, FQDN=0, IPv4=1, IPv6=2), -'ePDG_address'/Switch(this.type_of_address, +'ePDG_address'/Switch(this.type_of_ePDG_address, {'FQDN': Utf8Adapter(GreedyBytes), 'IPv4': HexAdapter(GreedyBytes), 'IPv6': HexAdapter(GreedyBytes)})) @@ -886,7 +890,11 @@ # TS 31.102 Section 4.2.104 class EF_ePDGSelection(TransparentEF): -class ePDGSelection(BER_TLV_IE, tag=0x80, nested=[]): +_test_de_encode = [ +( '80060001f1000100', {'e_pdg_selection': [{'plmn': '00101f', 'epdg_priority': 1, 'epdg_fqdn_format': 'operator_identified' }] }), +( '800600011000a001', {'e_pdg_selection': [{'plmn': '001001', 'epdg_priority': 160, 'epdg_fqdn_format': 'location_based' }] }), +] +class ePDGSelection(BER_TLV_IE, tag=0x80): _construct = GreedyRange(Struct('plmn'/BcdAdapter(Bytes(3)), 'epdg_priority'/Int16ub, 'epdg_fqdn_format'/Enum(Int8ub, operator_identified=0, location_based=1))) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35273?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Idca19b6fdabae6cc708e92c7714fa0903ea5a1ee Gerrit-Change-Number: 35273 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange
[S] Change in pysim[master]: usim: Add EF.ePDGSelection + EF.ePDGSelectionEm support
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35272?usp=email ) Change subject: usim: Add EF.ePDGSelection + EF.ePDGSelectionEm support .. usim: Add EF.ePDGSelection + EF.ePDGSelectionEm support Change-Id: I760a394ae1eac5f1175dc9b86c11b4a60671582e --- M pySim/ts_31_102.py 1 file changed, 23 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/72/35272/1 diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py index d1f0f36..4ae74ec 100644 --- a/pySim/ts_31_102.py +++ b/pySim/ts_31_102.py @@ -884,6 +884,17 @@ super().__init__(fid, sfid=sfid, name=name, desc=desc, **kwargs) self._tlv = EF_ePDGId.ePDGId +# TS 31.102 Section 4.2.104 +class EF_ePDGSelection(TransparentEF): +class ePDGSelection(BER_TLV_IE, tag=0x80, nested=[]): +_construct = GreedyRange(Struct('plmn'/BcdAdapter(Bytes(3)), +'epdg_priority'/Int16ub, +'epdg_fqdn_format'/Enum(Int8ub, operator_identified=0, location_based=1))) + +def __init__(self, fid='6ff4', sfid=None, name='EF.ePDGSelection', desc='ePDG Selection Information', **kwargs): +super().__init__(fid, sfid=sfid, name=name, desc=desc, **kwargs) +self._tlv = EF_ePDGSelection.ePDGSelection + # TS 31.102 Section 4.2.106 class EF_FromPreferred(TransparentEF): def __init__(self, fid='6ff7', sfid=None, name='EF.FromPreferred', size=(1, 1), @@ -1478,8 +1489,10 @@ # EF_IWL (IMEI(SV) White List) EF_IPS(), EF_ePDGId(service=(106, 107)), -# FIXME: from EF_ePDGSelection onwards +EF_ePDGSelection(service=(106, 107)), EF_ePDGId('6ff5', None, 'EF.ePDGIdEm', desc='Emergency ePDG Identifier', service=(110, 111)), +EF_ePDGSelection('6ff6', None, 'EF.ePDGSelectionEm', + desc='ePDG Selection Information for Emergency Services', service=(110, 111)), EF_FromPreferred(service=114), EF_eAKA(), # FIXME: DF_SoLSA service=23 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35272?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I760a394ae1eac5f1175dc9b86c11b4a60671582e Gerrit-Change-Number: 35272 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange
[S] Change in osmo-bts[master]: Handle empty (idle) PDCH blocks gracefully
Attention is currently required from: jolly. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/35270?usp=email ) Change subject: Handle empty (idle) PDCH blocks gracefully .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/35270?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Icb52c896766425fcf453c65530c4c0b8d06b8821 Gerrit-Change-Number: 35270 Gerrit-PatchSet: 1 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Attention: jolly Gerrit-Comment-Date: Fri, 08 Dec 2023 13:21:48 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in osmo-bts[master]: Use polling based LAPDm with frame numbers
Attention is currently required from: jolly, laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/35007?usp=email ) Change subject: Use polling based LAPDm with frame numbers .. Patch Set 8: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/35007?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ic6d7902b13cf491daaa8752db78f9875387aeffd Gerrit-Change-Number: 35007 Gerrit-PatchSet: 8 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: jolly Gerrit-Attention: laforge Gerrit-Comment-Date: Fri, 08 Dec 2023 13:20:55 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-ci[master]: coverity: readlink /opt/coverity/current
Attention is currently required from: osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35269?usp=email ) Change subject: coverity: readlink /opt/coverity/current .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35269?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: If4a7c71759a6eb436eb47024565f169c6134e2e2 Gerrit-Change-Number: 35269 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Attention: osmith Gerrit-Comment-Date: Fri, 08 Dec 2023 13:19:22 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-ci[master]: ansible: fix updating /opt/coverity/current
Attention is currently required from: osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35268?usp=email ) Change subject: ansible: fix updating /opt/coverity/current .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35268?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I4ecb4997829b3cc61c839d089bda44f821ca8b85 Gerrit-Change-Number: 35268 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Attention: osmith Gerrit-Comment-Date: Fri, 08 Dec 2023 13:19:06 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-ci[master]: coverity: upgrade to 2023.6.2
Attention is currently required from: osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35266?usp=email ) Change subject: coverity: upgrade to 2023.6.2 .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35266?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I91f087fa3b39e1e0bc48739f92c4c23b3c0aa34f Gerrit-Change-Number: 35266 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Attention: osmith Gerrit-Comment-Date: Fri, 08 Dec 2023 13:18:20 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in osmo-ci[master]: coverity: add job to check for failed uploads
Attention is currently required from: fixeria, osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35267?usp=email ) Change subject: coverity: add job to check for failed uploads .. Patch Set 2: (1 comment) File coverity/badge_status.sh: https://gerrit.osmocom.org/c/osmo-ci/+/35267/comment/c994d2f2_abf4e324 PS2, Line 11: wget --no-verbose -O "$BADGE" "https://scan.coverity.com/projects/7523/badge.svg; some small documentation on how this script accomplished its aim (downloading an svg image containg a word) would be welcome. -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35267?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ideabcb30f9f8f365acff2de7751eb74a2762a7a6 Gerrit-Change-Number: 35267 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-CC: pespin Gerrit-Attention: osmith Gerrit-Attention: fixeria Gerrit-Comment-Date: Fri, 08 Dec 2023 13:18:04 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
[S] Change in osmo-ci[master]: README: document how to upgrade coverity
Attention is currently required from: osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35265?usp=email ) Change subject: README: document how to upgrade coverity .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35265?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I551df9f36112f34cf76d0247f1ebc1e58ae0a896 Gerrit-Change-Number: 35265 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Attention: osmith Gerrit-Comment-Date: Fri, 08 Dec 2023 13:16:44 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in osmo-ci[master]: README: update and convert to markdown
Attention is currently required from: fixeria, osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35264?usp=email ) Change subject: README: update and convert to markdown .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35264?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I9735eb30cf7260d211d5ea4da83ad09d31c93593 Gerrit-Change-Number: 35264 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Attention: osmith Gerrit-Attention: fixeria Gerrit-Comment-Date: Fri, 08 Dec 2023 13:16:21 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[L] Change in osmo-mgw[master]: add fmtp string to ptmap: allow all possible fmtp
Attention is currently required from: laforge, neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34900?usp=email ) Change subject: add fmtp string to ptmap: allow all possible fmtp .. Patch Set 9: Code-Review+1 (1 comment) File src/libosmo-mgcp-client/mgcp_client.c: https://gerrit.osmocom.org/c/osmo-mgw/+/34900/comment/1ce0b0e1_d11b3880 PS9, Line 1290: && (mgcp_msg->ptmap[i].codec == CODEC_AMR_8000_1 (fact: the problem with the "&&" at the start of the line instead of appending at the end of last one is that then everything following in the next lines is indented more to the right, loosing line space.) -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34900?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: If58590bda8627519ff07e0b6f43aa47a274f052b Gerrit-Change-Number: 34900 Gerrit-PatchSet: 9 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-CC: dexter Gerrit-Attention: neels Gerrit-Attention: laforge Gerrit-Comment-Date: Fri, 08 Dec 2023 13:14:54 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-mgw[master]: mgcp_client_fsm: allocate struct mgcp_conn_peer dynamically
Attention is currently required from: dexter, laforge, neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34404?usp=email ) Change subject: mgcp_client_fsm: allocate struct mgcp_conn_peer dynamically .. Patch Set 13: Code-Review+1 (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-mgw/+/34404/comment/71cb3d38_79437b58 PS13, Line 10: an ABI compatibility in case the struct changes. This causes an ABI incompaitibility -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34404?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I523d0fcb020f7d46323c497a4be9ee00d5f242ba Gerrit-Change-Number: 34404 Gerrit-PatchSet: 13 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Attention: neels Gerrit-Attention: laforge Gerrit-Attention: dexter Gerrit-Comment-Date: Fri, 08 Dec 2023 13:10:02 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in osmo-mgw[master]: drop (now) unused code
Attention is currently required from: neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35247?usp=email ) Change subject: drop (now) unused code .. Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35247?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I84e5285831397c992af59deee12dea8458d16cc6 Gerrit-Change-Number: 35247 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Attention: neels Gerrit-Comment-Date: Fri, 08 Dec 2023 13:06:32 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in osmo-mgw[master]: client: move some items to internal header
Attention is currently required from: laforge, neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35246?usp=email ) Change subject: client: move some items to internal header .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35246?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I6d8bdda5c2ffa236e94a0b6111de4dbfac923187 Gerrit-Change-Number: 35246 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: neels Gerrit-Attention: laforge Gerrit-Comment-Date: Fri, 08 Dec 2023 12:59:10 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-mgw[master]: fix possible NULL deref on early media
Attention is currently required from: neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35263?usp=email ) Change subject: fix possible NULL deref on early media .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35263?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I9bfb55a343b3f2b1459e0aba4ee71a6133b992b3 Gerrit-Change-Number: 35263 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Attention: neels Gerrit-Comment-Date: Fri, 08 Dec 2023 12:58:44 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-bts[master]: Handle empty (idle) PDCH blocks gracefully
Attention is currently required from: jolly. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/35270?usp=email ) Change subject: Handle empty (idle) PDCH blocks gracefully .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/35270?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Icb52c896766425fcf453c65530c4c0b8d06b8821 Gerrit-Change-Number: 35270 Gerrit-PatchSet: 1 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-CC: pespin Gerrit-Attention: jolly Gerrit-Comment-Date: Fri, 08 Dec 2023 10:34:15 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-bts[master]: LAPDm: Reject (release) establishment on DCCH, SAPI 0 without L3 payload
Attention is currently required from: jolly, laforge. Hello Jenkins Builder, fixeria, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/35082?usp=email to look at the new patch set (#8). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: LAPDm: Reject (release) establishment on DCCH, SAPI 0 without L3 payload .. LAPDm: Reject (release) establishment on DCCH, SAPI 0 without L3 payload If the channel is activated for immediate assignment, the initial data link establishment on main signaling link with SAPI 0 must have L3 infomation included in the SABM message. If this is not the case, release the data link without notifying BSC. Related: OS#5971 Change-Id: I6819b51a876b8743c2d4a04165b7900723a1631c --- M include/osmo-bts/lchan.h M src/common/rsl.c 2 files changed, 37 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/82/35082/8 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/35082?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I6819b51a876b8743c2d4a04165b7900723a1631c Gerrit-Change-Number: 35082 Gerrit-PatchSet: 8 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: jolly Gerrit-Attention: laforge Gerrit-MessageType: newpatchset
[S] Change in osmo-bts[master]: Handle empty (idle) PDCH blocks gracefully
jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/35270?usp=email ) Change subject: Handle empty (idle) PDCH blocks gracefully .. Handle empty (idle) PDCH blocks gracefully An empty PDCH block contains no payload, sysmo-bts and similar BTS models crash, because they expect the msg->l2h to be set. The function l1sap_pdch_req() will not set msg->l2h for empty PDCH blocks, so these models crash. The current osmo-pcu does not send empty PDCH blocks to these BTS models. But there shouldn't be a crash, if we receive empty PDCH blocks over the PCU socket interface. Change-Id: Icb52c896766425fcf453c65530c4c0b8d06b8821 --- M src/osmo-bts-lc15/l1_if.c M src/osmo-bts-oc2g/l1_if.c M src/osmo-bts-octphy/l1_if.c M src/osmo-bts-sysmo/l1_if.c 4 files changed, 22 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/70/35270/1 diff --git a/src/osmo-bts-lc15/l1_if.c b/src/osmo-bts-lc15/l1_if.c index bf120a9..0df2c8a 100644 --- a/src/osmo-bts-lc15/l1_if.c +++ b/src/osmo-bts-lc15/l1_if.c @@ -347,7 +347,7 @@ abort(); } - len = msgb_l2len(msg); + len = (msg->l2h) ? msgb_l2len(msg) : 0; chan_nr = l1sap->u.data.chan_nr; link_id = l1sap->u.data.link_id; diff --git a/src/osmo-bts-oc2g/l1_if.c b/src/osmo-bts-oc2g/l1_if.c index 2ad59c9..0e45bf6 100644 --- a/src/osmo-bts-oc2g/l1_if.c +++ b/src/osmo-bts-oc2g/l1_if.c @@ -392,7 +392,7 @@ abort(); } - len = msgb_l2len(msg); + len = (msg->l2h) ? msgb_l2len(msg) : 0; chan_nr = l1sap->u.data.chan_nr; link_id = l1sap->u.data.link_id; diff --git a/src/osmo-bts-octphy/l1_if.c b/src/osmo-bts-octphy/l1_if.c index c79c115..074a1a7 100644 --- a/src/osmo-bts-octphy/l1_if.c +++ b/src/osmo-bts-octphy/l1_if.c @@ -479,7 +479,7 @@ abort(); } - len = msgb_l2len(msg); + len = (msg->l2h) ? msgb_l2len(msg) : 0; chan_nr = l1sap->u.data.chan_nr; link_id = l1sap->u.data.link_id; diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 49a8c5d..1ebece5 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -344,7 +344,7 @@ abort(); } - len = msgb_l2len(msg); + len = (msg->l2h) ? msgb_l2len(msg) : 0; chan_nr = l1sap->u.data.chan_nr; link_id = l1sap->u.data.link_id; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/35270?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Icb52c896766425fcf453c65530c4c0b8d06b8821 Gerrit-Change-Number: 35270 Gerrit-PatchSet: 1 Gerrit-Owner: jolly Gerrit-MessageType: newchange
[S] Change in osmo-ci[master]: coverity: readlink /opt/coverity/current
Attention is currently required from: osmith. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35269?usp=email ) Change subject: coverity: readlink /opt/coverity/current .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35269?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: If4a7c71759a6eb436eb47024565f169c6134e2e2 Gerrit-Change-Number: 35269 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Attention: osmith Gerrit-Comment-Date: Fri, 08 Dec 2023 09:59:24 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-ci[master]: ansible: fix updating /opt/coverity/current
Attention is currently required from: osmith. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35268?usp=email ) Change subject: ansible: fix updating /opt/coverity/current .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35268?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I4ecb4997829b3cc61c839d089bda44f821ca8b85 Gerrit-Change-Number: 35268 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Attention: osmith Gerrit-Comment-Date: Fri, 08 Dec 2023 09:59:14 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-ci[master]: ansible: fix updating /opt/coverity/current
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/35268?usp=email ) Change subject: ansible: fix updating /opt/coverity/current .. ansible: fix updating /opt/coverity/current Remove the previous /opt/coverity/current symlink, before creating the new one. Otherwise the new symlink would be created inside "current" pointing at the old version, instead of replacing "current" with the new symlink. # ln -svf /opt/coverity/2023.6.2/* /opt/coverity/current '/opt/coverity/current/cov-analysis-linux64-2023.6.2' -> '/opt/coverity/2023.6.2/cov-analysis-linux64-2023.6.2' # readlink /opt/covervity/current /opt/coverity/2022.06/cov-analysis-linux64-2022.6.0 Add the verbosity flag to the command while at it. (The glob is unrelated, why it is needed is described in I2b96d1e47f2697706a042937b2852f0fc5032a7b) Related: SYS#6685 Change-Id: I4ecb4997829b3cc61c839d089bda44f821ca8b85 --- M ansible/roles/install-coverity/tasks/main.yml 1 file changed, 26 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/68/35268/1 diff --git a/ansible/roles/install-coverity/tasks/main.yml b/ansible/roles/install-coverity/tasks/main.yml index 246fa36..ca4a24c 100644 --- a/ansible/roles/install-coverity/tasks/main.yml +++ b/ansible/roles/install-coverity/tasks/main.yml @@ -37,7 +37,7 @@ when: coverity_copy.failed == False - name: create link /opt/coverity/current - shell: ln -sf /opt/coverity/{{ coverity_version }}/* /opt/coverity/current + shell: rm -vf /opt/coverity/current && ln -svf /opt/coverity/{{ coverity_version }}/* /opt/coverity/current args: warn: false when: coverity_copy.failed == False -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35268?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I4ecb4997829b3cc61c839d089bda44f821ca8b85 Gerrit-Change-Number: 35268 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange
[S] Change in osmo-ci[master]: coverity: readlink /opt/coverity/current
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/35269?usp=email ) Change subject: coverity: readlink /opt/coverity/current .. coverity: readlink /opt/coverity/current Show where the symlink points at the start of the job, so we can see which coverity version is currently installed. Related: SYS#6685 Change-Id: If4a7c71759a6eb436eb47024565f169c6134e2e2 --- M coverity/jenkins.sh 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/69/35269/1 diff --git a/coverity/jenkins.sh b/coverity/jenkins.sh index dfe3067..b33ae86 100755 --- a/coverity/jenkins.sh +++ b/coverity/jenkins.sh @@ -3,6 +3,8 @@ set -e -x +readlink /opt/coverity/current + export PATH=$PATH:/opt/coverity/current/bin base_dir="$HOME/osmo-ci/coverity" -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35269?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: If4a7c71759a6eb436eb47024565f169c6134e2e2 Gerrit-Change-Number: 35269 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange
[S] Change in osmo-ci[master]: coverity: upgrade to 2023.6.2
Attention is currently required from: osmith. Hello Jenkins Builder, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ci/+/35266?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: coverity: upgrade to 2023.6.2 .. coverity: upgrade to 2023.6.2 Change-Id: I91f087fa3b39e1e0bc48739f92c4c23b3c0aa34f --- M ansible/roles/install-coverity/defaults/main.yml 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/66/35266/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35266?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I91f087fa3b39e1e0bc48739f92c4c23b3c0aa34f Gerrit-Change-Number: 35266 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Attention: osmith Gerrit-MessageType: newpatchset
[M] Change in osmo-ci[master]: README: update and convert to markdown
Attention is currently required from: fixeria, osmith. Hello Jenkins Builder, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ci/+/35264?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+1 by fixeria, Verified+1 by Jenkins Builder Change subject: README: update and convert to markdown .. README: update and convert to markdown * Describe all directories * Update the text slightly * Convert to markdown, so it shows up formatted at: https://gitea.osmocom.org/osmocom/osmo-ci Change-Id: I9735eb30cf7260d211d5ea4da83ad09d31c93593 --- D README.adoc A README.md 2 files changed, 62 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/64/35264/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35264?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I9735eb30cf7260d211d5ea4da83ad09d31c93593 Gerrit-Change-Number: 35264 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Attention: osmith Gerrit-Attention: fixeria Gerrit-MessageType: newpatchset
[M] Change in osmo-ci[master]: coverity: add job to check for failed uploads
Attention is currently required from: fixeria, osmith. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35267?usp=email ) Change subject: coverity: add job to check for failed uploads .. Patch Set 1: Code-Review+1 (1 comment) Patchset: PS1: Very nice idea! -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35267?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ideabcb30f9f8f365acff2de7751eb74a2762a7a6 Gerrit-Change-Number: 35267 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Attention: osmith Gerrit-Attention: fixeria Gerrit-Comment-Date: Fri, 08 Dec 2023 08:31:09 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-ci[master]: coverity: upgrade to 2023.6.2
Attention is currently required from: osmith. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35266?usp=email ) Change subject: coverity: upgrade to 2023.6.2 .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35266?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I91f087fa3b39e1e0bc48739f92c4c23b3c0aa34f Gerrit-Change-Number: 35266 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Attention: osmith Gerrit-Comment-Date: Fri, 08 Dec 2023 08:28:14 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-ci[master]: README: document how to upgrade coverity
Attention is currently required from: osmith. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35265?usp=email ) Change subject: README: document how to upgrade coverity .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35265?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I551df9f36112f34cf76d0247f1ebc1e58ae0a896 Gerrit-Change-Number: 35265 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Attention: osmith Gerrit-Comment-Date: Fri, 08 Dec 2023 08:27:54 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in osmo-ci[master]: README: update and convert to markdown
Attention is currently required from: osmith. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35264?usp=email ) Change subject: README: update and convert to markdown .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35264?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I9735eb30cf7260d211d5ea4da83ad09d31c93593 Gerrit-Change-Number: 35264 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Attention: osmith Gerrit-Comment-Date: Fri, 08 Dec 2023 08:26:57 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[M] Change in osmo-ci[master]: coverity: add job to check for failed uploads
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/35267?usp=email ) Change subject: coverity: add job to check for failed uploads .. coverity: add job to check for failed uploads Related: SYS#6685 Change-Id: Ideabcb30f9f8f365acff2de7751eb74a2762a7a6 --- A coverity/badge_status.sh M jobs/README.adoc A jobs/coverity-status.yml 3 files changed, 79 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/67/35267/1 diff --git a/coverity/badge_status.sh b/coverity/badge_status.sh new file mode 100755 index 000..6143f75 --- /dev/null +++ b/coverity/badge_status.sh @@ -0,0 +1,23 @@ +#!/bin/sh -e +# Check if the coverity badge says "failed". This can happen for example if we +# use a coverity version that is no longer supported, and it doesn't fail in +# any other obvious way. (SYS#6685) + +BADGE="_temp/badge.svg" + +mkdir -p _temp +rm -f "$BADGE" + +wget --no-verbose -O "$BADGE" "https://scan.coverity.com/projects/7523/badge.svg; + +if grep -q failed "$BADGE"; then + echo + echo "ERROR: coverity status is 'failed'!" + echo + echo "Find the error details here:" + echo "https://scan.coverity.com/projects/osmocom?tab=overview; + echo + exit 1 +fi + +echo "Success, the coverity status badge does not say 'failed'." diff --git a/jobs/README.adoc b/jobs/README.adoc index c37b3bb..eb14152 100644 --- a/jobs/README.adoc +++ b/jobs/README.adoc @@ -144,5 +144,6 @@ 04:XX osmocom-release-manuals 05:XX osmocom-release-tarballs 06:XX repo-install-test + 06:XX coverity-status (runs intentionally much later than the coverity job) master-builds: to avoid complexity, these run throughout the day (H H * * *). diff --git a/jobs/coverity-status.yml b/jobs/coverity-status.yml new file mode 100644 index 000..7a2e9fd --- /dev/null +++ b/jobs/coverity-status.yml @@ -0,0 +1,45 @@ +# Check if the coverity badge says "failed". This can happen for example if we +# use a coverity version that is no longer supported, and it doesn't fail in +# any other obvious way. (SYS#6685) +- project: +name: osmocom-coverity-status +jobs: + - osmocom-coverity-status + +- job: +name: 'osmocom-coverity-status' +project-type: freestyle +defaults: global +description: | +Verify that the coverity badge doesn't say "failed" (SYS#6685). +builders: + - shell: | + coverity/badge_status.sh +publishers: + - email: + recipients: 'jenkins-notificati...@lists.osmocom.org' + notify-every-unstable-build: true +properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 +parameters: + - string: + name: BRANCH + description: osmo-ci.git branch + default: 'origin/master' +scm: + - git: + url: https://gerrit.osmocom.org/osmo-ci + git-config-name: 'Jenkins Builder' + git-config-email: 'jenk...@osmocom.org' + branches: +- '$BRANCH' +triggers: + - timed: "H 06 * * *" +publishers: + - email: + notify-every-unstable-build: true + recipients: 'jenkins-notificati...@lists.osmocom.org' + +# vim: expandtab tabstop=2 shiftwidth=2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35267?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ideabcb30f9f8f365acff2de7751eb74a2762a7a6 Gerrit-Change-Number: 35267 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange