lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

January 2023

  • 1 participants
  • 2205 discussions
Change in osmo-bsc[master]: SI: use defined constant instead of magic number
by msuraev 23 Jan '23

23 Jan '23
msuraev has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31037 ) Change subject: SI: use defined constant instead of magic number ...................................................................... SI: use defined constant instead of magic number Related: OS#5783 Change-Id: I2ecac86fb860241bccf56c03d0454f07552fdc9d --- M src/osmo-bsc/bts_trx.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/bts_trx.c b/src/osmo-bsc/bts_trx.c index ad41100..436979d 100644 --- a/src/osmo-bsc/bts_trx.c +++ b/src/osmo-bsc/bts_trx.c @@ -451,7 +451,7 @@ si_len[si_type] = 11; break; default: - si_len[si_type] = 23; + si_len[si_type] = GSM_MACBLOCK_LEN; } } } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31037 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I2ecac86fb860241bccf56c03d0454f07552fdc9d Gerrit-Change-Number: 31037 Gerrit-PatchSet: 2 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmocore[master]: Introduce tundev API
by pespin 23 Jan '23

23 Jan '23
Attention is currently required from: osmith, laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31025 ) Change subject: Introduce tundev API ...................................................................... Patch Set 11: (10 comments) File include/osmocom/core/tun.h: https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/7f40d1e2_79c58aba PS9, Line 29: const char *osmo_tundev_get_name(const struct osmo_tundev *tundev); > maybe add a new line below this? given that the two functions below are about dev_name, and there's […] Ack File src/core/tun.c: https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/983491c8_0cbf25d9 PS4, Line 421: osmo_tundev_encaps > agreed Ack File src/core/tun.c: https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/af32b144_9e7c3eb7 PS9, Line 130: " > Add "Prepare netns: " for consistency with other messages in this function? Ack https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/4bb8814e_2817ac8d PS9, Line 184: NULL > use a global talloc ctx and pass that here? I don't plan to pass this from the API, since the ctx passed there is per tundev and may be expected to be freed when the parent object in the app holding the tudnev is released. We could add an internal static talloc ctx here if needed, but I don't see urgent need for it? https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/1c903b80_6b7d7fb1 PS9, Line 233: inreface > interface Ack https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/fbe9b047_e0eb751e PS9, Line 284: tundev_mnl_link_state_change > Maybe call it "tundev_mnl_link_on_state_change" (adding _on_)? […] Ack https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/8a34baba_4e28637f PS9, Line 371: |= > is this intentionally the same as in the if (up) case? if so, why have it in both the if and else br […] Yes this is expected, as per https://git.netfilter.org/libmnl/tree/examples/rtnl/rtnl-link-set.c https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/32b65316_5fab012c PS9, Line 375: /* RTM_NEWLINK doesn't work either */ > leftover comment? Ack https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/409a82f6_83285fbe PS9, Line 448: status > why status and not len? Ack https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/504182d4_eec11582 PS9, Line 524: free > open Ack -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31025 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3463271666df1e85746fb7b06ec45a17024b8c53 Gerrit-Change-Number: 31025 Gerrit-PatchSet: 11 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Mon, 23 Jan 2023 16:40:25 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: osmith <osmith(a)sysmocom.de> Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: layer23: Introduce APN VTY node
by pespin 23 Jan '23

23 Jan '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30992 ) Change subject: layer23: Introduce APN VTY node ...................................................................... layer23: Introduce APN VTY node This commit adds an initial set of VTY commands to manage APN configuration and set up, which is used by the modem app. The sample modem.cfg file is updated to showcase how to configure APNs. The app doesn't do anything with them yet. A follow up patch will add code to create tun devices for each configured APN. Change-Id: I7b4eaa0de428b418bb1d89bd544694e89beb3e6e --- M doc/examples/modem/modem.cfg M src/host/layer23/include/osmocom/bb/common/Makefile.am A src/host/layer23/include/osmocom/bb/common/apn.h M src/host/layer23/include/osmocom/bb/common/ms.h M src/host/layer23/include/osmocom/bb/common/settings.h M src/host/layer23/include/osmocom/bb/modem/vty.h M src/host/layer23/src/common/Makefile.am A src/host/layer23/src/common/apn.c M src/host/layer23/src/common/ms.c M src/host/layer23/src/common/settings.c M src/host/layer23/src/modem/app_modem.c M src/host/layer23/src/modem/vty.c 12 files changed, 381 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/doc/examples/modem/modem.cfg b/doc/examples/modem/modem.cfg index d2cb81f..a441b0e 100644 --- a/doc/examples/modem/modem.cfg +++ b/doc/examples/modem/modem.cfg @@ -6,4 +6,9 @@ no login ! ms 1 + apn internet + tun-device modem4 +! tun-netns netns_modem4 + type-support v4 + no shutdown no shutdown diff --git a/src/host/layer23/include/osmocom/bb/common/Makefile.am b/src/host/layer23/include/osmocom/bb/common/Makefile.am index 270f079..28caf78 100644 --- a/src/host/layer23/include/osmocom/bb/common/Makefile.am +++ b/src/host/layer23/include/osmocom/bb/common/Makefile.am @@ -1,4 +1,5 @@ noinst_HEADERS = \ + apn.h \ l1ctl.h \ l1l2_interface.h \ l23_app.h \ diff --git a/src/host/layer23/include/osmocom/bb/common/apn.h b/src/host/layer23/include/osmocom/bb/common/apn.h new file mode 100644 index 0000000..4a92a62 --- /dev/null +++ b/src/host/layer23/include/osmocom/bb/common/apn.h @@ -0,0 +1,56 @@ +/* APN Context + * (C) 2023 by sysmocom - s.m.f.c. GmbH <info(a)sysmocom.de> + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#pragma once + +#include <osmocom/core/linuxlist.h> +#include <osmocom/core/select.h> + +struct osmocom_ms; + +#define APN_TYPE_IPv4 0x01 /* v4-only */ +#define APN_TYPE_IPv6 0x02 /* v6-only */ +#define APN_TYPE_IPv4v6 0x04 /* v4v6 dual-stack */ + +struct osmobb_apn { + /* list of APNs inside MS */ + struct llist_head list; + /* back-pointer to MS */ + struct osmocom_ms *ms; + + bool started; + + struct { + /* Primary name */ + char *name; + /* name of the network device */ + char *dev_name; + /* netns name of the network device, NULL = default netns */ + char *dev_netns_name; + /* types supported address types on this APN */ + uint32_t apn_type_mask; + /* administratively shutdown (true) or not (false) */ + bool shutdown; + /* transmit G-PDU sequence numbers (true) or not (false) */ + bool tx_gpdu_seq; + } cfg; +}; + +struct osmobb_apn *apn_alloc(struct osmocom_ms *ms, const char *name); +void apn_free(struct osmobb_apn *apn); +int apn_start(struct osmobb_apn *apn); +int apn_stop(struct osmobb_apn *apn); diff --git a/src/host/layer23/include/osmocom/bb/common/ms.h b/src/host/layer23/include/osmocom/bb/common/ms.h index a706a4c..30bb514 100644 --- a/src/host/layer23/include/osmocom/bb/common/ms.h +++ b/src/host/layer23/include/osmocom/bb/common/ms.h @@ -90,6 +90,9 @@ struct osmomncc_entity mncc_entity; struct llist_head trans_list; + /* GPRS */ + struct gprs_settings gprs; + /* Audio I/O */ struct gapk_io_state *gapk_io; diff --git a/src/host/layer23/include/osmocom/bb/common/settings.h b/src/host/layer23/include/osmocom/bb/common/settings.h index 8ebf049..523ad8e 100644 --- a/src/host/layer23/include/osmocom/bb/common/settings.h +++ b/src/host/layer23/include/osmocom/bb/common/settings.h @@ -5,6 +5,7 @@ #include <osmocom/core/linuxlist.h> struct osmocom_ms; +struct osmobb_apn; #define MOB_C7_DEFLT_ANY_TIMEOUT 30 @@ -180,6 +181,14 @@ char *gsm_check_imei(const char *imei, const char *sv); int gsm_random_imei(struct gsm_settings *set); +struct gprs_settings { + struct llist_head apn_list; +}; + +int gprs_settings_init(struct osmocom_ms *ms); +int gprs_settings_fi(struct osmocom_ms *ms); +struct osmobb_apn *ms_find_apn_by_name(struct osmocom_ms *ms, const char *apn_name); + extern char *layer2_socket_path; #endif /* _settings_h */ diff --git a/src/host/layer23/include/osmocom/bb/modem/vty.h b/src/host/layer23/include/osmocom/bb/modem/vty.h index 14ec624..5b69af6 100644 --- a/src/host/layer23/include/osmocom/bb/modem/vty.h +++ b/src/host/layer23/include/osmocom/bb/modem/vty.h @@ -1,3 +1,10 @@ #pragma once +#include <osmocom/bb/common/vty.h> + +enum modem_vty_node { + APN_NODE = _LAST_L23VTY_NODE + 1, +}; + int modem_vty_init(void); +int modem_vty_go_parent(struct vty *vty); diff --git a/src/host/layer23/src/common/Makefile.am b/src/host/layer23/src/common/Makefile.am index 9abc802..94eeec8 100644 --- a/src/host/layer23/src/common/Makefile.am +++ b/src/host/layer23/src/common/Makefile.am @@ -13,6 +13,7 @@ noinst_LIBRARIES = liblayer23.a liblayer23_a_SOURCES = \ + apn.c \ gps.c \ l1ctl.c \ l1l2_interface.c \ diff --git a/src/host/layer23/src/common/apn.c b/src/host/layer23/src/common/apn.c new file mode 100644 index 0000000..f60053d --- /dev/null +++ b/src/host/layer23/src/common/apn.c @@ -0,0 +1,60 @@ +/* + * (C) 2023 by sysmocom - s.m.f.c. GmbH <info(a)sysmocom.de> + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include <stdint.h> +#include <errno.h> +#include <string.h> +#include <arpa/inet.h> + +#include <talloc.h> + +#include <osmocom/bb/common/logging.h> +#include <osmocom/bb/common/apn.h> +#include <osmocom/bb/common/ms.h> + +struct osmobb_apn *apn_alloc(struct osmocom_ms *ms, const char *name) +{ + struct osmobb_apn *apn; + apn = talloc_zero(ms, struct osmobb_apn); + if (!apn) + return NULL; + + talloc_set_name(apn, "apn_%s", name); + apn->cfg.name = talloc_strdup(apn, name); + apn->cfg.shutdown = true; + apn->cfg.tx_gpdu_seq = true; + + apn->ms = ms; + llist_add_tail(&apn->list, &ms->gprs.apn_list); + return apn; +} + +void apn_free(struct osmobb_apn *apn) +{ + llist_del(&apn->list); + talloc_free(apn); +} + +int apn_start(struct osmobb_apn *apn) +{ + return 0; +} + +int apn_stop(struct osmobb_apn *apn) +{ + return 0; +} diff --git a/src/host/layer23/src/common/ms.c b/src/host/layer23/src/common/ms.c index 558505a..ee27096 100644 --- a/src/host/layer23/src/common/ms.c +++ b/src/host/layer23/src/common/ms.c @@ -24,6 +24,12 @@ /* Default value be configured by cmdline arg: */ uint16_t cfg_test_arfcn = 871; +static int osmocom_ms_talloc_destructor(struct osmocom_ms *ms) +{ + gprs_settings_fi(ms); + return 0; +} + struct osmocom_ms *osmocom_ms_alloc(void *ctx, const char *name) { struct osmocom_ms *ms; @@ -32,6 +38,7 @@ if (!ms) return NULL; talloc_set_name(ms, "ms_%s", name); + talloc_set_destructor(ms, osmocom_ms_talloc_destructor); ms->name = talloc_strdup(ms, name); ms->test_arfcn = cfg_test_arfcn; @@ -50,6 +57,7 @@ gsm_support_init(ms); gsm_settings_init(ms); + gprs_settings_init(ms); return ms; } diff --git a/src/host/layer23/src/common/settings.c b/src/host/layer23/src/common/settings.c index fd7177d..d391f7d 100644 --- a/src/host/layer23/src/common/settings.c +++ b/src/host/layer23/src/common/settings.c @@ -20,13 +20,12 @@ #include <string.h> #include <osmocom/core/talloc.h> -#include <osmocom/bb/mobile/app_mobile.h> #include <osmocom/bb/common/settings.h> #include <osmocom/bb/common/utils.h> #include <osmocom/bb/common/logging.h> #include <osmocom/bb/common/osmocom_data.h> +#include <osmocom/bb/common/apn.h> #include <osmocom/bb/common/ms.h> -#include <osmocom/bb/common/networks.h> #include <osmocom/bb/common/l1l2_interface.h> /* Used to set default path globally through cmdline */ @@ -220,3 +219,35 @@ { AUDIO_IOF_TI, "ti" }, { 0x00, NULL} }; + + +int gprs_settings_init(struct osmocom_ms *ms) +{ + struct gprs_settings *set = &ms->gprs; + INIT_LLIST_HEAD(&set->apn_list); + + return 0; +} + +int gprs_settings_fi(struct osmocom_ms *ms) +{ + struct gprs_settings *set = &ms->gprs; + struct osmobb_apn *apn; + while ((apn = llist_first_entry_or_null(&set->apn_list, struct osmobb_apn, list))) { + /* free calls llist_del(): */ + apn_free(apn); + } + return 0; +} + +struct osmobb_apn *ms_find_apn_by_name(struct osmocom_ms *ms, const char *apn_name) +{ + struct gprs_settings *set = &ms->gprs; + struct osmobb_apn *apn; + + llist_for_each_entry(apn, &set->apn_list, list) { + if (strcmp(apn->cfg.name, apn_name) == 0) + return apn; + } + return NULL; +} diff --git a/src/host/layer23/src/modem/app_modem.c b/src/host/layer23/src/modem/app_modem.c index 7dcda17..d7c9a29 100644 --- a/src/host/layer23/src/modem/app_modem.c +++ b/src/host/layer23/src/modem/app_modem.c @@ -509,6 +509,7 @@ static struct vty_app_info _modem_vty_info = { .name = "modem", .version = PACKAGE_VERSION, + .go_parent_cb = modem_vty_go_parent, }; static struct l23_app_info info = { diff --git a/src/host/layer23/src/modem/vty.c b/src/host/layer23/src/modem/vty.c index 4304876..bd8afd8 100644 --- a/src/host/layer23/src/modem/vty.c +++ b/src/host/layer23/src/modem/vty.c @@ -25,14 +25,200 @@ #include <osmocom/vty/command.h> #include <osmocom/bb/common/vty.h> +#include <osmocom/bb/common/apn.h> #include <osmocom/bb/common/ms.h> +#include <osmocom/bb/modem/vty.h> +static struct cmd_node apn_node = { + APN_NODE, + "%s(apn)# ", + 1 +}; + +int modem_vty_go_parent(struct vty *vty) +{ + struct osmobb_apn *apn; + + switch (vty->node) { + case APN_NODE: + apn = vty->index; + vty->index = apn->ms; + vty->node = MS_NODE; + break; + } + return vty->node; +} + +/* per APN config */ +DEFUN(cfg_ms_apn, cfg_ms_apn_cmd, "apn APN_NAME", + "Configure an APN\n" + "Name of APN\n") +{ + struct osmocom_ms *ms = vty->index; + struct osmobb_apn *apn; + + apn = ms_find_apn_by_name(ms, argv[0]); + if (!apn) + apn = apn_alloc(ms, argv[0]); + if (!apn) { + vty_out(vty, "Unable to create APN '%s'%s", argv[0], VTY_NEWLINE); + return CMD_WARNING; + } + + vty->index = apn; + vty->node = APN_NODE; + return CMD_SUCCESS; +} + +DEFUN(cfg_ms_no_apn, cfg_ms_no_apn_cmd, "no apn APN_NAME", + NO_STR "Configure an APN\n" + "Name of APN\n") +{ + struct osmocom_ms *ms = vty->index; + struct osmobb_apn *apn; + + apn = ms_find_apn_by_name(ms, argv[0]); + if (!apn) { + vty_out(vty, "Unable to find APN '%s'%s", argv[0], VTY_NEWLINE); + return CMD_WARNING; + } + + apn_free(apn); + + return CMD_SUCCESS; +} + +DEFUN(cfg_apn_tun_dev_name, cfg_apn_tun_dev_name_cmd, + "tun-device NAME", + "Configure tun device name\n" + "TUN device name") +{ + struct osmobb_apn *apn = (struct osmobb_apn *) vty->index; + osmo_talloc_replace_string(apn, &apn->cfg.dev_name, argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_apn_tun_netns_name, cfg_apn_tun_netns_name_cmd, + "tun-netns NAME", + "Configure tun device network namespace name\n" + "TUN device network namespace name") +{ + struct osmobb_apn *apn = (struct osmobb_apn *) vty->index; + osmo_talloc_replace_string(apn, &apn->cfg.dev_netns_name, argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_apn_no_tun_netns_name, cfg_apn_no_tun_netns_name_cmd, + "no tun-netns", + "Configure tun device to use default network namespace name\n") +{ + struct osmobb_apn *apn = (struct osmobb_apn *) vty->index; + TALLOC_FREE(apn->cfg.dev_netns_name); + return CMD_SUCCESS; +} + +static const struct value_string pdp_type_names[] = { + { APN_TYPE_IPv4, "v4" }, + { APN_TYPE_IPv6, "v6" }, + { APN_TYPE_IPv4v6, "v4v6" }, + { 0, NULL } +}; + +#define V4V6V46_STRING "IPv4(-only) PDP Type\n" \ + "IPv6(-only) PDP Type\n" \ + "IPv4v6 (dual-stack) PDP Type\n" + +DEFUN(cfg_apn_type_support, cfg_apn_type_support_cmd, + "type-support (v4|v6|v4v6)", + "Enable support for PDP Type\n" + V4V6V46_STRING) +{ + struct osmobb_apn *apn = (struct osmobb_apn *) vty->index; + uint32_t type = get_string_value(pdp_type_names, argv[0]); + + apn->cfg.apn_type_mask |= type; + return CMD_SUCCESS; +} + +DEFUN(cfg_apn_shutdown, cfg_apn_shutdown_cmd, + "shutdown", + "Put the APN in administrative shut-down\n") +{ + struct osmobb_apn *apn = (struct osmobb_apn *) vty->index; + + if (!apn->cfg.shutdown) { + if (apn_stop(apn)) { + vty_out(vty, "%% Failed to Stop APN%s", VTY_NEWLINE); + return CMD_WARNING; + } + apn->cfg.shutdown = true; + } + + return CMD_SUCCESS; +} + +DEFUN(cfg_apn_no_shutdown, cfg_apn_no_shutdown_cmd, + "no shutdown", + NO_STR "Remove the APN from administrative shut-down\n") +{ + struct osmobb_apn *apn = (struct osmobb_apn *) vty->index; + + if (apn->cfg.shutdown) { + if (!apn->cfg.dev_name) { + vty_out(vty, "%% Failed to start APN, tun-device is not configured%s", VTY_NEWLINE); + return CMD_WARNING; + } + if (apn_start(apn) < 0) { + vty_out(vty, "%% Failed to start APN, check log for details%s", VTY_NEWLINE); + return CMD_WARNING; + } + apn->cfg.shutdown = false; + } + + return CMD_SUCCESS; +} + +static void config_write_apn(struct vty *vty, const struct osmobb_apn *apn) +{ + unsigned int i; + + vty_out(vty, " apn %s%s", apn->cfg.name, VTY_NEWLINE); + + if (apn->cfg.dev_name) + vty_out(vty, " tun-device %s%s", apn->cfg.dev_name, VTY_NEWLINE); + if (apn->cfg.dev_netns_name) + vty_out(vty, " tun-netns %s%s", apn->cfg.dev_netns_name, VTY_NEWLINE); + + for (i = 0; i < 32; i++) { + if (!(apn->cfg.apn_type_mask & (UINT32_C(1) << i))) + continue; + vty_out(vty, " type-support %s%s", get_value_string(pdp_type_names, (UINT32_C(1) << i)), + VTY_NEWLINE); + } + + /* must be last */ + vty_out(vty, " %sshutdown%s", apn->cfg.shutdown ? "" : "no ", VTY_NEWLINE); +} + +static void config_write_ms(struct vty *vty, const struct osmocom_ms *ms) +{ + struct osmobb_apn *apn; + + vty_out(vty, "ms %s%s", ms->name, VTY_NEWLINE); + + l23_vty_config_write_ms_node_contents(vty, ms, " "); + + llist_for_each_entry(apn, &ms->gprs.apn_list, list) + config_write_apn(vty, apn); + + l23_vty_config_write_ms_node_contents_final(vty, ms, " "); +} static int config_write(struct vty *vty) { struct osmocom_ms *ms; llist_for_each_entry(ms, &ms_list, entity) - l23_vty_config_write_ms_node(vty, ms, ""); + config_write_ms(vty, ms); return CMD_SUCCESS; } @@ -45,5 +231,15 @@ install_element_ve(&l23_show_ms_cmd); install_element(CONFIG_NODE, &l23_cfg_ms_cmd); + install_element(MS_NODE, &cfg_ms_apn_cmd); + install_element(MS_NODE, &cfg_ms_no_apn_cmd); + install_node(&apn_node, NULL); + install_element(APN_NODE, &cfg_apn_tun_dev_name_cmd); + install_element(APN_NODE, &cfg_apn_tun_netns_name_cmd); + install_element(APN_NODE, &cfg_apn_no_tun_netns_name_cmd); + install_element(APN_NODE, &cfg_apn_type_support_cmd); + install_element(APN_NODE, &cfg_apn_shutdown_cmd); + install_element(APN_NODE, &cfg_apn_no_shutdown_cmd); + return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30992 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I7b4eaa0de428b418bb1d89bd544694e89beb3e6e Gerrit-Change-Number: 30992 Gerrit-PatchSet: 6 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmocom-bb[master]: layer23: Introduce APN VTY node
by pespin 23 Jan '23

23 Jan '23
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30992 ) Change subject: layer23: Introduce APN VTY node ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30992 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I7b4eaa0de428b418bb1d89bd544694e89beb3e6e Gerrit-Change-Number: 30992 Gerrit-PatchSet: 6 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Mon, 23 Jan 2023 16:37:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: Introduce tundev API
by pespin 23 Jan '23

23 Jan '23
Attention is currently required from: laforge, pespin. Hello osmith, Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/31025 to look at the new patch set (#11). Change subject: Introduce tundev API ...................................................................... Introduce tundev API The data structre is held private so that it can be easily extended in the future. Change-Id: I3463271666df1e85746fb7b06ec45a17024b8c53 --- M TODO-RELEASE M include/osmocom/core/Makefile.am A include/osmocom/core/tun.h M src/core/Makefile.am A src/core/tun.c 5 files changed, 1,010 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/25/31025/11 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31025 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3463271666df1e85746fb7b06ec45a17024b8c53 Gerrit-Change-Number: 31025 Gerrit-PatchSet: 11 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in libosmocore[master]: Introduce tundev API
by pespin 23 Jan '23

23 Jan '23
Attention is currently required from: laforge, pespin. Hello osmith, Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/31025 to look at the new patch set (#10). Change subject: Introduce tundev API ...................................................................... Introduce tundev API The data structre is held private so that it can be easily extended in the future. Change-Id: I3463271666df1e85746fb7b06ec45a17024b8c53 --- M TODO-RELEASE M include/osmocom/core/Makefile.am A include/osmocom/core/tun.h M src/core/Makefile.am A src/core/tun.c 5 files changed, 1,010 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/25/31025/10 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31025 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3463271666df1e85746fb7b06ec45a17024b8c53 Gerrit-Change-Number: 31025 Gerrit-PatchSet: 10 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in libosmocore[master]: Introduce tundev API
by osmith 23 Jan '23

23 Jan '23
Attention is currently required from: laforge, pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31025 ) Change subject: Introduce tundev API ...................................................................... Patch Set 9: (12 comments) File include/osmocom/core/tun.h: https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/032d2267_25b699d0 PS9, Line 29: const char *osmo_tundev_get_name(const struct osmo_tundev *tundev); maybe add a new line below this? given that the two functions below are about dev_name, and there's another line break before netns_name File src/core/tun.c: https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/321c2301_3ec32660 PS4, Line 238: LOGTUN(tundev, LOGL_ERROR, "Cannot obtain netns file descriptor: %s (%d)\n", > log netns_name here? (not relevant anymore in current patchset) https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/7fee7afd_ed055859 PS4, Line 245: if (tundev->netns_name) { > same condition, why is this not part of the above if-block? Done https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/8e9bd2a8_14221f54 PS4, Line 405: whien > when Done File src/core/tun.c: https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/aee4e42a_72ad18d0 PS9, Line 130: " Add "Prepare netns: " for consistency with other messages in this function? https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/5248d136_b8fee7b4 PS9, Line 184: NULL use a global talloc ctx and pass that here? https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/9bd76b93_bd734cd9 PS9, Line 233: inreface interface https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/2c704af6_a968d916 PS9, Line 284: tundev_mnl_link_state_change Maybe call it "tundev_mnl_link_on_state_change" (adding _on_)? I just read through it and was confused that there was no api call to libmnl to actually change the state before realizing that this gets called by the function below after it was changed, not to change it. https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/98fec7d2_a95c2ce0 PS9, Line 371: |= is this intentionally the same as in the if (up) case? if so, why have it in both the if and else branches? https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/596a974e_23640af6 PS9, Line 375: /* RTM_NEWLINK doesn't work either */ leftover comment? https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/4a184604_be13ca90 PS9, Line 448: status why status and not len? https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/8ab26164_c33fee79 PS9, Line 524: free open -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31025 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3463271666df1e85746fb7b06ec45a17024b8c53 Gerrit-Change-Number: 31025 Gerrit-PatchSet: 9 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 23 Jan 2023 15:46:43 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: Introduce netdev API
by pespin 23 Jan '23

23 Jan '23
pespin has abandoned this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31019 ) Change subject: Introduce netdev API ...................................................................... Abandoned This is now handled internally in tundev using netlink. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31019 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ic4ce8c37f7363e54cabd5972f7a0809e1e2d98ed Gerrit-Change-Number: 31019 Gerrit-PatchSet: 8 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-MessageType: abandon
1 0
0 0
Change in libosmocore[master]: Introduce tundev API
by pespin 23 Jan '23

23 Jan '23
Attention is currently required from: osmith, laforge, pespin. Hello osmith, Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/31025 to look at the new patch set (#9). Change subject: Introduce tundev API ...................................................................... Introduce tundev API The data structre is held private so that it can be easily extended in the future. Change-Id: I3463271666df1e85746fb7b06ec45a17024b8c53 --- M TODO-RELEASE M include/osmocom/core/Makefile.am A include/osmocom/core/tun.h M src/core/Makefile.am A src/core/tun.c 5 files changed, 917 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/25/31025/9 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31025 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3463271666df1e85746fb7b06ec45a17024b8c53 Gerrit-Change-Number: 31025 Gerrit-PatchSet: 9 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-ci[master]: jobs/master,gerrit: use minimal image for arm
by pespin 23 Jan '23

23 Jan '23
Attention is currently required from: osmith, laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/31045 ) Change subject: jobs/master,gerrit: use minimal image for arm ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/31045 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I73e62fbbf93824c0d37963039de4e00f26a43cbe Gerrit-Change-Number: 31045 Gerrit-PatchSet: 3 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Mon, 23 Jan 2023 13:53:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • ...
  • 221
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.