libosmocore[master]: vty: Fix bad use of vector_slot()
Patch Set 1: > As we already screwed up with the first attempt to merge a fix, I > would rather not want to touch this code again unless we have a > test case. Do you imply you don't want to merge this patch unless there's a test case? This new patch is not changing logic, as '\0' = 0x0 = NULL, so we should be on the safe side now to at least not add new breakage. -- To view, visit https://gerrit.osmocom.org/4672 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id9e02bbf89e0a94e1766b1efd236538712415c8a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
libosmocore[master]: vty: Fix bad use of vector_slot()
Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4672/1/src/vty/command.c File src/vty/command.c: Line 1952: the end of the line. */ > (does anyone understand what the comment is trying to say about '?' -- it's I find it really confusing too. -- To view, visit https://gerrit.osmocom.org/4672 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id9e02bbf89e0a94e1766b1efd236538712415c8a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes
[MERGED] osmo-ci[master]: osmo-deps.sh: Force fetching git tags
Pau Espin Pedrol has submitted this change and it was merged. Change subject: osmo-deps.sh: Force fetching git tags .. osmo-deps.sh: Force fetching git tags It was recently spotted, in a osmo-msc jenkins build, that an updated dependency (new commits to be fetched) contained a new tag which was not fetched with the commit. It resulted in the Makefile generating an old .version file, which ended up generating a library version in the .pc which later in the build make the configure script fail while checking at the dependencies. As far as I could understand after reading several discussion threads, it seems git fetch doesn't necessarily fetch and store locally all new tags found in the remote, and we need to explicitly add the --tags parameter to be sure all of them are downloaded. This patch adds a new fetch line instead of patching the one already present because it seems in old versions of git the --tags parameter had a different behaviour, in which only tags and not branches are fetched. This way is ensured that we get both correct regardless of git version. Change-Id: I4bfe4846959c70e435d6792a755a6f2a6f0a932c --- M scripts/osmo-deps.sh 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: lynxis lazus: Looks good to me, but someone else must approve Pau Espin Pedrol: Verified Neels Hofmeyr: Looks good to me, approved Harald Welte: Looks good to me, approved diff --git a/scripts/osmo-deps.sh b/scripts/osmo-deps.sh index d5a724b..a4afec5 100755 --- a/scripts/osmo-deps.sh +++ b/scripts/osmo-deps.sh @@ -9,6 +9,7 @@ fi cd "$project" +git fetch --tags origin git fetch origin # Cleanup should already have happened during a global osmo-clean-workspace.sh, -- To view, visit https://gerrit.osmocom.org/4718 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4bfe4846959c70e435d6792a755a6f2a6f0a932c Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus
osmo-ci[master]: osmo-deps.sh: Force fetching git tags
Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/4718 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bfe4846959c70e435d6792a755a6f2a6f0a932c Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No
[PATCH] osmo-gsm-tester[master]: Use unique incrementing value for BTS CellId
Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4706 to look at the new patch set (#3). Use unique incrementing value for BTS CellId Change-Id: If4559b945a3e71f3a36fd7ac760cb094278f6b39 --- M selftest/template_test.ok M selftest/template_test.py M selftest/template_test/osmo-nitb.cfg.tmpl M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 10 files changed, 33 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/06/4706/3 diff --git a/selftest/template_test.ok b/selftest/template_test.ok index 5bd32a4..dcfacc2 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -38,7 +38,7 @@ bts 0 type val_type_bts0 band val_band_bts0 - cell_identity 0 + cell_identity val_bts.cell_identity_bts0 location_area_code val_bts.location_area_code_bts0 training_sequence_code 7 base_station_id_code val_bts.base_station_id_code_bts0 @@ -82,7 +82,7 @@ bts 1 type val_type_bts1 band val_band_bts1 - cell_identity 0 + cell_identity val_bts.cell_identity_bts1 location_area_code val_bts.location_area_code_bts1 training_sequence_code 7 base_station_id_code val_bts.base_station_id_code_bts1 diff --git a/selftest/template_test.py b/selftest/template_test.py index 769df49..0c83632 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -22,6 +22,7 @@ 'osmobsc_bts_type': 'val_type', 'band': 'val_band', 'location_area_code': 'val_bts.location_area_code', +'cell_identity': 'val_bts.cell_identity', 'base_station_id_code': 'val_bts.base_station_id_code', 'ipa_unit_id': 'val_bts.unit_id', 'stream_id': 'val_bts.stream_id', diff --git a/selftest/template_test/osmo-nitb.cfg.tmpl b/selftest/template_test/osmo-nitb.cfg.tmpl index 2559b14..f1508ec 100644 --- a/selftest/template_test/osmo-nitb.cfg.tmpl +++ b/selftest/template_test/osmo-nitb.cfg.tmpl @@ -54,7 +54,7 @@ bts ${loop.index} type ${bts.type} band ${bts.band} - cell_identity 0 + cell_identity ${bts.cell_identity} location_area_code ${bts.location_area_code} training_sequence_code 7 base_station_id_code ${bts.base_station_id_code} diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index eb1092c..bc93a3a 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -31,6 +31,7 @@ pcu_sk_tmp_dir = None values = None lac = None +cellid = None BIN_BTS_OCTPHY = 'osmo-bts-octphy' @@ -161,6 +162,8 @@ config.overlay(values, config.get_defaults('osmo_bts_octphy')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) +if self.cellid is not None: +config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -171,4 +174,7 @@ def set_lac(self, lac): self.lac = lac +def set_cellid(self, cellid): +self.cellid = cellid + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 731daa5..a964169 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -31,6 +31,7 @@ trx = None pcu_sk_tmp_dir = None lac = None +cellid = None BIN_BTS_TRX = 'osmo-bts-trx' BIN_PCU = 'osmo-pcu' @@ -139,6 +140,8 @@ config.overlay(values, config.get_defaults('osmo_bts_trx')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) +if self.cellid is not None: +config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -149,6 +152,9 @@ def set_lac(self, lac): self.lac = lac +def set_cellid(self, cellid): +self.cellid = cellid + class OsmoTrx(log.Origin): suite_run = None run_dir = None diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 03dc97e..fc546ae 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -30,6 +30,7 @@ remote_env = None remote_dir = None lac = None +cellid = None REMOTE_DIR = '/osmo-gsm-tester' BTS_SYSMO_BIN = 'osmo-bts-sysmo' @@ -146,6 +147,8 @@ config.overlay(values, config.get_defaults('osmo_bts_sysmo')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) +if self.cellid is not None: +config.overlay(values, { 'cel
osmo-gsm-tester[master]: modem: Improve handling of errors in dbus_call_dismiss_error
Patch Set 1: > I have no idea what this is doing, but it looks like you do Yes, I did some tests and it works fine. I find it really difficult to find how to use the API of GLib/Gio in python in DBus related operations, as it seems some of the python symbols are not in /lib/python*/ but somehow magically generated/fetched from I guess C code. Fortunately I found the python API doc in https://people.gnome.org/~gcampagna/docs/Gio-2.0/index.html -- To view, visit https://gerrit.osmocom.org/4719 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I25d08c74608c3ec5c6e46c36c161e777b2ed337a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
osmo-gsm-tester[master]: Enable 2nd TRX
Patch Set 2: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/4674/2/example/defaults.conf File example/defaults.conf: Line 52:- nominal_power: 23 > Does this mean all octphy BTSs will have two TRXs configured, always? I mea It indeed means all octphy BTS will have two TRX configured always. > IOW, is it possible to add this second trx in the general bsc defaults > instead, without making all BTSs everywhere have two TRXs in their configs? It's not possible as per current implementation, because in conf_for_bsc we simply pass the overlay of all the trx_list configs, which means if one overlay level has 2 trx in the list, the final list will end up having 2 trx. It can be solved in 2 different ways: - Adding an extra "num_trx" attribute in config which specifies that only the first N trx from "trx_list" are to be used (and thus written in the config passed to the bsc). - Adding a BTS API set_num_trx() which sets self.num_trx and that is used to inficate that the first N trx from "trx_list" are to be used (and thus written in the config passed to the bsc). Actually, both are compatible. We may also want to add a BTS API to set TRX in "trx_list" from inside tests too. In any case, I'm not merging this patch for now as the octbts we have is failing to configure it. I pushed it as a showcase to continue work for later once we are able to configure the BTS with 2 TRX without failing. -- To view, visit https://gerrit.osmocom.org/4674 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7e988cb0d891c3a8da1b29a3889b5bc8edbbe1ee Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes
osmo-gsm-tester[master]: Use unique incrementing value for BTS CellId
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4706 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If4559b945a3e71f3a36fd7ac760cb094278f6b39 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
[MERGED] osmo-gsm-tester[master]: resource: Refactor next_msisdn to be more generic
Pau Espin Pedrol has submitted this change and it was merged. Change subject: resource: Refactor next_msisdn to be more generic .. resource: Refactor next_msisdn to be more generic The logic in next_msisdn can be later re-used for other purposes, such as getting different location area codes for BTS. Change-Id: Ib04a34892aacd7e71f8f5961e7339add583f73f2 --- M src/osmo_gsm_tester/resource.py 1 file changed, 17 insertions(+), 15 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 25bb00f..ecafa2f 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -38,7 +38,6 @@ USED_KEY = '_used' RESOURCES_CONF = 'resources.conf' -LAST_USED_MSISDN_FILE = 'last_used_msisdn.state' RESERVED_RESOURCES_FILE = 'reserved_resources.state' R_IP_ADDRESS = 'ip_address' @@ -189,24 +188,27 @@ if not self._remember_to_free: self.unregister_exit_handler() -def next_msisdn(self, origin): +def next_persistent_value(self, token, first_val, validate_func, inc_func, origin): origin_id = origin.origin_id() with self.state_dir.lock(origin_id): -msisdn_path = self.state_dir.child(LAST_USED_MSISDN_FILE) -log.ctx(msisdn_path) -last_msisdn = '1000' -if os.path.exists(msisdn_path): -if not os.path.isfile(msisdn_path): -raise RuntimeError('path should be a file but is not: %r' % msisdn_path) -with open(msisdn_path, 'r') as f: -last_msisdn = f.read().strip() -schema.msisdn(last_msisdn) +token_path = self.state_dir.child('last_used_%s.state' % token) +log.ctx(token_path) +last_value = first_val +if os.path.exists(token_path): +if not os.path.isfile(token_path): +raise RuntimeError('path should be a file but is not: %r' % token_path) +with open(token_path, 'r') as f: +last_value = f.read().strip() +validate_func(last_value) -next_msisdn = util.msisdn_inc(last_msisdn) -with open(msisdn_path, 'w') as f: -f.write(next_msisdn) -return next_msisdn +next_value = inc_func(last_value) +with open(token_path, 'w') as f: +f.write(next_value) +return next_value + +def next_msisdn(self, origin): +return self.next_persistent_value('msisdn', '1000', schema.msisdn, util.msisdn_inc, origin) class NoResourceExn(log.Error): -- To view, visit https://gerrit.osmocom.org/4703 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib04a34892aacd7e71f8f5961e7339add583f73f2 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[MERGED] osmo-gsm-tester[master]: Use unique incrementing value for BTS CellId
Pau Espin Pedrol has submitted this change and it was merged. Change subject: Use unique incrementing value for BTS CellId .. Use unique incrementing value for BTS CellId Change-Id: If4559b945a3e71f3a36fd7ac760cb094278f6b39 --- M selftest/template_test.ok M selftest/template_test.py M selftest/template_test/osmo-nitb.cfg.tmpl M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl M src/osmo_gsm_tester/templates/osmo-nitb.cfg.tmpl 10 files changed, 33 insertions(+), 5 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/selftest/template_test.ok b/selftest/template_test.ok index 5bd32a4..dcfacc2 100644 --- a/selftest/template_test.ok +++ b/selftest/template_test.ok @@ -38,7 +38,7 @@ bts 0 type val_type_bts0 band val_band_bts0 - cell_identity 0 + cell_identity val_bts.cell_identity_bts0 location_area_code val_bts.location_area_code_bts0 training_sequence_code 7 base_station_id_code val_bts.base_station_id_code_bts0 @@ -82,7 +82,7 @@ bts 1 type val_type_bts1 band val_band_bts1 - cell_identity 0 + cell_identity val_bts.cell_identity_bts1 location_area_code val_bts.location_area_code_bts1 training_sequence_code 7 base_station_id_code val_bts.base_station_id_code_bts1 diff --git a/selftest/template_test.py b/selftest/template_test.py index 769df49..0c83632 100755 --- a/selftest/template_test.py +++ b/selftest/template_test.py @@ -22,6 +22,7 @@ 'osmobsc_bts_type': 'val_type', 'band': 'val_band', 'location_area_code': 'val_bts.location_area_code', +'cell_identity': 'val_bts.cell_identity', 'base_station_id_code': 'val_bts.base_station_id_code', 'ipa_unit_id': 'val_bts.unit_id', 'stream_id': 'val_bts.stream_id', diff --git a/selftest/template_test/osmo-nitb.cfg.tmpl b/selftest/template_test/osmo-nitb.cfg.tmpl index 2559b14..f1508ec 100644 --- a/selftest/template_test/osmo-nitb.cfg.tmpl +++ b/selftest/template_test/osmo-nitb.cfg.tmpl @@ -54,7 +54,7 @@ bts ${loop.index} type ${bts.type} band ${bts.band} - cell_identity 0 + cell_identity ${bts.cell_identity} location_area_code ${bts.location_area_code} training_sequence_code 7 base_station_id_code ${bts.base_station_id_code} diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index eb1092c..bc93a3a 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -31,6 +31,7 @@ pcu_sk_tmp_dir = None values = None lac = None +cellid = None BIN_BTS_OCTPHY = 'osmo-bts-octphy' @@ -161,6 +162,8 @@ config.overlay(values, config.get_defaults('osmo_bts_octphy')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) +if self.cellid is not None: +config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -171,4 +174,7 @@ def set_lac(self, lac): self.lac = lac +def set_cellid(self, cellid): +self.cellid = cellid + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 731daa5..a964169 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -31,6 +31,7 @@ trx = None pcu_sk_tmp_dir = None lac = None +cellid = None BIN_BTS_TRX = 'osmo-bts-trx' BIN_PCU = 'osmo-pcu' @@ -139,6 +140,8 @@ config.overlay(values, config.get_defaults('osmo_bts_trx')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) +if self.cellid is not None: +config.overlay(values, { 'cell_identity': self.cellid }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -149,6 +152,9 @@ def set_lac(self, lac): self.lac = lac +def set_cellid(self, cellid): +self.cellid = cellid + class OsmoTrx(log.Origin): suite_run = None run_dir = None diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 03dc97e..fc546ae 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -30,6 +30,7 @@ remote_env = None remote_dir = None lac = None +cellid = None REMOTE_DIR = '/osmo-gsm-tester' BTS_SYSMO_BIN = 'osmo-bts-sysmo' @@ -146,6 +147,8 @@ config.overlay(values, config.get_defaults('osmo_bts_sysmo')) if self.lac is not None: config.overlay(values, { 'location_area_code': self.lac }) +if self.cellid is not None: +con
[MERGED] osmo-gsm-tester[master]: Use unique incrementing value for BTS LAC
Pau Espin Pedrol has submitted this change and it was merged. Change subject: Use unique incrementing value for BTS LAC .. Use unique incrementing value for BTS LAC Change-Id: I9f864bac05e39ec2fc305f774194799c3d8fe1b0 --- M example/defaults.conf M src/osmo_gsm_tester/bts_octphy.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/schema.py M src/osmo_gsm_tester/suite.py 7 files changed, 33 insertions(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/example/defaults.conf b/example/defaults.conf index e2921a4..d555ab0 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -28,7 +28,6 @@ authentication: optional bsc_bts: - location_area_code: 23 base_station_id_code: 63 stream_id: 255 osmobsc_bts_type: sysmobts diff --git a/src/osmo_gsm_tester/bts_octphy.py b/src/osmo_gsm_tester/bts_octphy.py index ae2e249..eb1092c 100644 --- a/src/osmo_gsm_tester/bts_octphy.py +++ b/src/osmo_gsm_tester/bts_octphy.py @@ -30,6 +30,7 @@ env = None pcu_sk_tmp_dir = None values = None +lac = None BIN_BTS_OCTPHY = 'osmo-bts-octphy' @@ -158,6 +159,8 @@ def conf_for_bsc(self): values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_octphy')) +if self.lac is not None: +config.overlay(values, { 'location_area_code': self.lac }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -165,4 +168,7 @@ def set_bsc(self, bsc): self.bsc = bsc +def set_lac(self, lac): +self.lac = lac + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index f53b8a3..731daa5 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -30,6 +30,7 @@ env = None trx = None pcu_sk_tmp_dir = None +lac = None BIN_BTS_TRX = 'osmo-bts-trx' BIN_PCU = 'osmo-pcu' @@ -136,6 +137,8 @@ def conf_for_bsc(self): values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_trx')) +if self.lac is not None: +config.overlay(values, { 'location_area_code': self.lac }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -143,6 +146,9 @@ def set_bsc(self, bsc): self.bsc = bsc +def set_lac(self, lac): +self.lac = lac + class OsmoTrx(log.Origin): suite_run = None run_dir = None diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index e8ac7c2..03dc97e 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -29,6 +29,7 @@ remote_inst = None remote_env = None remote_dir = None +lac = None REMOTE_DIR = '/osmo-gsm-tester' BTS_SYSMO_BIN = 'osmo-bts-sysmo' @@ -143,6 +144,8 @@ def conf_for_bsc(self): values = config.get_defaults('bsc_bts') config.overlay(values, config.get_defaults('osmo_bts_sysmo')) +if self.lac is not None: +config.overlay(values, { 'location_area_code': self.lac }) config.overlay(values, self.conf) self.dbg(conf=values) return values @@ -150,4 +153,7 @@ def set_bsc(self, bsc): self.bsc = bsc +def set_lac(self, lac): +self.lac = lac + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index ecafa2f..9571131 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -210,6 +210,8 @@ def next_msisdn(self, origin): return self.next_persistent_value('msisdn', '1000', schema.msisdn, util.msisdn_inc, origin) +def next_lac(self, origin): +return self.next_persistent_value('lac', '1', schema.uint16, lambda x: str((int(x)+1) % pow(2,16)), origin) class NoResourceExn(log.Error): pass diff --git a/src/osmo_gsm_tester/schema.py b/src/osmo_gsm_tester/schema.py index 9b142d3..a78bc63 100644 --- a/src/osmo_gsm_tester/schema.py +++ b/src/osmo_gsm_tester/schema.py @@ -71,6 +71,13 @@ if n < 0: raise ValueError('Positive value expected instead of %d' % n) +def uint16(val): +n = int(val) +if n < 0: +raise ValueError('Positive value expected instead of %d' % n) +if n > 65535: # 2^16 - 1 +raise ValueError('Value %d too big, max value is 65535' % n) + def times(val): n = int(val) if n < 1: diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 28bdd69..9f9421e 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -344,6 +344,7 @@ def bts(self, specif
osmo-gsm-tester[master]: osmo-msc: Use mgw instead of mgcpgw in cfg
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4699 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib0220c9f7f6262234712c3195dda0e076c7dd390 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
[MERGED] osmo-gsm-tester[master]: osmo-msc: Use mgw instead of mgcpgw in cfg
Pau Espin Pedrol has submitted this change and it was merged. Change subject: osmo-msc: Use mgw instead of mgcpgw in cfg .. osmo-msc: Use mgw instead of mgcpgw in cfg As of osmo-mgw 87203f2a3746d708f85ee75d978e2821bda58e6d, mgcpw commands are deprectated. Change-Id: Ib0220c9f7f6262234712c3195dda0e076c7dd390 --- M src/osmo_gsm_tester/osmo_mgcpgw.py M src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/osmo_mgcpgw.py b/src/osmo_gsm_tester/osmo_mgcpgw.py index 93c3a7c..665c151 100644 --- a/src/osmo_gsm_tester/osmo_mgcpgw.py +++ b/src/osmo_gsm_tester/osmo_mgcpgw.py @@ -81,7 +81,7 @@ return self.ip_address.get('addr') def conf_for_msc(self): -return dict(mgcpgw=dict(ip_address=self.ip_address)) +return dict(mgw=dict(ip_address=self.ip_address)) def running(self): return not self.process.terminated() diff --git a/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl index 6851ea9..9ac68b3 100644 --- a/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl @@ -20,7 +20,7 @@ cs7 instance 0 point-code 0.0.1 msc - mgcpgw remote-ip ${mgcpgw.ip_address.addr} + mgw remote-ip ${mgw.ip_address.addr} assign-tmsi cs7-instance-iu 0 cs7-instance-a 0 -- To view, visit https://gerrit.osmocom.org/4699 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib0220c9f7f6262234712c3195dda0e076c7dd390 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[MERGED] osmo-gsm-tester[master]: modem: Improve handling of errors in dbus_call_dismiss_error
Pau Espin Pedrol has submitted this change and it was merged. Change subject: modem: Improve handling of errors in dbus_call_dismiss_error .. modem: Improve handling of errors in dbus_call_dismiss_error Change-Id: I25d08c74608c3ec5c6e46c36c161e777b2ed337a --- M src/osmo_gsm_tester/modem.py 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py index e8f57cc..bff62bb 100644 --- a/src/osmo_gsm_tester/modem.py +++ b/src/osmo_gsm_tester/modem.py @@ -145,11 +145,11 @@ def dbus_call_dismiss_error(log_obj, err_str, method): try: method() -except Exception as e: -if isinstance(e, GLib.Error) and err_str in e.domain: +except GLib.Error as e: +if Gio.DBusError.is_remote_error(e) and Gio.DBusError.get_remote_error(e) == err_str: log_obj.log('Dismissed Dbus method error: %r' % e) return -raise log.Error('dbus_call_dismiss_error raised error %r' % e) +raise e class ModemDbusInteraction(log.Origin): '''Work around inconveniences specific to pydbus and ofono. -- To view, visit https://gerrit.osmocom.org/4719 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I25d08c74608c3ec5c6e46c36c161e777b2ed337a Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[MERGED] osmo-gsm-tester[master]: Rename module ofono_client as modem
Pau Espin Pedrol has submitted this change and it was merged. Change subject: Rename module ofono_client as modem .. Rename module ofono_client as modem Change-Id: I43b51ae937d87d6d4e18caea59f9366e2e28c9f2 --- R src/osmo_gsm_tester/modem.py M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/suite.py 3 files changed, 5 insertions(+), 5 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/ofono_client.py b/src/osmo_gsm_tester/modem.py similarity index 100% rename from src/osmo_gsm_tester/ofono_client.py rename to src/osmo_gsm_tester/modem.py diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 1bacd38..746aae0 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -27,7 +27,7 @@ from . import config from . import util from . import schema -from . import ofono_client +from . import modem from . import osmo_nitb from . import bts_sysmo, bts_osmotrx, bts_octphy diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index eead5af..4b33abc 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -23,7 +23,7 @@ import copy import traceback import pprint -from . import config, log, template, util, resource, schema, ofono_client, event_loop, esme, sms +from . import config, log, template, util, resource, schema, modem, event_loop, esme, sms from . import osmo_nitb from . import osmo_hlr, osmo_mgcpgw, osmo_msc, osmo_bsc, osmo_stp from . import test @@ -352,9 +352,9 @@ def modem(self, specifics=None): conf = self.reserved_resources.get(resource.R_MODEM, specifics=specifics) self.dbg('create Modem object', conf=conf) -modem = ofono_client.Modem(conf) -self.register_for_cleanup(modem) -return modem +ms = modem.Modem(conf) +self.register_for_cleanup(ms) +return ms def modems(self, count): l = [] -- To view, visit https://gerrit.osmocom.org/4709 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I43b51ae937d87d6d4e18caea59f9366e2e28c9f2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[MERGED] osmo-gsm-tester[master]: modem: Fallback to automatic registration if manual one is n...
Pau Espin Pedrol has submitted this change and it was merged. Change subject: modem: Fallback to automatic registration if manual one is not supported by modem .. modem: Fallback to automatic registration if manual one is not supported by modem Some modems such as the gobi 2000 doesn't support the Register() method in /operator path. If the method returns a NotSupported error, fallback to automatic registration. Change-Id: Ibc322317db634a5380573de88a56eb53fd92e67b --- M src/osmo_gsm_tester/modem.py 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py index bff62bb..cb4a8de 100644 --- a/src/osmo_gsm_tester/modem.py +++ b/src/osmo_gsm_tester/modem.py @@ -502,7 +502,14 @@ return dbus_op = systembus_get(matching_op_path) self.log('Registering with operator', matching_op_path, mcc_mnc) -dbus_call_dismiss_error(self, 'org.ofono.Error.InProgress', dbus_op.Register) +try: +dbus_call_dismiss_error(self, 'org.ofono.Error.InProgress', dbus_op.Register) +except GLib.Error as e: +if Gio.DBusError.is_remote_error(e) and Gio.DBusError.get_remote_error(e) == 'org.ofono.Error.NotSupported': +self.log('modem does not support manual registering, attempting automatic registering') +self.scan_cb_register_automatic(scanned_operators, mcc_mnc) +return +raise e def cancel_pending_dbus_methods(self): self.cancellable.cancel() -- To view, visit https://gerrit.osmocom.org/4720 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibc322317db634a5380573de88a56eb53fd92e67b Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[MERGED] osmo-gsm-tester[master]: test.py: Remove unused parameter ofono_client in setup()
Pau Espin Pedrol has submitted this change and it was merged. Change subject: test.py: Remove unused parameter ofono_client in setup() .. test.py: Remove unused parameter ofono_client in setup() Change-Id: Ib8983421a7ca5f94fe1363768a12fff63c1fc64a --- M src/osmo_gsm_tester/suite.py M src/osmo_gsm_tester/test.py 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index fc4930d..eead5af 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -91,7 +91,7 @@ log.large_separator(self.suite_run.trial.name(), self.suite_run.name(), self.name(), sublevel=3) self.status = Test.UNKNOWN self.start_timestamp = time.time() -test.setup(self.suite_run, self, ofono_client, sys.modules[__name__], event_loop, sms) +test.setup(self.suite_run, self, sys.modules[__name__], event_loop, sms) with self.redirect_stdout(): util.run_python_file('%s.%s' % (self.suite_run.definition.name(), self.basename), self.path) diff --git a/src/osmo_gsm_tester/test.py b/src/osmo_gsm_tester/test.py index 49911b3..b939054 100644 --- a/src/osmo_gsm_tester/test.py +++ b/src/osmo_gsm_tester/test.py @@ -35,7 +35,7 @@ Timeout = None Sms = None -def setup(suite_run, _test, ofono_client, suite_module, event_module, sms_module): +def setup(suite_run, _test, suite_module, event_module, sms_module): global trial, suite, test, resources, log, dbg, err, wait, wait_no_raise, sleep, poll, prompt, Timeout, Sms trial = suite_run.trial suite = suite_run -- To view, visit https://gerrit.osmocom.org/4708 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib8983421a7ca5f94fe1363768a12fff63c1fc64a Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
osmocom-bb[master]: mobile/gsm322.c: replace memset() by simple for-loop
Patch Set 2: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/4645/2/src/host/layer23/src/mobile/gsm322.c File src/host/layer23/src/mobile/gsm322.c: Line 326: for (i = 0; i < value && i < sizeof(bar) - 1; i++) > you could just as well simply compute the length of the interval as a posit The main idea of this commit was to avoid a compiler warning related to possibility of calling memset with zero length argument, but seems I went a long way ;) I just found out a bit different way of solving this issue, so this change will be updated soon. -- To view, visit https://gerrit.osmocom.org/4645 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes
[PATCH] osmocom-bb[master]: mobile/gsm322.c: prevent calling memset() with zero length
Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4645 to look at the new patch set (#3). mobile/gsm322.c: prevent calling memset() with zero length This change prevents a possibility of calling memset() with constant zero length parameter, and the corresponding compiler warning. Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a --- M src/host/layer23/src/mobile/gsm322.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/45/4645/3 diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index ad6a83b..887a0ee 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -322,6 +322,10 @@ else value -= min; + /* Prevent calling memset() with zero length */ + if (value == 0) + return ""; + memset(bar, '=', value); bar[value] = '\0'; -- To view, visit https://gerrit.osmocom.org/4645 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy
[PATCH] osmocom-bb[master]: mobile/gsm322.c: prevent buffer over-/under-run
Review at https://gerrit.osmocom.org/4729 mobile/gsm322.c: prevent buffer over-/under-run Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 --- M src/host/layer23/src/mobile/gsm322.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/29/4729/1 diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index 887a0ee..b1e0362 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -322,6 +322,9 @@ else value -= min; + /* Prevent 'bar' buffer over-/under-run */ + OSMO_ASSERT(value > 0 && value < 128); + /* Prevent calling memset() with zero length */ if (value == 0) return ""; -- To view, visit https://gerrit.osmocom.org/4729 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy
[ABANDON] osmocom-bb[master]: host/mobile: use osmocom_ms as talloc context
Vadim Yanitskiy has abandoned this change. Change subject: host/mobile: use osmocom_ms as talloc context .. Abandoned -- To view, visit https://gerrit.osmocom.org/2668 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I0d5fcbdd77fe41d78cfe54731dd2ebfc4171f62c Gerrit-PatchSet: 5 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy
[PATCH] osmocom-bb[master]: host/mobile: use osmocom_ms as talloc context
Review at https://gerrit.osmocom.org/4730 host/mobile: use osmocom_ms as talloc context As we use talloc, it's absurdly not to use the main feature of the library - hierarchical memory management. This change sets talloc context of all sub-allocated objects to related osmocom_ms instance. So, as soon as osmocom_ms instance is destroyed, all sub-allocated chunks are getting destroyed too. Change-Id: I6433d6e92d20a1a8e4944a758b26ebb48730866e --- M src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h M src/host/layer23/src/common/sim.c M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/gsm322.c M src/host/layer23/src/mobile/gsm48_cc.c M src/host/layer23/src/mobile/mncc_sock.c M src/host/layer23/src/mobile/mnccms.c M src/host/layer23/src/mobile/subscriber.c M src/host/layer23/src/mobile/transaction.c M src/host/layer23/src/mobile/vty_interface.c 10 files changed, 23 insertions(+), 35 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/30/4730/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h b/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h index b38c5bc..9116ea3 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h +++ b/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h @@ -10,7 +10,7 @@ int mncc_sock_from_cc(struct mncc_sock_state *state, struct msgb *msg); void mncc_sock_write_pending(struct mncc_sock_state *state); -struct mncc_sock_state *mncc_sock_init(void *inst, const char *name, void *tall_ctx); +struct mncc_sock_state *mncc_sock_init(void *inst, const char *name); void mncc_sock_exit(struct mncc_sock_state *state); #endif /* _MNCC_SOCK_H */ diff --git a/src/host/layer23/src/common/sim.c b/src/host/layer23/src/common/sim.c index 9aad966..c2d6033 100644 --- a/src/host/layer23/src/common/sim.c +++ b/src/host/layer23/src/common/sim.c @@ -29,7 +29,6 @@ #include #include -extern void *l23_ctx; static int sim_process_job(struct osmocom_ms *ms); /* @@ -1181,7 +1180,7 @@ struct gsm_sim_handler *handler; /* create handler and attach */ - handler = talloc_zero(l23_ctx, struct gsm_sim_handler); + handler = talloc_zero(ms, struct gsm_sim_handler); if (!handler) return 0; handler->handle = new_handle++; diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 9dbae7c..bd786b5 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -273,7 +273,7 @@ mncc_name = talloc_asprintf(ms, "/tmp/ms_mncc_%s", ms->name); ms->mncc_entity.mncc_recv = mncc_recv_app; - ms->mncc_entity.sock_state = mncc_sock_init(ms, mncc_name, l23_ctx); + ms->mncc_entity.sock_state = mncc_sock_init(ms, mncc_name); talloc_free(mncc_name); } else if (ms->settings.ch_cap == GSM_CAP_SDCCH) diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index ad6a83b..8311a44 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -45,8 +45,6 @@ const char *ba_version = "osmocom BA V1\n"; -extern void *l23_ctx; - static void gsm322_cs_timeout(void *arg); static int gsm322_cs_select(struct osmocom_ms *ms, int index, uint16_t mcc, uint16_t mnc, int any); @@ -560,7 +558,7 @@ LOGP(DPLMN, LOGL_INFO, "Add to list of forbidden LAs " "(mcc=%s, mnc=%s, lac=%04x)\n", gsm_print_mcc(mcc), gsm_print_mnc(mnc), lac); - la = talloc_zero(l23_ctx, struct gsm322_la_list); + la = talloc_zero(ms, struct gsm322_la_list); if (!la) return -ENOMEM; la->mcc = mcc; @@ -905,7 +903,7 @@ if (cs->list[i].rxlev > found->rxlev) found->rxlev = cs->list[i].rxlev; } else { - temp = talloc_zero(l23_ctx, struct gsm322_plmn_list); + temp = talloc_zero(ms, struct gsm322_plmn_list); if (!temp) return -ENOMEM; temp->mcc = cs->list[i].sysinfo->mcc; @@ -2153,7 +2151,7 @@ cs->arfcn = cs->sel_arfcn; cs->arfci = arfcn2index(cs->arfcn); if (!cs->list[cs->arfci].sysinfo) - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, + cs->list[cs->arfci].sysinfo = talloc_zero(ms, struct gsm48_sysinfo); if (!cs->list[cs->arfci].sysinfo) exit(-ENOMEM); @@ -2260,7 +2258,7 @@ memset(cs->list[cs->arfci].sysinfo, 0, sizeof(struct gsm48_sysinfo)); else - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, + cs->list[cs->arfci].sysinfo = tal
[ABANDON] osmocom-bb[master]: host/mobile: use osmocom_ms as talloc context
Vadim Yanitskiy has abandoned this change. Change subject: host/mobile: use osmocom_ms as talloc context .. Abandoned -- To view, visit https://gerrit.osmocom.org/4730 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I6433d6e92d20a1a8e4944a758b26ebb48730866e Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder
[PATCH] osmocom-bb[master]: host/mobile: use osmocom_ms as talloc context
Review at https://gerrit.osmocom.org/4731 host/mobile: use osmocom_ms as talloc context As we use talloc, it's absurdly not to use the main feature of the library - hierarchical memory management. This change sets talloc context of all sub-allocated objects to related osmocom_ms instance. So, as soon as osmocom_ms instance is destroyed, all sub-allocated chunks are getting destroyed too. Change-Id: I6e3467ff739f3e6dc8dd60cc6d1fcd3f8e490ce9 --- M src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h M src/host/layer23/src/common/sim.c M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/gsm322.c M src/host/layer23/src/mobile/gsm48_cc.c M src/host/layer23/src/mobile/mncc_sock.c M src/host/layer23/src/mobile/mnccms.c M src/host/layer23/src/mobile/subscriber.c M src/host/layer23/src/mobile/transaction.c M src/host/layer23/src/mobile/vty_interface.c 10 files changed, 23 insertions(+), 35 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/31/4731/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h b/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h index b38c5bc..9116ea3 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h +++ b/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h @@ -10,7 +10,7 @@ int mncc_sock_from_cc(struct mncc_sock_state *state, struct msgb *msg); void mncc_sock_write_pending(struct mncc_sock_state *state); -struct mncc_sock_state *mncc_sock_init(void *inst, const char *name, void *tall_ctx); +struct mncc_sock_state *mncc_sock_init(void *inst, const char *name); void mncc_sock_exit(struct mncc_sock_state *state); #endif /* _MNCC_SOCK_H */ diff --git a/src/host/layer23/src/common/sim.c b/src/host/layer23/src/common/sim.c index 9aad966..c2d6033 100644 --- a/src/host/layer23/src/common/sim.c +++ b/src/host/layer23/src/common/sim.c @@ -29,7 +29,6 @@ #include #include -extern void *l23_ctx; static int sim_process_job(struct osmocom_ms *ms); /* @@ -1181,7 +1180,7 @@ struct gsm_sim_handler *handler; /* create handler and attach */ - handler = talloc_zero(l23_ctx, struct gsm_sim_handler); + handler = talloc_zero(ms, struct gsm_sim_handler); if (!handler) return 0; handler->handle = new_handle++; diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 9dbae7c..bd786b5 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -273,7 +273,7 @@ mncc_name = talloc_asprintf(ms, "/tmp/ms_mncc_%s", ms->name); ms->mncc_entity.mncc_recv = mncc_recv_app; - ms->mncc_entity.sock_state = mncc_sock_init(ms, mncc_name, l23_ctx); + ms->mncc_entity.sock_state = mncc_sock_init(ms, mncc_name); talloc_free(mncc_name); } else if (ms->settings.ch_cap == GSM_CAP_SDCCH) diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index ad6a83b..8311a44 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -45,8 +45,6 @@ const char *ba_version = "osmocom BA V1\n"; -extern void *l23_ctx; - static void gsm322_cs_timeout(void *arg); static int gsm322_cs_select(struct osmocom_ms *ms, int index, uint16_t mcc, uint16_t mnc, int any); @@ -560,7 +558,7 @@ LOGP(DPLMN, LOGL_INFO, "Add to list of forbidden LAs " "(mcc=%s, mnc=%s, lac=%04x)\n", gsm_print_mcc(mcc), gsm_print_mnc(mnc), lac); - la = talloc_zero(l23_ctx, struct gsm322_la_list); + la = talloc_zero(ms, struct gsm322_la_list); if (!la) return -ENOMEM; la->mcc = mcc; @@ -905,7 +903,7 @@ if (cs->list[i].rxlev > found->rxlev) found->rxlev = cs->list[i].rxlev; } else { - temp = talloc_zero(l23_ctx, struct gsm322_plmn_list); + temp = talloc_zero(ms, struct gsm322_plmn_list); if (!temp) return -ENOMEM; temp->mcc = cs->list[i].sysinfo->mcc; @@ -2153,7 +2151,7 @@ cs->arfcn = cs->sel_arfcn; cs->arfci = arfcn2index(cs->arfcn); if (!cs->list[cs->arfci].sysinfo) - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, + cs->list[cs->arfci].sysinfo = talloc_zero(ms, struct gsm48_sysinfo); if (!cs->list[cs->arfci].sysinfo) exit(-ENOMEM); @@ -2260,7 +2258,7 @@ memset(cs->list[cs->arfci].sysinfo, 0, sizeof(struct gsm48_sysinfo)); else - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, + cs->list[cs->arfci].sysinfo = tal
[PATCH] osmo-bsc[master]: doc: add example configuration for osmo-mgw
Review at https://gerrit.osmocom.org/4732 doc: add example configuration for osmo-mgw osmo-bsc now uses osmo-mgw to switch the RTP streams, but there is no example configuration yet. Add the missing example configuration. Change-Id: I4d4ed401bee6c3dfdec2b584bf7248ffb02bddbf --- M doc/examples/osmo-bsc/osmo-bsc.cfg 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/32/4732/1 diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index efa27ec..82d0ea1 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -102,6 +102,9 @@ amr-config 5_90k allowed amr-config 5_15k forbidden amr-config 4_75k forbidden + mgcpgw remote-ip 127.0.0.1 + mgcpgw remote-port 2428 + mgcpgw endpoint-range 1 31 bsc mid-call-timeout 0 no missing-msc-text -- To view, visit https://gerrit.osmocom.org/4732 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4d4ed401bee6c3dfdec2b584bf7248ffb02bddbf Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter
osmo-bsc[master]: doc: add example configuration for osmo-mgw
Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/4732/1/doc/examples/osmo-bsc/osmo-bsc.cfg File doc/examples/osmo-bsc/osmo-bsc.cfg: Line 105: mgcpgw remote-ip 127.0.0.1 Deprecated, better use "mgw". -- To view, visit https://gerrit.osmocom.org/4732 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4d4ed401bee6c3dfdec2b584bf7248ffb02bddbf Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes
[PATCH] osmocom-bb[master]: mobile: Do not exclude DGPS from the list of default categories
Review at https://gerrit.osmocom.org/4733 mobile: Do not exclude DGPS from the list of default categories I don't remember why we parse the categories like this. First if the mobile doesn't use a subsystem there is no harm to have it enabled, second the default levels can be adjusted for all apps and third we have the VTY to reconfigure these logging targets. Change-Id: Ia874b7ed127026b8395072a3bac2aed9944b1cce --- M src/host/layer23/src/mobile/main.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/33/4733/1 diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 997e2d5..91ed341 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -70,7 +70,7 @@ const char *debug_default = - "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP"; + "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS"; const char *openbsc_copyright = "Copyright (C) 2010-2015 Andreas Eversberg, Sylvain Munaut, Holger Freyther, Harald Welte\n" -- To view, visit https://gerrit.osmocom.org/4733 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia874b7ed127026b8395072a3bac2aed9944b1cce Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther
[PATCH] osmocom-bb[master]: mobile: Make VTY logging commands available to the mobile app
Review at https://gerrit.osmocom.org/4734 mobile: Make VTY logging commands available to the mobile app So far logging_vty_add_cmds wasn't called. The main.c might be shared with other apps so place it into the routine that is setting up the VTY. Change-Id: I3db9cf288bce12f51e36caad44e9bc34094638f4 --- M src/host/layer23/src/mobile/app_mobile.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/34/4734/1 diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 9dbae7c..ba5315f 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -398,6 +399,7 @@ vty_info.tall_ctx = l23_ctx; vty_init(&vty_info); + logging_vty_add_cmds(NULL); ms_vty_init(); dummy_conn.priv = NULL; vty_reading = 1; -- To view, visit https://gerrit.osmocom.org/4734 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3db9cf288bce12f51e36caad44e9bc34094638f4 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther
[PATCH] osmocom-bb[master]: mobile: Search for lua5.3 and link to it
Review at https://gerrit.osmocom.org/4735 mobile: Search for lua5.3 and link to it I will be adding a high-level async scripting interface to the mobile application. The initial implementation will use Lua 5.3. This version was released in January 2015 and is the latest version at the time the commit was made. Lua as extension and extensible language seems well suited for scripting. The plan is to attach a script to a ms and be able to trigger high level operations (send SMS, attach to network, detach). Change-Id: Ic649e49a22c878585a6c20b5b80108909f2374eb --- M src/host/layer23/configure.ac M src/host/layer23/src/mobile/Makefile.am 2 files changed, 9 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/35/4735/1 diff --git a/src/host/layer23/configure.ac b/src/host/layer23/configure.ac index de26d23..a5938c7 100644 --- a/src/host/layer23/configure.ac +++ b/src/host/layer23/configure.ac @@ -21,6 +21,13 @@ AC_SUBST([LIBGPS_LIBS]) +dnl optional dependencies +PKG_CHECK_MODULES(LIBLUA, lua53, [ + WITH_LUA=1], [ + WITH_LUA=0]) +AC_SUBST([WITH_LUA]) +AM_CONDITIONAL([BUILD_LUA], test "x$WITH_LUA" = "x1") + dnl checks for header files AC_HEADER_STDC diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index 04dd025..70f7aed 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBGPS_CFLAGS) -LDADD = ../common/liblayer23.a $(LIBOSMOCORE_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) $(LIBGPS_LIBS) +AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBGPS_CFLAGS) $(LIBLUA_CFLAGS) +LDADD = ../common/liblayer23.a $(LIBOSMOCORE_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) $(LIBGPS_LIBS) $(LIBLUA_LIBS) noinst_LIBRARIES = libmobile.a libmobile_a_SOURCES = gsm322.c gsm480_ss.c gsm411_sms.c gsm48_cc.c gsm48_mm.c \ -- To view, visit https://gerrit.osmocom.org/4735 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic649e49a22c878585a6c20b5b80108909f2374eb Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther
[PATCH] osmocom-bb[master]: mobile: Add LUA as debug category to the applications
Review at https://gerrit.osmocom.org/4736 mobile: Add LUA as debug category to the applications Change-Id: Id2d266c48d30c06dfdc3b8c84d875038b43f2ad8 --- M src/host/layer23/include/osmocom/bb/common/logging.h M src/host/layer23/src/common/logging.c M src/host/layer23/src/mobile/main.c 3 files changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/36/4736/1 diff --git a/src/host/layer23/include/osmocom/bb/common/logging.h b/src/host/layer23/include/osmocom/bb/common/logging.h index 3efa57a..e96bdc0 100644 --- a/src/host/layer23/include/osmocom/bb/common/logging.h +++ b/src/host/layer23/include/osmocom/bb/common/logging.h @@ -22,6 +22,7 @@ DSUM, DSIM, DGPS, + DLUA, }; extern const struct log_info log_info; diff --git a/src/host/layer23/src/common/logging.c b/src/host/layer23/src/common/logging.c index d8fd076..ce3af2c 100644 --- a/src/host/layer23/src/common/logging.c +++ b/src/host/layer23/src/common/logging.c @@ -127,6 +127,12 @@ .color = "\033[1;35m", .enabled = 1, .loglevel = LOGL_DEBUG, }, + [DLUA] = { + .name = "DLUA", + .description = "LUA", + .color = "\033[1;32m", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, }; const struct log_info log_info = { diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 91ed341..848be6e 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -70,7 +70,7 @@ const char *debug_default = - "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS"; + "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DLUA"; const char *openbsc_copyright = "Copyright (C) 2010-2015 Andreas Eversberg, Sylvain Munaut, Holger Freyther, Harald Welte\n" -- To view, visit https://gerrit.osmocom.org/4736 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id2d266c48d30c06dfdc3b8c84d875038b43f2ad8 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther
[PATCH] osmocom-bb[master]: mobile: Add initial support for scripting support
Review at https://gerrit.osmocom.org/4737 mobile: Add initial support for scripting support Right now the script will be executed once it is loaded. Make sure to write it into the config file last. Expose various log commands for logging. Jump through some hoops and get the filename and line number from lua. Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 --- M src/host/layer23/include/osmocom/bb/common/osmocom_data.h M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h M src/host/layer23/src/mobile/Makefile.am A src/host/layer23/src/mobile/script_lua.c A src/host/layer23/src/mobile/script_nolua.c M src/host/layer23/src/mobile/vty_interface.c 6 files changed, 223 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/37/4737/1 diff --git a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h index 9b544ab..ed05a8b 100644 --- a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h +++ b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h @@ -77,6 +77,9 @@ struct gsm48_cclayer cclayer; struct osmomncc_entity mncc_entity; struct llist_head trans_list; + + void *lua_state; + char *lua_script; }; enum osmobb_sig_subsys { diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h index 6162a38..69a49b3 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h +++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h @@ -13,5 +13,8 @@ int mobile_exit(struct osmocom_ms *ms, int force); int mobile_work(struct osmocom_ms *ms); +int script_lua_load(struct vty *vty, struct osmocom_ms *ms, const char *filename); +int script_lua_close(struct vty *vty, struct osmocom_ms *ms); + #endif diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index 70f7aed..50ced6c 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -12,4 +12,10 @@ mobile_SOURCES = main.c app_mobile.c mobile_LDADD = libmobile.a $(LDADD) - +# lua support +if BUILD_LUA +AM_CPPFLAGS += -DWITH_LUA=1 +libmobile_a_SOURCES += script_lua.c +else +libmobile_a_SOURCES += script_nolua.c +endif diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c new file mode 100644 index 000..1cf9050 --- /dev/null +++ b/src/host/layer23/src/mobile/script_lua.c @@ -0,0 +1,146 @@ +/* (C) 2017 by Holger Hans Peter Freyther + * + * 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. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include +#include + +#include +#include + +#include + +static int lua_osmo_do_log(lua_State *L, int loglevel) +{ + int argc = lua_gettop(L); + lua_Debug ar = { 0, }; + int i; + + lua_getstack(L, 1, &ar); + lua_getinfo(L, "nSl", &ar); + + for (i = 1; i <= argc; ++i) { + if (!lua_isstring(L, i)) + continue; + LOGPSRC(DLUA, loglevel, ar.source, ar.currentline, + "%s%s", i > 1 ? "\t" : "", lua_tostring(L, i)); + } + LOGPC(DLUA, loglevel, "\n"); + return 0; +} + +static int lua_osmo_print(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_NOTICE); +} + +static int lua_osmo_debug(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_DEBUG); +} + +static int lua_osmo_error(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_ERROR); +} + +static int lua_osmo_fatal(lua_State *L) +{ + return lua_osmo_do_log(L, LOGL_FATAL); +} + +static const struct luaL_Reg global_runtime[] = { + { "print", lua_osmo_print }, + { "log_notice", lua_osmo_print }, + { "log_debug", lua_osmo_debug }, + { "log_error", lua_osmo_error }, + { "log_fatal", lua_osmo_fatal }, + { NULL, NULL }, +}; + +/* + * Add functions to the global lua scope. Technically these are + * included in the _G table. The following lua code can be used + * to inspect it. + * + * > for n in pairs(_G) do print(n) end + */ +static void add_globals(lua_State *state) +{ + lua_getglobal(state, "_G"); + luaL_setfuncs(state, global_runtime, 0); +
[PATCH] osmo-mgw[master]: cosmetic: remove prefix "net" from rtp related vty commands
Review at https://gerrit.osmocom.org/4738 cosmetic: remove prefix "net" from rtp related vty commands There the prefix "net" is a leftover from the time when there was a bts and a net side. Now we do not distinguish anymore between the two. remove prefix "net" Change-Id: Id627e2ef6f725979ed52a585ca09686e1a049adf --- M src/libosmo-mgcp/mgcp_vty.c 1 file changed, 14 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/38/4738/1 diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 7ff1fdd..2c8c6cc 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -67,11 +67,11 @@ vty_out(vty, " local ip %s%s", g_cfg->local_ip, VTY_NEWLINE); vty_out(vty, " bind ip %s%s", g_cfg->source_addr, VTY_NEWLINE); vty_out(vty, " bind port %u%s", g_cfg->source_port, VTY_NEWLINE); - vty_out(vty, " rtp net-range %u %u%s", + vty_out(vty, " rtp port-range %u %u%s", g_cfg->net_ports.range_start, g_cfg->net_ports.range_end, VTY_NEWLINE); if (g_cfg->net_ports.bind_addr) - vty_out(vty, " rtp net-bind-ip %s%s", + vty_out(vty, " rtp bind-ip %s%s", g_cfg->net_ports.bind_addr, VTY_NEWLINE); if (g_cfg->net_ports.bind_addr_probe) vty_out(vty, " rtp ip-probing%s", VTY_NEWLINE); @@ -292,9 +292,9 @@ #define RANGE_START_STR "Start of the range of ports\n" #define RANGE_END_STR "End of the range of ports\n" -DEFUN(cfg_mgcp_rtp_net_range, - cfg_mgcp_rtp_net_range_cmd, - "rtp net-range <0-65534> <0-65534>", +DEFUN(cfg_mgcp_rtp_port_range, + cfg_mgcp_rtp_port_range_cmd, + "rtp port-range <0-65534> <0-65534>", RTP_STR "Range of ports to use for the NET side\n" RANGE_START_STR RANGE_END_STR) { @@ -302,18 +302,18 @@ return CMD_SUCCESS; } -DEFUN(cfg_mgcp_rtp_net_bind_ip, - cfg_mgcp_rtp_net_bind_ip_cmd, - "rtp net-bind-ip A.B.C.D", +DEFUN(cfg_mgcp_rtp_bind_ip, + cfg_mgcp_rtp_bind_ip_cmd, + "rtp bind-ip A.B.C.D", RTP_STR "Bind endpoints facing the Network\n" "Address to bind to\n") { osmo_talloc_replace_string(g_cfg, &g_cfg->net_ports.bind_addr, argv[0]); return CMD_SUCCESS; } -DEFUN(cfg_mgcp_rtp_no_net_bind_ip, - cfg_mgcp_rtp_no_net_bind_ip_cmd, - "no rtp net-bind-ip", +DEFUN(cfg_mgcp_rtp_no_bind_ip, + cfg_mgcp_rtp_no_bind_ip_cmd, + "no rtp bind-ip", NO_STR RTP_STR "Bind endpoints facing the Network\n" "Address to bind to\n") { @@ -1180,9 +1180,9 @@ install_element(MGCP_NODE, &cfg_mgcp_bind_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_bind_port_cmd); install_element(MGCP_NODE, &cfg_mgcp_bind_early_cmd); - install_element(MGCP_NODE, &cfg_mgcp_rtp_net_range_cmd); - install_element(MGCP_NODE, &cfg_mgcp_rtp_net_bind_ip_cmd); - install_element(MGCP_NODE, &cfg_mgcp_rtp_no_net_bind_ip_cmd); + install_element(MGCP_NODE, &cfg_mgcp_rtp_port_range_cmd); + install_element(MGCP_NODE, &cfg_mgcp_rtp_bind_ip_cmd); + install_element(MGCP_NODE, &cfg_mgcp_rtp_no_bind_ip_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_net_bind_ip_probing_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_no_net_bind_ip_probing_cmd); install_element(MGCP_NODE, &cfg_mgcp_rtp_ip_dscp_cmd); -- To view, visit https://gerrit.osmocom.org/4738 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id627e2ef6f725979ed52a585ca09686e1a049adf Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter
[PATCH] osmo-mgw[master]: doc: update sample config file
Review at https://gerrit.osmocom.org/4739 doc: update sample config file The current example configuration is out of date. Add a recent configuration file Change-Id: Iad2034ce4c68bb8b70cb72d3978d2a0f685bbe19 --- M doc/examples/osmo-mgw/osmo-mgw.cfg 1 file changed, 14 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/39/4739/1 diff --git a/doc/examples/osmo-mgw/osmo-mgw.cfg b/doc/examples/osmo-mgw/osmo-mgw.cfg index d8ea3a5..3057369 100644 --- a/doc/examples/osmo-mgw/osmo-mgw.cfg +++ b/doc/examples/osmo-mgw/osmo-mgw.cfg @@ -2,12 +2,17 @@ ! MGCP configuration example ! mgcp - !local ip 10.23.24.2 - !bts ip 10.24.24.1 - !bind ip 10.23.24.1 - bind port 2427 - rtp force-ptime 20 - sdp audio payload number 98 - sdp audio payload name AMR/8000 - number endpoints 31 - no rtcp-omit + bind ip 127.0.0.1 + rtp port-range 4002 16000 + rtp bind-ip 10.9.1.122 + rtp ip-probing + rtp ip-tos 184 + bind port 2427 + sdp audio payload number 98 + sdp audio payload name GSM + number endpoints 31 + loop 0 + force-realloc 1 + rtcp-omit + rtp-patch ssrc + rtp-patch timestamp -- To view, visit https://gerrit.osmocom.org/4739 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad2034ce4c68bb8b70cb72d3978d2a0f685bbe19 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter
[PATCH] osmo-bts[master]: l1sap: Fix abort on big RTP packet received
Review at https://gerrit.osmocom.org/4740 l1sap: Fix abort on big RTP packet received Recently while testing new osmo-mgw, big RTP packets (around 4K bytes, see OS#2625 for more info), were being received on the BTS, which was aborting with the following message: "msgb(0xff208): Not enough tailroom msgb_put (348 < 1488)" The crash can be reproduced in a sysmobts as well as on my PC locally with osmo-bts-trx. I used osmo-bts-trx to test that the patch solved the abort. Fixes: OS#2624 Change-Id: Idfde1dacc3dc3d3d5e239cf1f7e39ade7fc25975 --- M src/common/l1sap.c 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/40/4740/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index ebcfd2f..c388c82 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -117,7 +117,9 @@ * in front and behind data pointer */ struct msgb *l1sap_msgb_alloc(unsigned int l2_len) { - struct msgb *msg = msgb_alloc_headroom(512, 128, "l1sap_prim"); + int headroom = 128; + int size = headroom + sizeof(struct osmo_phsap_prim) + l2_len; + struct msgb *msg = msgb_alloc_headroom(size, headroom, "l1sap_prim"); if (!msg) return NULL; -- To view, visit https://gerrit.osmocom.org/4740 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idfde1dacc3dc3d3d5e239cf1f7e39ade7fc25975 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol
[PATCH] osmo-mgw[master]: network: fix rtp packet length
Review at https://gerrit.osmocom.org/4741 network: fix rtp packet length When sending rtp packets sizeof(buf) is used as length. This causes all RTP packets to be the size of the buffer (4096) containing the rtp payload and random excess data from previoes memory usage Use the actual length of the received RTP data, rather then the full buffer size. Change-Id: I47a15701f9a7e7a492df183b67ec971f5be61069 --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/41/4741/1 diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 7876b33..28d1fed 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -1054,7 +1054,7 @@ char buf[RTP_BUF_SIZE]; int proto; - int rc; + int len; conn_src = (struct mgcp_conn_rtp *)fd->data; OSMO_ASSERT(conn_src); @@ -1065,20 +1065,20 @@ ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn_src->conn)); /* Receive packet */ - rc = mgcp_recv(&proto, &addr, buf, sizeof(buf), fd); - if (rc < 0) + len = mgcp_recv(&proto, &addr, buf, sizeof(buf), fd); + if (len < 0) return -1; /* Check if the connection is in loopback mode, if yes, just send the * incoming data back to the origin */ if (conn_src->conn->mode == MGCP_CONN_LOOPBACK) { return mgcp_send_rtp(proto, &addr, buf, -sizeof(buf), conn_src, conn_src); +len, conn_src, conn_src); } /* Execute endpoint specific implementation that handles the * dispatching of the RTP data */ - return endp->type->dispatch_rtp_cb(proto, &addr, buf, sizeof(buf), + return endp->type->dispatch_rtp_cb(proto, &addr, buf, len, conn_src->conn); } -- To view, visit https://gerrit.osmocom.org/4741 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I47a15701f9a7e7a492df183b67ec971f5be61069 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter
osmo-mgw[master]: network: fix rtp packet length
Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/4741/1//COMMIT_MSG Commit Message: Line 11: rtp payload and random excess data from previoes memory usage previoes->previous -- To view, visit https://gerrit.osmocom.org/4741 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I47a15701f9a7e7a492df183b67ec971f5be61069 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: Yes
osmo-mgw[master]: network: fix rtp packet length
Patch Set 1: I tested this patch in my setup which showed the issue, and after applying the patch the issue is gone -> it works. -- To view, visit https://gerrit.osmocom.org/4741 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I47a15701f9a7e7a492df183b67ec971f5be61069 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
[PATCH] osmo-bsc[master]: cosmetic: remove distracting newline
Review at https://gerrit.osmocom.org/4742 cosmetic: remove distracting newline Change-Id: Iedc883b0f5760f004c51d7cf15328eb8c4d472db --- M include/osmocom/bsc/osmo_bsc_mgcp.h 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/42/4742/1 diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h b/include/osmocom/bsc/osmo_bsc_mgcp.h index ddcba0f..dd26d40 100644 --- a/include/osmocom/bsc/osmo_bsc_mgcp.h +++ b/include/osmocom/bsc/osmo_bsc_mgcp.h @@ -31,7 +31,6 @@ /* Copy of the pointer and the data with context information * needed to process the AoIP and MGCP requests (system data) */ struct mgcp_client *mgcp; - struct osmo_bsc_sccp_con *conn; enum gsm48_chan_mode chan_mode; bool full_rate; -- To view, visit https://gerrit.osmocom.org/4742 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iedc883b0f5760f004c51d7cf15328eb8c4d472db Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter
[PATCH] osmo-bsc[master]: mgcp: remove unused variable
Review at https://gerrit.osmocom.org/4746 mgcp: remove unused variable The function handle_error asserts mgcp_ctx->conn to be non null, but it does not access it otherwise. remove unused variable conn Change-Id: I09851c957395d1ddb2f9471b99ffc091bc250404 --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/46/4746/1 diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index aa008a8..f0c31df 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -151,12 +151,8 @@ static void handle_error(struct mgcp_ctx *mgcp_ctx, enum int_cause_code cause) { struct osmo_fsm_inst *fi; - struct osmo_bsc_sccp_con *conn; OSMO_ASSERT(mgcp_ctx); - conn = mgcp_ctx->conn; - OSMO_ASSERT(conn); - fi = mgcp_ctx->fsm; OSMO_ASSERT(fi); -- To view, visit https://gerrit.osmocom.org/4746 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I09851c957395d1ddb2f9471b99ffc091bc250404 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter
[PATCH] osmo-bsc[master]: cosmetic: replace term MGCP-GW with MGW
Review at https://gerrit.osmocom.org/4744 cosmetic: replace term MGCP-GW with MGW The term MGCP-GW is deprecated, use now MGW Change-Id: Ibccda7e95c42267ce5f44e9fc4256a0083b6f68f --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/44/4744/1 diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index f4acc39..3115422 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -469,7 +469,7 @@ /* Currently we only have support for IPv4 in our MGCP software, the * AoIP part is ready to support IPv6 in theory, because the IE * parser/generator uses sockaddr_storage for the AoIP transport -* identifier. However, the MGCP-GW does not support IPv6 yet. This is +* identifier. However, the MGW does not support IPv6 yet. This is * why we stop here in case some MSC tries to signal IPv6 AoIP * transport identifiers */ if (conn->aoip_rtp_addr_remote.ss_family != AF_INET) { @@ -872,7 +872,7 @@ mgcp_ctx->resp = NULL; if (fi->T == MGCP_MGW_TIMEOUT_TIMER_NR) { - /* Note: We were unable to communicate with the MGCP-GW, + /* Note: We were unable to communicate with the MGW, * unfortunately there is no meaningful action we can take * now other than giving up. */ LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "graceful teardown not possible, terminating...\n"); @@ -886,7 +886,7 @@ } else if (fi->T == MGCP_BSS_TIMEOUT_TIMER_NR) /* Note: If the logic that controls the BSS is unable to * negotiate a connection, we presumably still have a -* working connection to the MGCP-GW, we will try to +* working connection to the MGW, we will try to * shut down gracefully. */ handle_error(mgcp_ctx, MGCP_ERR_BSS_TIMEOUT); else { @@ -949,7 +949,7 @@ }, /* When the call ends, remove all RTP connections from the -* MGCP-GW by sending a wildcarded DLCX. In case of a handover, +* MGW by sending a wildcarded DLCX. In case of a handover, * go for an extra MDCX to update the connection and land in * this state again when done. */ [ST_CALL] = { @@ -969,7 +969,7 @@ .action = fsm_complete_handover, }, - /* When the MGCP_GW confirms that the connections are terminated, + /* When the MGW confirms that the connections are terminated, * then halt the state machine. */ [ST_HALT] = { .in_event_mask = (1 << EV_TEARDOWN) | (1 << EV_DLCX_ALL_RESP), @@ -989,7 +989,7 @@ }; /* Notify that the a new call begins. This will create a connection for the - * BTS on the MGCP-GW and set up the port numbers in struct osmo_bsc_sccp_con. + * BTS on the MGW and set up the port numbers in struct osmo_bsc_sccp_con. * After that gsm0808_assign_req() to proceed. * Parameter: * ctx: talloc context @@ -1037,7 +1037,7 @@ return mgcp_ctx; } -/* Notify that the call has ended, remove all connections from the MGCP-GW, +/* Notify that the call has ended, remove all connections from the MGW, * then send the clear complete message and destroy the FSM instance * Parameter: * mgcp_ctx: context information (FSM, and pointer to external system data) -- To view, visit https://gerrit.osmocom.org/4744 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibccda7e95c42267ce5f44e9fc4256a0083b6f68f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter
[PATCH] osmo-bsc[master]: cosmetic: reorder case list
Review at https://gerrit.osmocom.org/4743 cosmetic: reorder case list the switch statement in fsm_send_assignment_complete() has the default case at the beginning. Move the default case to the end to match common coding style rules Change-Id: I360842fe899b95972c44da3cb74a3dc51b379fdc --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/43/4743/1 diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index a7b6b41..f4acc39 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -575,11 +575,11 @@ get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); switch (event) { + case EV_CRCX_NET_RESP: + break; default: handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN); return; - case EV_CRCX_NET_RESP: - break; } lchan = mgcp_ctx->lchan; -- To view, visit https://gerrit.osmocom.org/4743 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I360842fe899b95972c44da3cb74a3dc51b379fdc Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter
[PATCH] osmo-bsc[master]: mgcp: add missing out state
Review at https://gerrit.osmocom.org/4745 mgcp: add missing out state Even in the very early ST_CRCX_BTS phase, the error handler may decide to go to ST_CALL in order to initate the termination of a possibly half open connection. Add ST_CALL to the out state list in ST_CRCX_BTS Change-Id: Ic67aa7c67a4e98a38bff156be3ebf612012eb842 --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/45/4745/1 diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 3115422..aa008a8 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -903,7 +903,7 @@ /* Startup state machine, send CRCX to BTS. */ [ST_CRCX_BTS] = { .in_event_mask = (1 << EV_INIT), -.out_state_mask = (1 << ST_HALT) | (1 << ST_ASSIGN_PROC), +.out_state_mask = (1 << ST_HALT) | (1 << ST_CALL) | (1 << ST_ASSIGN_PROC), .name = "ST_CRCX_BTS", .action = fsm_crcx_bts_cb, }, -- To view, visit https://gerrit.osmocom.org/4745 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic67aa7c67a4e98a38bff156be3ebf612012eb842 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter
osmocom-bb[master]: mobile: Do not exclude DGPS from the list of default categories
Patch Set 1: Code-Review+2 I think this is complete legacy and results from a time when there was no VTY interface to configure log levels yet. So all of this could probably disappear. -- To view, visit https://gerrit.osmocom.org/4733 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia874b7ed127026b8395072a3bac2aed9944b1cce Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
osmocom-bb[master]: mobile: Make VTY logging commands available to the mobile app
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4734 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3db9cf288bce12f51e36caad44e9bc34094638f4 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: laforge Gerrit-HasComments: No
osmocom-bb[master]: mobile: Search for lua5.3 and link to it
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4735 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic649e49a22c878585a6c20b5b80108909f2374eb Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmocom-bb[master]: mobile: Add LUA as debug category to the applications
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4736 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id2d266c48d30c06dfdc3b8c84d875038b43f2ad8 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmocom-bb[master]: mobile: Add initial support for scripting support
Patch Set 1: Code-Review+1 no issues from my side, but I think it might make sense to keep this out of master until we see some users to validate that the current approach really can be useful this way? -- To view, visit https://gerrit.osmocom.org/4737 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmocom-bb[master]: host/mobile: use osmocom_ms as talloc context
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4731 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6e3467ff739f3e6dc8dd60cc6d1fcd3f8e490ce9 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-bsc[master]: cosmetic: remove distracting newline
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4742 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iedc883b0f5760f004c51d7cf15328eb8c4d472db Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-bsc[master]: cosmetic: replace term MGCP-GW with MGW
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4744 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibccda7e95c42267ce5f44e9fc4256a0083b6f68f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-bsc[master]: cosmetic: reorder case list
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4743 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I360842fe899b95972c44da3cb74a3dc51b379fdc Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-bsc[master]: mgcp: add missing out state
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4745 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic67aa7c67a4e98a38bff156be3ebf612012eb842 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-bsc[master]: mgcp: remove unused variable
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4746 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I09851c957395d1ddb2f9471b99ffc091bc250404 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmocom-bb[master]: mobile/gsm322.c: prevent calling memset() with zero length
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4645 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No
osmocom-bb[master]: mobile/gsm322.c: prevent buffer over-/under-run
Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4729/1/src/host/layer23/src/mobile/gsm322.c File src/host/layer23/src/mobile/gsm322.c: Line 326: OSMO_ASSERT(value > 0 && value < 128); if you assert > 0 here, the "== 0" below will never be used. Sure you didn't mean >= 0? -- To view, visit https://gerrit.osmocom.org/4729 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes
osmo-bts[master]: l1sap: Fix abort on big RTP packet received
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4740 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idfde1dacc3dc3d3d5e239cf1f7e39ade7fc25975 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No
osmo-mgw[master]: network: fix rtp packet length
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4741 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I47a15701f9a7e7a492df183b67ec971f5be61069 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
[MERGED] osmo-mgw[master]: network: fix rtp packet length
Harald Welte has submitted this change and it was merged. Change subject: network: fix rtp packet length .. network: fix rtp packet length When sending rtp packets sizeof(buf) is used as length. This causes all RTP packets to be the size of the buffer (4096) containing the rtp payload and random excess data from previoes memory usage Use the actual length of the received RTP data, rather then the full buffer size. Change-Id: I47a15701f9a7e7a492df183b67ec971f5be61069 --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 7876b33..28d1fed 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -1054,7 +1054,7 @@ char buf[RTP_BUF_SIZE]; int proto; - int rc; + int len; conn_src = (struct mgcp_conn_rtp *)fd->data; OSMO_ASSERT(conn_src); @@ -1065,20 +1065,20 @@ ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn_src->conn)); /* Receive packet */ - rc = mgcp_recv(&proto, &addr, buf, sizeof(buf), fd); - if (rc < 0) + len = mgcp_recv(&proto, &addr, buf, sizeof(buf), fd); + if (len < 0) return -1; /* Check if the connection is in loopback mode, if yes, just send the * incoming data back to the origin */ if (conn_src->conn->mode == MGCP_CONN_LOOPBACK) { return mgcp_send_rtp(proto, &addr, buf, -sizeof(buf), conn_src, conn_src); +len, conn_src, conn_src); } /* Execute endpoint specific implementation that handles the * dispatching of the RTP data */ - return endp->type->dispatch_rtp_cb(proto, &addr, buf, sizeof(buf), + return endp->type->dispatch_rtp_cb(proto, &addr, buf, len, conn_src->conn); } -- To view, visit https://gerrit.osmocom.org/4741 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I47a15701f9a7e7a492df183b67ec971f5be61069 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol
osmo-mgw[master]: cosmetic: remove prefix "net" from rtp related vty commands
Patch Set 2: Code-Review-1 what about existing config files? We need compatibility alieses to be able to still parse old config files, right? Think of osmo-gsm-testers or users of the debian packages. -- To view, visit https://gerrit.osmocom.org/4738 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id627e2ef6f725979ed52a585ca09686e1a049adf Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-mgw[master]: doc: update sample config file
Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4739 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iad2034ce4c68bb8b70cb72d3978d2a0f685bbe19 Gerrit-PatchSet: 2 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[MERGED] osmo-mgw[master]: network: remove unused return code
Harald Welte has submitted this change and it was merged. Change subject: network: remove unused return code .. network: remove unused return code The function that forwards the tapped (voice ebug) traffic returns its status (sendto) to the caller. However, none of the callers seem need this info. Remove the return code and print an error message on failure Fixes: Coverity CID#178666 Change-Id: I16c12c4565bccbc0d75c412b43469bf70b6b7ea5 --- M src/libosmo-mgcp/mgcp_network.c 1 file changed, 12 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index 28d1fed..d51b829 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -627,14 +627,20 @@ /* Forward data to a debug tap. This is debug function that is intended for * debugging the voice traffic with tools like gstreamer */ -static int forward_data(int fd, struct mgcp_rtp_tap *tap, const char *buf, - int len) +static void forward_data(int fd, struct mgcp_rtp_tap *tap, const char *buf, +int len) { - if (!tap->enabled) - return 0; + int rc; - return sendto(fd, buf, len, 0, - (struct sockaddr *)&tap->forward, sizeof(tap->forward)); + if (!tap->enabled) + return; + + rc = sendto(fd, buf, len, 0, (struct sockaddr *)&tap->forward, + sizeof(tap->forward)); + + if (rc < 0) + LOGP(DRTP, LOGL_ERROR, +"Forwarding tapped (debug) voice data failed.\n"); } /*! Send RTP/RTCP data to a specified destination connection. -- To view, visit https://gerrit.osmocom.org/4710 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I16c12c4565bccbc0d75c412b43469bf70b6b7ea5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
osmocom-bb[master]: mobile/gsm322.c: prevent buffer over-/under-run
Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/4729/1/src/host/layer23/src/mobile/gsm322.c File src/host/layer23/src/mobile/gsm322.c: Line 326: OSMO_ASSERT(value > 0 && value < 128); > if you assert > 0 here, the "== 0" below will never be used. Sure you didn Ah, sure, my bad... Thanks :) -- To view, visit https://gerrit.osmocom.org/4729 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes
[PATCH] osmocom-bb[master]: mobile/gsm322.c: prevent buffer over-/under-run
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4729 to look at the new patch set (#2). mobile/gsm322.c: prevent buffer over-/under-run Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 --- M src/host/layer23/src/mobile/gsm322.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/29/4729/2 diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index 887a0ee..5a0400e 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -322,6 +322,9 @@ else value -= min; + /* Prevent 'bar' buffer over-/under-run */ + OSMO_ASSERT(value >= 0 && value < 128); + /* Prevent calling memset() with zero length */ if (value == 0) return ""; -- To view, visit https://gerrit.osmocom.org/4729 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy
[MERGED] osmocom-bb[master]: host/mobile: use osmocom_ms as talloc context
Vadim Yanitskiy has submitted this change and it was merged. Change subject: host/mobile: use osmocom_ms as talloc context .. host/mobile: use osmocom_ms as talloc context As we use talloc, it's absurdly not to use the main feature of the library - hierarchical memory management. This change sets talloc context of all sub-allocated objects to related osmocom_ms instance. So, as soon as osmocom_ms instance is destroyed, all sub-allocated chunks are getting destroyed too. Change-Id: I6e3467ff739f3e6dc8dd60cc6d1fcd3f8e490ce9 --- M src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h M src/host/layer23/src/common/sim.c M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/gsm322.c M src/host/layer23/src/mobile/gsm48_cc.c M src/host/layer23/src/mobile/mncc_sock.c M src/host/layer23/src/mobile/mnccms.c M src/host/layer23/src/mobile/subscriber.c M src/host/layer23/src/mobile/transaction.c M src/host/layer23/src/mobile/vty_interface.c 10 files changed, 23 insertions(+), 35 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h b/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h index b38c5bc..9116ea3 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h +++ b/src/host/layer23/include/osmocom/bb/mobile/mncc_sock.h @@ -10,7 +10,7 @@ int mncc_sock_from_cc(struct mncc_sock_state *state, struct msgb *msg); void mncc_sock_write_pending(struct mncc_sock_state *state); -struct mncc_sock_state *mncc_sock_init(void *inst, const char *name, void *tall_ctx); +struct mncc_sock_state *mncc_sock_init(void *inst, const char *name); void mncc_sock_exit(struct mncc_sock_state *state); #endif /* _MNCC_SOCK_H */ diff --git a/src/host/layer23/src/common/sim.c b/src/host/layer23/src/common/sim.c index 9aad966..c2d6033 100644 --- a/src/host/layer23/src/common/sim.c +++ b/src/host/layer23/src/common/sim.c @@ -29,7 +29,6 @@ #include #include -extern void *l23_ctx; static int sim_process_job(struct osmocom_ms *ms); /* @@ -1181,7 +1180,7 @@ struct gsm_sim_handler *handler; /* create handler and attach */ - handler = talloc_zero(l23_ctx, struct gsm_sim_handler); + handler = talloc_zero(ms, struct gsm_sim_handler); if (!handler) return 0; handler->handle = new_handle++; diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 9dbae7c..bd786b5 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -273,7 +273,7 @@ mncc_name = talloc_asprintf(ms, "/tmp/ms_mncc_%s", ms->name); ms->mncc_entity.mncc_recv = mncc_recv_app; - ms->mncc_entity.sock_state = mncc_sock_init(ms, mncc_name, l23_ctx); + ms->mncc_entity.sock_state = mncc_sock_init(ms, mncc_name); talloc_free(mncc_name); } else if (ms->settings.ch_cap == GSM_CAP_SDCCH) diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index ad6a83b..8311a44 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -45,8 +45,6 @@ const char *ba_version = "osmocom BA V1\n"; -extern void *l23_ctx; - static void gsm322_cs_timeout(void *arg); static int gsm322_cs_select(struct osmocom_ms *ms, int index, uint16_t mcc, uint16_t mnc, int any); @@ -560,7 +558,7 @@ LOGP(DPLMN, LOGL_INFO, "Add to list of forbidden LAs " "(mcc=%s, mnc=%s, lac=%04x)\n", gsm_print_mcc(mcc), gsm_print_mnc(mnc), lac); - la = talloc_zero(l23_ctx, struct gsm322_la_list); + la = talloc_zero(ms, struct gsm322_la_list); if (!la) return -ENOMEM; la->mcc = mcc; @@ -905,7 +903,7 @@ if (cs->list[i].rxlev > found->rxlev) found->rxlev = cs->list[i].rxlev; } else { - temp = talloc_zero(l23_ctx, struct gsm322_plmn_list); + temp = talloc_zero(ms, struct gsm322_plmn_list); if (!temp) return -ENOMEM; temp->mcc = cs->list[i].sysinfo->mcc; @@ -2153,7 +2151,7 @@ cs->arfcn = cs->sel_arfcn; cs->arfci = arfcn2index(cs->arfcn); if (!cs->list[cs->arfci].sysinfo) - cs->list[cs->arfci].sysinfo = talloc_zero(l23_ctx, + cs->list[cs->arfci].sysinfo = talloc_zero(ms, struct gsm48_sysinfo); if (!cs->list[cs->arfci].sysinfo) exit(-ENOMEM); @@ -2260,7 +2258,7 @@ memset(cs->list[cs->arfci].sysinfo, 0, s
[MERGED] osmo-bts[master]: l1sap: Fix abort on big RTP packet received
Pau Espin Pedrol has submitted this change and it was merged. Change subject: l1sap: Fix abort on big RTP packet received .. l1sap: Fix abort on big RTP packet received Recently while testing new osmo-mgw, big RTP packets (around 4K bytes, see OS#2625 for more info), were being received on the BTS, which was aborting with the following message: "msgb(0xff208): Not enough tailroom msgb_put (348 < 1488)" The crash can be reproduced in a sysmobts as well as on my PC locally with osmo-bts-trx. I used osmo-bts-trx to test that the patch solved the abort. Fixes: OS#2624 Change-Id: Idfde1dacc3dc3d3d5e239cf1f7e39ade7fc25975 --- M src/common/l1sap.c 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/l1sap.c b/src/common/l1sap.c index ebcfd2f..c388c82 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -117,7 +117,9 @@ * in front and behind data pointer */ struct msgb *l1sap_msgb_alloc(unsigned int l2_len) { - struct msgb *msg = msgb_alloc_headroom(512, 128, "l1sap_prim"); + int headroom = 128; + int size = headroom + sizeof(struct osmo_phsap_prim) + l2_len; + struct msgb *msg = msgb_alloc_headroom(size, headroom, "l1sap_prim"); if (!msg) return NULL; -- To view, visit https://gerrit.osmocom.org/4740 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idfde1dacc3dc3d3d5e239cf1f7e39ade7fc25975 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: dexter
Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.10/x86_64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.10/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 74s] #define HAVE_MEMORY_H 1 [ 74s] #define HAVE_STRINGS_H 1 [ 74s] #define HAVE_INTTYPES_H 1 [ 74s] #define HAVE_STDINT_H 1 [ 74s] #define HAVE_UNISTD_H 1 [ 74s] #define HAVE_DLFCN_H 1 [ 74s] #define LT_OBJDIR ".libs/" [ 74s] [ 74s] configure: exit 1 [ 74s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 74s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 74s] make[1]: *** [override_dh_auto_configure] Error 2 [ 74s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 74s] [ 66.192216] serial8250: too much work for irq4 [ 74s] [ 66.284152] serial8250: too much work for irq4 [ 74s] debian/rules:45: recipe for target 'build' failed [ 74s] make: *** [build] Error 2 [ 74s] [ 66.368150] serial8250: too much work for irq4 [ 74s] [ 66.456091] serial8250: too much work for irq4 [ 74s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 74s] [ 74s] lamb20 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:06:06 UTC 2017. [ 74s] [ 74s] ### VM INTERACTION START ### [ 77s] [ 69.726997] reboot: Power down [ 77s] ### VM INTERACTION END ### [ 77s] [ 77s] lamb20 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:06:09 UTC 2017. [ 77s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.10/i586
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.10/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 77s] #define HAVE_SYS_TYPES_H 1 [ 77s] #define HAVE_SYS_STAT_H 1 [ 77s] #define HAVE_STDLIB_H 1 [ 77s] #define HAVE_STRING_H 1 [ 77s] #define HAVE_MEMORY_H 1 [ 77s] #define HAVE_STRINGS_H 1 [ 77s] #define HAVE_INTTYPES_H 1 [ 77s] #define HAVE_STDINT_H 1 [ 77s] #define HAVE_UNISTD_H 1 [ 77s] #define HAVE_DLFCN_H 1 [ 77s] #define LT_OBJDIR ".libs/" [ 77s] [ 77s] configure: exit 1 [ 77s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 77s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 77s] make[1]: *** [override_dh_auto_configure] Error 2 [ 77s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 77s] debian/rules:45: recipe for target 'build' failed [ 77s] make: *** [build] Error 2 [ 77s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 77s] [ 77s] lamb07 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:06:03 UTC 2017. [ 77s] [ 77s] ### VM INTERACTION START ### [ 80s] [ 73.704088] reboot: Power down [ 80s] ### VM INTERACTION END ### [ 80s] [ 80s] lamb07 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:06:06 UTC 2017. [ 80s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-bsc in Debian_8.0/x86_64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 92s] #define HAVE_SYS_STAT_H 1 [ 92s] #define HAVE_STDLIB_H 1 [ 92s] #define HAVE_STRING_H 1 [ 92s] #define HAVE_MEMORY_H 1 [ 92s] #define HAVE_STRINGS_H 1 [ 92s] #define HAVE_INTTYPES_H 1 [ 92s] #define HAVE_STDINT_H 1 [ 92s] #define HAVE_UNISTD_H 1 [ 92s] #define HAVE_DLFCN_H 1 [ 92s] #define LT_OBJDIR ".libs/" [ 92s] [ 92s] configure: exit 1 [ 92s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 92s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 92s] make[1]: *** [override_dh_auto_configure] Error 255 [ 92s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 92s] debian/rules:45: recipe for target 'build' failed [ 92s] make: *** [build] Error 2 [ 92s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 92s] [ 92s] lamb26 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:07:55 UTC 2017. [ 92s] [ 92s] ### VM INTERACTION START ### [ 93s] Powering off. [ 93s] [ 86.035335] reboot: Power down [ 93s] ### VM INTERACTION END ### [ 93s] [ 93s] lamb26 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:07:57 UTC 2017. [ 93s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.04/i586
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.04/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 87s] #define HAVE_SYS_TYPES_H 1 [ 87s] #define HAVE_SYS_STAT_H 1 [ 87s] #define HAVE_STDLIB_H 1 [ 87s] #define HAVE_STRING_H 1 [ 87s] #define HAVE_MEMORY_H 1 [ 87s] #define HAVE_STRINGS_H 1 [ 87s] #define HAVE_INTTYPES_H 1 [ 87s] #define HAVE_STDINT_H 1 [ 87s] #define HAVE_UNISTD_H 1 [ 87s] #define HAVE_DLFCN_H 1 [ 87s] #define LT_OBJDIR ".libs/" [ 87s] [ 87s] configure: exit 1 [ 87s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 87s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 87s] make[1]: *** [override_dh_auto_configure] Error 2 [ 87s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 87s] debian/rules:45: recipe for target 'build' failed [ 87s] make: *** [build] Error 2 [ 87s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 87s] [ 87s] wildcard3 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:07:53 UTC 2017. [ 87s] [ 87s] ### VM INTERACTION START ### [ 90s] [ 77.139287] reboot: Power down [ 91s] ### VM INTERACTION END ### [ 91s] [ 91s] wildcard3 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:07:58 UTC 2017. [ 91s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/i586
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/i586 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 114s] #define HAVE_SYS_TYPES_H 1 [ 114s] #define HAVE_SYS_STAT_H 1 [ 114s] #define HAVE_STDLIB_H 1 [ 114s] #define HAVE_STRING_H 1 [ 114s] #define HAVE_MEMORY_H 1 [ 114s] #define HAVE_STRINGS_H 1 [ 114s] #define HAVE_INTTYPES_H 1 [ 114s] #define HAVE_STDINT_H 1 [ 114s] #define HAVE_UNISTD_H 1 [ 114s] #define HAVE_DLFCN_H 1 [ 114s] #define LT_OBJDIR ".libs/" [ 114s] [ 114s] configure: exit 1 [ 114s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 114s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 114s] make[1]: *** [override_dh_auto_configure] Error 2 [ 114s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 114s] debian/rules:45: recipe for target 'build' failed [ 114s] make: *** [build] Error 2 [ 114s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 114s] [ 114s] cloud101 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:07:39 UTC 2017. [ 114s] [ 114s] ### VM INTERACTION START ### [ 117s] [ 100.948327] reboot: Power down [ 120s] ### VM INTERACTION END ### [ 120s] [ 120s] cloud101 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:07:45 UTC 2017. [ 120s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.10/x86_64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.10/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 77s] #define HAVE_SYS_TYPES_H 1 [ 77s] #define HAVE_SYS_STAT_H 1 [ 77s] #define HAVE_STDLIB_H 1 [ 77s] #define HAVE_STRING_H 1 [ 77s] #define HAVE_MEMORY_H 1 [ 77s] #define HAVE_STRINGS_H 1 [ 77s] #define HAVE_INTTYPES_H 1 [ 77s] #define HAVE_STDINT_H 1 [ 77s] #define HAVE_UNISTD_H 1 [ 77s] #define HAVE_DLFCN_H 1 [ 77s] #define LT_OBJDIR ".libs/" [ 77s] [ 77s] configure: exit 1 [ 77s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 77s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 77s] make[1]: *** [override_dh_auto_configure] Error 2 [ 77s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 77s] debian/rules:45: recipe for target 'build' failed [ 77s] make: *** [build] Error 2 [ 77s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 77s] [ 77s] lamb52 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:08:27 UTC 2017. [ 77s] [ 77s] ### VM INTERACTION START ### [ 80s] [ 72.907914] reboot: Power down [ 80s] ### VM INTERACTION END ### [ 80s] [ 80s] lamb52 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:08:30 UTC 2017. [ 80s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_17.04/x86_64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.04/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 75s] #define HAVE_SYS_TYPES_H 1 [ 75s] #define HAVE_SYS_STAT_H 1 [ 75s] #define HAVE_STDLIB_H 1 [ 75s] #define HAVE_STRING_H 1 [ 75s] #define HAVE_MEMORY_H 1 [ 75s] #define HAVE_STRINGS_H 1 [ 75s] #define HAVE_INTTYPES_H 1 [ 75s] #define HAVE_STDINT_H 1 [ 75s] #define HAVE_UNISTD_H 1 [ 75s] #define HAVE_DLFCN_H 1 [ 75s] #define LT_OBJDIR ".libs/" [ 75s] [ 75s] configure: exit 1 [ 75s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 75s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 75s] make[1]: *** [override_dh_auto_configure] Error 2 [ 75s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 75s] debian/rules:45: recipe for target 'build' failed [ 75s] make: *** [build] Error 2 [ 75s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 75s] [ 75s] lamb01 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:08:27 UTC 2017. [ 75s] [ 75s] ### VM INTERACTION START ### [ 78s] [ 70.951006] reboot: Power down [ 78s] ### VM INTERACTION END ### [ 78s] [ 78s] lamb01 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:08:30 UTC 2017. [ 78s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.04/i586
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 108s] #define HAVE_SYS_TYPES_H 1 [ 108s] #define HAVE_SYS_STAT_H 1 [ 108s] #define HAVE_STDLIB_H 1 [ 108s] #define HAVE_STRING_H 1 [ 108s] #define HAVE_MEMORY_H 1 [ 108s] #define HAVE_STRINGS_H 1 [ 108s] #define HAVE_INTTYPES_H 1 [ 108s] #define HAVE_STDINT_H 1 [ 108s] #define HAVE_UNISTD_H 1 [ 108s] #define HAVE_DLFCN_H 1 [ 108s] #define LT_OBJDIR ".libs/" [ 108s] [ 108s] configure: exit 1 [ 108s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 108s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 108s] make[1]: *** [override_dh_auto_configure] Error 255 [ 108s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 108s] debian/rules:45: recipe for target 'build' failed [ 108s] make: *** [build] Error 2 [ 108s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 108s] [ 108s] lamb24 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:09:32 UTC 2017. [ 108s] [ 108s] ### VM INTERACTION START ### [ 111s] [ 104.167069] reboot: Power down [ 111s] ### VM INTERACTION END ### [ 111s] [ 111s] lamb24 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:09:35 UTC 2017. [ 111s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-bsc in xUbuntu_16.04/x86_64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 133s] #define HAVE_SYS_TYPES_H 1 [ 133s] #define HAVE_SYS_STAT_H 1 [ 133s] #define HAVE_STDLIB_H 1 [ 133s] #define HAVE_STRING_H 1 [ 133s] #define HAVE_MEMORY_H 1 [ 133s] #define HAVE_STRINGS_H 1 [ 133s] #define HAVE_INTTYPES_H 1 [ 133s] #define HAVE_STDINT_H 1 [ 133s] #define HAVE_UNISTD_H 1 [ 133s] #define HAVE_DLFCN_H 1 [ 133s] #define LT_OBJDIR ".libs/" [ 133s] [ 133s] configure: exit 1 [ 133s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 133s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 133s] make[1]: *** [override_dh_auto_configure] Error 255 [ 133s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 133s] debian/rules:45: recipe for target 'build' failed [ 133s] make: *** [build] Error 2 [ 133s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 133s] [ 133s] cloud124 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:09:54 UTC 2017. [ 133s] [ 133s] ### VM INTERACTION START ### [ 136s] [ 121.046456] reboot: Power down [ 139s] ### VM INTERACTION END ### [ 139s] [ 139s] cloud124 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:10:00 UTC 2017. [ 139s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-bsc in Debian_8.0/i586
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/i586 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 73s] #define HAVE_SYS_STAT_H 1 [ 73s] #define HAVE_STDLIB_H 1 [ 73s] #define HAVE_STRING_H 1 [ 73s] #define HAVE_MEMORY_H 1 [ 73s] #define HAVE_STRINGS_H 1 [ 73s] #define HAVE_INTTYPES_H 1 [ 73s] #define HAVE_STDINT_H 1 [ 73s] #define HAVE_UNISTD_H 1 [ 73s] #define HAVE_DLFCN_H 1 [ 73s] #define LT_OBJDIR ".libs/" [ 73s] [ 73s] configure: exit 1 [ 73s] dh_auto_configure: ./configure --build=i586-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 73s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 73s] make[1]: *** [override_dh_auto_configure] Error 255 [ 73s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 73s] debian/rules:45: recipe for target 'build' failed [ 73s] make: *** [build] Error 2 [ 73s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 73s] [ 73s] build78 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:10:34 UTC 2017. [ 73s] [ 73s] ### VM INTERACTION START ### [ 74s] Powering off. [ 74s] [ 67.399224] reboot: Power down [ 74s] ### VM INTERACTION END ### [ 74s] [ 74s] build78 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:10:36 UTC 2017. [ 74s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/x86_64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/x86_64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 126s] #define HAVE_SYS_TYPES_H 1 [ 126s] #define HAVE_SYS_STAT_H 1 [ 126s] #define HAVE_STDLIB_H 1 [ 126s] #define HAVE_STRING_H 1 [ 126s] #define HAVE_MEMORY_H 1 [ 126s] #define HAVE_STRINGS_H 1 [ 126s] #define HAVE_INTTYPES_H 1 [ 126s] #define HAVE_STDINT_H 1 [ 126s] #define HAVE_UNISTD_H 1 [ 126s] #define HAVE_DLFCN_H 1 [ 126s] #define LT_OBJDIR ".libs/" [ 126s] [ 126s] configure: exit 1 [ 126s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 126s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 126s] make[1]: *** [override_dh_auto_configure] Error 2 [ 126s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 126s] debian/rules:45: recipe for target 'build' failed [ 126s] make: *** [build] Error 2 [ 126s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 126s] [ 126s] cloud108 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:13:23 UTC 2017. [ 126s] [ 126s] ### VM INTERACTION START ### [ 129s] [ 105.853421] reboot: Power down [ 148s] ### VM INTERACTION END ### [ 148s] [ 148s] cloud108 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:13:46 UTC 2017. [ 148s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/aarch64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/aarch64 Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 327s] #define HAVE_SYS_STAT_H 1 [ 327s] #define HAVE_STDLIB_H 1 [ 327s] #define HAVE_STRING_H 1 [ 327s] #define HAVE_MEMORY_H 1 [ 327s] #define HAVE_STRINGS_H 1 [ 327s] #define HAVE_INTTYPES_H 1 [ 327s] #define HAVE_STDINT_H 1 [ 327s] #define HAVE_UNISTD_H 1 [ 327s] #define HAVE_DLFCN_H 1 [ 327s] #define LT_OBJDIR ".libs/" [ 327s] [ 327s] configure: exit 1 [ 327s] dh_auto_configure: ./configure --build=aarch64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/aarch64-linux-gnu --libexecdir=${prefix}/lib/aarch64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 327s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 327s] make[1]: *** [override_dh_auto_configure] Error 2 [ 327s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 327s] debian/rules:45: recipe for target 'build' failed [ 327s] make: *** [build] Error 2 [ 327s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 327s] [ 327s] obs-arm-5 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:50:05 UTC 2017. [ 327s] [ 327s] ### VM INTERACTION START ### [ 330s] [ 308.112431] sysrq: SysRq : Power Off [ 330s] [ 308.122337] reboot: Power down [ 331s] ### VM INTERACTION END ### [ 331s] [ 331s] obs-arm-5 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 20:50:09 UTC 2017. [ 331s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/armv7l
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-bsc failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-bsc Last lines of build log: [ 249s] #define HAVE_SYS_STAT_H 1 [ 249s] #define HAVE_STDLIB_H 1 [ 249s] #define HAVE_STRING_H 1 [ 249s] #define HAVE_MEMORY_H 1 [ 249s] #define HAVE_STRINGS_H 1 [ 249s] #define HAVE_INTTYPES_H 1 [ 249s] #define HAVE_STDINT_H 1 [ 249s] #define HAVE_UNISTD_H 1 [ 249s] #define HAVE_DLFCN_H 1 [ 249s] #define LT_OBJDIR ".libs/" [ 249s] [ 249s] configure: exit 1 [ 249s] dh_auto_configure: ./configure --build=arm-linux-gnueabihf --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/arm-linux-gnueabihf --libexecdir=${prefix}/lib/arm-linux-gnueabihf --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 [ 249s] debian/rules:48: recipe for target 'override_dh_auto_configure' failed [ 249s] make[1]: *** [override_dh_auto_configure] Error 2 [ 249s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 249s] debian/rules:45: recipe for target 'build' failed [ 249s] make: *** [build] Error 2 [ 249s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 249s] [ 249s] armbuild26 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 21:02:25 UTC 2017. [ 249s] [ 249s] ### VM INTERACTION START ### [ 252s] [ 212.305997] SysRq : Power Off [ 252s] [ 212.322602] reboot: Power down [ 252s] ### VM INTERACTION END ### [ 252s] [ 252s] armbuild26 failed "build osmo-bsc_1.1.2.20171108.dsc" at Wed Nov 8 21:02:28 UTC 2017. [ 252s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
[PATCH] osmo-bsc[master]: debian: Add dependency to libosmo-mgcp-client-dev
Review at https://gerrit.osmocom.org/4747 debian: Add dependency to libosmo-mgcp-client-dev Since Change-Id Ia2882b7ca31a3219c676986e85045fa08a425d7a, osmo-bsc uses osmo-mgw and utilizes libosmo-mgcp-client to talk to it, so let's make sure the Debian control file states that dependency. Unfortuantely, this still won't make the osmo-bsc debian package build again, as in fact the above commit uses symbols not even present in 1.0.0 or 1.1.0 releases of libosmo-mgcp-client :( So we first need a new release of that library, and we need to update the configure.ac and debian/control version requirements in osmo-bsc before this is fixed. This needs to be automatized in the future. Change-Id: I41a0378d069f5383904cf92cc415c19beba26168 --- M debian/control 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/47/4747/1 diff --git a/debian/control b/debian/control index e4a5b1f..4192f7b 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,8 @@ libosmo-sigtran-dev (>= 0.8.0), libosmo-abis-dev (>= 0.3.2), libosmo-netif-dev (>= 0.1.0), - libosmo-legacy-mgcp-dev (>= 0.0.1) + libosmo-legacy-mgcp-dev (>= 0.0.1), + libosmo-mgcp-client-dev (>= 1.0.0) Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/osmo-bsc.git Vcs-Browser: https://git.osmocom.org/osmo-bsc/ -- To view, visit https://gerrit.osmocom.org/4747 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I41a0378d069f5383904cf92cc415c19beba26168 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte
[PATCH] osmo-bsc[master]: debian: Increase required libosmo-legacy-mgcp-dev version
Review at https://gerrit.osmocom.org/4748 debian: Increase required libosmo-legacy-mgcp-dev version Use the same version requirement as in configure.ac. Change-Id: I2dc21e89bd676a754bc24a6995c4f9c0c4727d57 --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/48/4748/1 diff --git a/debian/control b/debian/control index 4192f7b..963d664 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,7 @@ libosmo-sigtran-dev (>= 0.8.0), libosmo-abis-dev (>= 0.3.2), libosmo-netif-dev (>= 0.1.0), - libosmo-legacy-mgcp-dev (>= 0.0.1), + libosmo-legacy-mgcp-dev (>= 1.0.0), libosmo-mgcp-client-dev (>= 1.0.0) Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/osmo-bsc.git -- To view, visit https://gerrit.osmocom.org/4748 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2dc21e89bd676a754bc24a6995c4f9c0c4727d57 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte
osmo-bsc[master]: debian: Add dependency to libosmo-mgcp-client-dev
Patch Set 1: Code-Review+2 +2,but please read the comment in the change log. We will probably discuss about this next week, too. We have to make sure we clean up our development process to avoid creating such situations. Now you can install libosmo-mgcp.git 1.1.0 and autoconf will succeed, while the build (debian or not) of osmo-bsc breaks. In the future, this must be verified by gerrit before providing V+1 -- To view, visit https://gerrit.osmocom.org/4747 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I41a0378d069f5383904cf92cc415c19beba26168 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-HasComments: No
osmo-bsc[master]: debian: Increase required libosmo-legacy-mgcp-dev version
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4748 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2dc21e89bd676a754bc24a6995c4f9c0c4727d57 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[MERGED] osmo-bsc[master]: debian: Increase required libosmo-legacy-mgcp-dev version
Harald Welte has submitted this change and it was merged. Change subject: debian: Increase required libosmo-legacy-mgcp-dev version .. debian: Increase required libosmo-legacy-mgcp-dev version Use the same version requirement as in configure.ac. Change-Id: I2dc21e89bd676a754bc24a6995c4f9c0c4727d57 --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index 4192f7b..963d664 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,7 @@ libosmo-sigtran-dev (>= 0.8.0), libosmo-abis-dev (>= 0.3.2), libosmo-netif-dev (>= 0.1.0), - libosmo-legacy-mgcp-dev (>= 0.0.1), + libosmo-legacy-mgcp-dev (>= 1.0.0), libosmo-mgcp-client-dev (>= 1.0.0) Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/osmo-bsc.git -- To view, visit https://gerrit.osmocom.org/4748 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2dc21e89bd676a754bc24a6995c4f9c0c4727d57 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-bsc[master]: debian: Add dependency to libosmo-mgcp-client-dev
Harald Welte has submitted this change and it was merged. Change subject: debian: Add dependency to libosmo-mgcp-client-dev .. debian: Add dependency to libosmo-mgcp-client-dev Since Change-Id Ia2882b7ca31a3219c676986e85045fa08a425d7a, osmo-bsc uses osmo-mgw and utilizes libosmo-mgcp-client to talk to it, so let's make sure the Debian control file states that dependency. Unfortuantely, this still won't make the osmo-bsc debian package build again, as in fact the above commit uses symbols not even present in 1.0.0 or 1.1.0 releases of libosmo-mgcp-client :( So we first need a new release of that library, and we need to update the configure.ac and debian/control version requirements in osmo-bsc before this is fixed. This needs to be automatized in the future. Change-Id: I41a0378d069f5383904cf92cc415c19beba26168 --- M debian/control 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index e4a5b1f..4192f7b 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,8 @@ libosmo-sigtran-dev (>= 0.8.0), libosmo-abis-dev (>= 0.3.2), libosmo-netif-dev (>= 0.1.0), - libosmo-legacy-mgcp-dev (>= 0.0.1) + libosmo-legacy-mgcp-dev (>= 0.0.1), + libosmo-mgcp-client-dev (>= 1.0.0) Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/osmo-bsc.git Vcs-Browser: https://git.osmocom.org/osmo-bsc/ -- To view, visit https://gerrit.osmocom.org/4747 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I41a0378d069f5383904cf92cc415c19beba26168 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter
Build failure of network:osmocom:latest/libosmocore in xUbuntu_17.04/x86_64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libosmocore/xUbuntu_17.04/x86_64 Package network:osmocom:latest/libosmocore failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:latest libosmocore Last lines of build log: [ 206s] - [ 206s] -[+] Testing: ??? (non-recursive, direct truncation, not punctured) [ 206s] -[.] Input length : ret = 224 exp = 224 -> OK [ 206s] -[.] Output length : ret = 448 exp = 448 -> OK [ 206s] -[.] Pre computed vector checks: [ 206s] -[..] Encoding: OK [ 206s] -[..] Decoding: OK [ 206s] -[.] Random vector checks: [ 206s] -[..] Encoding / Decoding cycle : OK [ 206s] -[..] Encoding / Decoding cycle : OK [ 206s] -[..] Encoding / Decoding cycle : OK [ 206s] - [ 206s] ./testsuite.at:57: exit code was 132, expected 0 [ 206s] 9. testsuite.at:54: 9. conv (testsuite.at:54): FAILED (testsuite.at:57) [ 206s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 206s] make[1]: *** [override_dh_auto_test] Error 1 [ 206s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 206s] debian/rules:15: recipe for target 'build' failed [ 206s] make: *** [build] Error 2 [ 206s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 206s] [ 206s] build31 failed "build libosmocore_0.10.2.dsc" at Thu Nov 9 01:00:09 UTC 2017. [ 206s] [ 206s] ### VM INTERACTION START ### [ 209s] [ 201.781574] reboot: Power down [ 210s] ### VM INTERACTION END ### [ 210s] [ 210s] build31 failed "build libosmocore_0.10.2.dsc" at Thu Nov 9 01:00:13 UTC 2017. [ 210s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:latest/libosmocore in Debian_8.0/x86_64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libosmocore/Debian_8.0/x86_64 Package network:osmocom:latest/libosmocore failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:latest libosmocore Last lines of build log: [ 229s] -[..] Encoding / Decoding cycle : OK [ 229s] -[..] Encoding / Decoding cycle : OK [ 229s] - [ 229s] -[+] Testing: gsm0503_mcs9 [ 229s] -[.] Input length : ret = 606 exp = 606 -> OK [ 229s] -[.] Output length : ret = 1836 exp = 1836 -> OK [ 229s] -[.] Random vector checks: [ 229s] -[..] Encoding / Decoding cycle : OK [ 229s] -[..] Encoding / Decoding cycle : OK [ 229s] -[..] Encoding / Decoding cycle : OK [ 229s] - [ 229s] ./testsuite.at:63: exit code was 132, expected 0 [ 229s] 10. testsuite.at:60: 10. conv_gsm0503 (testsuite.at:60): FAILED (testsuite.at:63) [ 229s] debian/rules:26: recipe for target 'override_dh_auto_test' failed [ 229s] make[1]: *** [override_dh_auto_test] Error 1 [ 229s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 229s] debian/rules:15: recipe for target 'build' failed [ 229s] make: *** [build] Error 2 [ 229s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 229s] [ 229s] build32 failed "build libosmocore_0.10.2.dsc" at Thu Nov 9 01:00:04 UTC 2017. [ 229s] [ 229s] ### VM INTERACTION START ### [ 231s] Powering off. [ 231s] [ 221.558214] reboot: Power down [ 232s] ### VM INTERACTION END ### [ 232s] [ 232s] build32 failed "build libosmocore_0.10.2.dsc" at Thu Nov 9 01:00:07 UTC 2017. [ 232s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
[MERGED] osmo-bsc[master]: osmo-bsc RESET FSM: use distinct struct names
Neels Hofmeyr has submitted this change and it was merged. Change subject: osmo-bsc RESET FSM: use distinct struct names .. osmo-bsc RESET FSM: use distinct struct names Use distinctive struct names: s/fsm_/fsm_bsc_reset/. They only exist in the static context and it works fine, but the mad fsm-to-dot.py script breaks with identical struct names. Can't hurt to have unique names. Change-Id: I986377a74ccd83ca3b52e7f058bbc9115f05f741 --- M src/osmo-bsc/osmo_bsc_reset.c 1 file changed, 10 insertions(+), 10 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_reset.c b/src/osmo-bsc/osmo_bsc_reset.c index aadbd86..e482a44 100644 --- a/src/osmo-bsc/osmo_bsc_reset.c +++ b/src/osmo-bsc/osmo_bsc_reset.c @@ -33,24 +33,24 @@ #define RESET_RESEND_TIMER_NO 1234 /* FIXME: dig out the real timer number */ #define BAD_CONNECTION_THRESOLD 3 /* connection failures */ -enum fsm_states { +enum fsm_bsc_reset_states { ST_DISC,/* Disconnected from MSC */ ST_CONN,/* We have a confirmed connection to the MSC */ }; -static const struct value_string fsm_state_names[] = { +static const struct value_string fsm_bsc_reset_state_names[] = { {ST_DISC, "ST_DISC (disconnected)"}, {ST_CONN, "ST_CONN (connected)"}, {0, NULL}, }; -enum fsm_evt { +enum fsm_bsc_reset_evt { EV_RESET_ACK, /* got reset acknowlegement from the MSC */ EV_N_DISCONNECT,/* lost a connection */ EV_N_CONNECT, /* made a successful connection */ }; -static const struct value_string fsm_evt_names[] = { +static const struct value_string fsm_bsc_reset_evt_names[] = { {EV_RESET_ACK, "EV_RESET_ACK"}, {EV_N_DISCONNECT, "EV_N_DISCONNECT"}, {EV_N_CONNECT, "EV_N_CONNECT"}, @@ -63,7 +63,7 @@ struct bsc_msc_data *msc = (struct bsc_msc_data *)data; LOGP(DMSC, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s, MSC No.: %i\n", -get_value_string(fsm_state_names, ST_DISC), get_value_string(fsm_evt_names, event), msc->nr); +get_value_string(fsm_bsc_reset_state_names, ST_DISC), get_value_string(fsm_bsc_reset_evt_names, event), msc->nr); msc->msc_con->msc_conn_loss_count = 0; osmo_fsm_inst_state_chg(fi, ST_CONN, 0, 0); } @@ -74,7 +74,7 @@ struct bsc_msc_data *msc = (struct bsc_msc_data *)data; LOGP(DMSC, LOGL_NOTICE, "fsm-state (msc-reset): %s, fsm-event: %s, MSC No.: %i\n", -get_value_string(fsm_state_names, ST_CONN), get_value_string(fsm_evt_names, event), msc->nr); +get_value_string(fsm_bsc_reset_state_names, ST_CONN), get_value_string(fsm_bsc_reset_evt_names, event), msc->nr); OSMO_ASSERT(msc); @@ -98,7 +98,7 @@ struct bsc_msc_data *msc = (struct bsc_msc_data *)fi->priv; LOGP(DMSC, LOGL_NOTICE, "reset-ack timeout (T%i) in state %s, MSC No.: %i, resending...\n", fi->T, -get_value_string(fsm_state_names, fi->state), msc->nr); +get_value_string(fsm_bsc_reset_state_names, fi->state), msc->nr); osmo_bsc_sigtran_reset(msc); osmo_bsc_sigtran_tx_reset(msc); @@ -107,7 +107,7 @@ return 0; } -static struct osmo_fsm_state fsm_states[] = { +static struct osmo_fsm_state fsm_bsc_reset_states[] = { [ST_DISC] = { .in_event_mask = (1 << EV_RESET_ACK), .out_state_mask = (1 << ST_DISC) | (1 << ST_CONN), @@ -125,8 +125,8 @@ /* State machine definition */ static struct osmo_fsm fsm = { .name = "A-CONNECTION", - .states = fsm_states, - .num_states = ARRAY_SIZE(fsm_states), + .states = fsm_bsc_reset_states, + .num_states = ARRAY_SIZE(fsm_bsc_reset_states), .log_subsys = DMSC, .timer_cb = fsm_reset_ack_timeout_cb, }; -- To view, visit https://gerrit.osmocom.org/4375 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I986377a74ccd83ca3b52e7f058bbc9115f05f741 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: dexter
[MERGED] osmo-msc[master]: examples: apply mgcp_client vty rename from 'mgcpgw' to 'mgw'
Neels Hofmeyr has submitted this change and it was merged. Change subject: examples: apply mgcp_client vty rename from 'mgcpgw' to 'mgw' .. examples: apply mgcp_client vty rename from 'mgcpgw' to 'mgw' osmo-mgw.git is changing the mgcp_client_vty API to use 'mgw' instead of 'mgcpgw'. Fix example configs after that patch is merged. Depends: I1d43d42929dc9162e57640499526fb7cadbcfbe6 Change-Id: Ib4c5ec1046a3c7a916ecfb7e5aa83dfe2f5ea8bf --- M doc/examples/osmo-msc/osmo-msc.cfg M doc/examples/osmo-msc/osmo-msc_custom-sccp.cfg M doc/examples/osmo-msc/osmo-msc_multi-cs7.cfg 3 files changed, 3 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/examples/osmo-msc/osmo-msc.cfg b/doc/examples/osmo-msc/osmo-msc.cfg index fff964b..1261160 100644 --- a/doc/examples/osmo-msc/osmo-msc.cfg +++ b/doc/examples/osmo-msc/osmo-msc.cfg @@ -15,7 +15,7 @@ rrlp mode none mm info 1 msc - mgcpgw remote-ip 10.23.24.1 + mgw remote-ip 10.23.24.1 assign-tmsi auth-tuple-max-reuse-count 3 auth-tuple-reuse-on-error 1 diff --git a/doc/examples/osmo-msc/osmo-msc_custom-sccp.cfg b/doc/examples/osmo-msc/osmo-msc_custom-sccp.cfg index 4ccb0d0..a5131e4 100644 --- a/doc/examples/osmo-msc/osmo-msc_custom-sccp.cfg +++ b/doc/examples/osmo-msc/osmo-msc_custom-sccp.cfg @@ -23,5 +23,5 @@ msc cs7-instance-a 0 cs7-instance-iu 0 - mgcpgw remote-ip 10.23.24.1 + mgw remote-ip 10.23.24.1 assign-tmsi diff --git a/doc/examples/osmo-msc/osmo-msc_multi-cs7.cfg b/doc/examples/osmo-msc/osmo-msc_multi-cs7.cfg index 8b481de..72f3410 100644 --- a/doc/examples/osmo-msc/osmo-msc_multi-cs7.cfg +++ b/doc/examples/osmo-msc/osmo-msc_multi-cs7.cfg @@ -25,5 +25,5 @@ msc cs7-instance-a 0 cs7-instance-iu 1 - mgcpgw remote-ip 10.23.24.1 + mgw remote-ip 10.23.24.1 assign-tmsi -- To view, visit https://gerrit.osmocom.org/4599 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib4c5ec1046a3c7a916ecfb7e5aa83dfe2f5ea8bf Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[MERGED] osmocom-bb[master]: vty: skip installing cmds now always installed by default
Neels Hofmeyr has submitted this change and it was merged. Change subject: vty: skip installing cmds now always installed by default .. vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: I300a4b34a2031fd09d110ef18375d140a6dca7ba --- M src/host/layer23/src/mobile/vty_interface.c M src/shared/libosmocore/src/gb/gprs_bssgp_vty.c M src/shared/libosmocore/src/gb/gprs_ns_vty.c M src/shared/libosmocore/src/vty/logging_vty.c M src/shared/libosmocore/src/vty/vty.c 5 files changed, 0 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 06f66b5..9a4ae63 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -2837,7 +2837,6 @@ install_element(CONFIG_NODE, &cfg_ms_rename_cmd); install_element(CONFIG_NODE, &cfg_no_ms_cmd); install_node(&ms_node, config_write); - install_default(MS_NODE); install_element(MS_NODE, &cfg_ms_show_this_cmd); install_element(MS_NODE, &cfg_ms_layer2_cmd); install_element(MS_NODE, &cfg_ms_sap_cmd); @@ -2880,7 +2879,6 @@ install_element(MS_NODE, &cfg_ms_no_neighbour_cmd); install_element(MS_NODE, &cfg_ms_support_cmd); install_node(&support_node, config_write_dummy); - install_default(SUPPORT_NODE); install_element(SUPPORT_NODE, &cfg_ms_sup_dtmf_cmd); install_element(SUPPORT_NODE, &cfg_ms_sup_no_dtmf_cmd); install_element(SUPPORT_NODE, &cfg_ms_sup_sms_cmd); @@ -2936,7 +2934,6 @@ install_element(SUPPORT_NODE, &cfg_ms_sup_skip_max_per_band_cmd); install_element(SUPPORT_NODE, &cfg_ms_sup_no_skip_max_per_band_cmd); install_node(&testsim_node, config_write_dummy); - install_default(TESTSIM_NODE); install_element(TESTSIM_NODE, &cfg_test_imsi_cmd); install_element(TESTSIM_NODE, &cfg_test_ki_xor_cmd); install_element(TESTSIM_NODE, &cfg_test_ki_comp128_cmd); diff --git a/src/shared/libosmocore/src/gb/gprs_bssgp_vty.c b/src/shared/libosmocore/src/gb/gprs_bssgp_vty.c index d8e1d32..7017c50 100644 --- a/src/shared/libosmocore/src/gb/gprs_bssgp_vty.c +++ b/src/shared/libosmocore/src/gb/gprs_bssgp_vty.c @@ -189,7 +189,6 @@ install_element(CONFIG_NODE, &cfg_bssgp_cmd); install_node(&bssgp_node, config_write_bssgp); - install_default(L_BSSGP_NODE); install_element(L_BSSGP_NODE, &libgb_exit_cmd); install_element(L_BSSGP_NODE, &libgb_end_cmd); //install_element(L_BSSGP_NODE, &cfg_bssgp_timer_cmd); diff --git a/src/shared/libosmocore/src/gb/gprs_ns_vty.c b/src/shared/libosmocore/src/gb/gprs_ns_vty.c index fac431c..b443601 100644 --- a/src/shared/libosmocore/src/gb/gprs_ns_vty.c +++ b/src/shared/libosmocore/src/gb/gprs_ns_vty.c @@ -559,7 +559,6 @@ install_element(CONFIG_NODE, &cfg_ns_cmd); install_node(&ns_node, config_write_ns); - install_default(L_NS_NODE); install_element(L_NS_NODE, &libgb_exit_cmd); install_element(L_NS_NODE, &libgb_end_cmd); install_element(L_NS_NODE, &cfg_nse_nsvci_cmd); diff --git a/src/shared/libosmocore/src/vty/logging_vty.c b/src/shared/libosmocore/src/vty/logging_vty.c index d473f12..6029d58 100644 --- a/src/shared/libosmocore/src/vty/logging_vty.c +++ b/src/shared/libosmocore/src/vty/logging_vty.c @@ -592,7 +592,6 @@ install_element_ve(&show_logging_vty_cmd); install_node(&cfg_log_node, config_write_log); - install_default(CFG_LOG_NODE); install_element(CFG_LOG_NODE, &config_end_cmd); install_element(CFG_LOG_NODE, &logging_fltr_all_cmd); install_element(CFG_LOG_NODE, &logging_use_clr_cmd); diff --git a/src/shared/libosmocore/src/vty/vty.c b/src/shared/libosmocore/src/vty/vty.c index 696766a..cafe202 100644 --- a/src/shared/libosmocore/src/vty/vty.c +++ b/src/shared/libosmocore/src/vty/vty.c @@ -1753,7 +1753,6 @@ install_element(ENABLE_NODE, &terminal_monitor_cmd); install_element(ENABLE_NODE, &terminal_no_monitor_cmd); - install_default(VTY_NODE); install_element(VTY_NODE, &vty_login_cmd); install_element(VTY_NODE, &no_vty_login_cmd); } -- To view, visit https://gerrit.osmocom.org/4604 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I300a4b34a2031fd09d110ef18375d140a6dca7ba Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[MERGED] osmo-bsc[master]: osmo-bsc: SCCP addrs: default only if unset, reject invalid
Neels Hofmeyr has submitted this change and it was merged. Change subject: osmo-bsc: SCCP addrs: default only if unset, reject invalid .. osmo-bsc: SCCP addrs: default only if unset, reject invalid So far, if the user entered an invalid SCCP address in the config, the osmo_bsc_sigtran_init() code simply replaced that with the default, i.e. running with a completely different address than the user may intend. Use the default SCCP addresses only when they are unset by the user. Default MSC addr: set directly, do not detour via cs7 instance PC. The default MSC SCCP addr is just a point code + SSN, deriving it from the cs7 instance first is a confusing step. Just set the PC and SSN, and done. Using default addresses does not constitute an "auto configuration": if we set up a cs7 instance automatically, we do not want to have to create a second one automatically, to prevent "auto-confusion", and want to bail instead. But for each MSC on its own, using default SCCP addresses makes sense and is orthogonal to automatic cs7 instance creation. Hence drop the auto config semantics from the default SCCP address parts. Always validate the SCCP addresses we will end up using, and bail immediately if they are erratic. i.e. don't overwrite a non-empty invalid SCCP address with defaults, but straight bail. Beneficial side effects: - Fix some grammar ultra confusion in log messages. - Add context: log the MSC number the logging refers to. - Drop code dup: since we're always logging the used SCCP addresses, might as well log those once, unconditionally, in the end. Change-Id: Iadbc2e9740457e1b389b7e7ad9c94274e7d8cb11 --- M src/osmo-bsc/osmo_bsc_sigtran.c 1 file changed, 25 insertions(+), 32 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 2ba777e..253f1e8 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -509,46 +509,39 @@ if (!msc->a.sccp) return -EINVAL; - /* Check if the sccp-address fullfills minimum requirements (SSN+PC is present, -* automatically recover addresses if the addresses are not set up properly) */ - if (!osmo_sccp_check_addr(&msc->a.bsc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) { - if (fail_on_next_invalid_cfg) - goto fail_auto_cofiguration; - free_attempt_used = true; - - LOGP(DMSC, LOGL_NOTICE, -"A-interface: invalid or missing local (BSC) SCCP address (a.bsc_addr=%s)\n", - osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.bsc_addr)); + /* If unset, use default local SCCP address */ + if (!msc->a.bsc_addr.presence) osmo_sccp_local_addr_by_instance(&msc->a.bsc_addr, msc->a.sccp, SCCP_SSN_BSSAP); - LOGP(DMSC, LOGL_NOTICE, -"A-interface: using automatically generated local (BSC) SCCP address (a.bsc_addr=%s)\n", + + if (!osmo_sccp_check_addr(&msc->a.bsc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) { + LOGP(DMSC, LOGL_ERROR, +"(%s) A-interface: invalid local (BSC) SCCP address: %s\n", +msc_name, osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.bsc_addr)); - } else { - LOGP(DMSC, LOGL_NOTICE, -"A-interface: using local (BSC) automatically SCCP address (a.msc_addr=%s)\n", - osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), &msc->a.bsc_addr)); + return -EINVAL; } + + /* If unset, use default SCCP address for the MSC */ + if (!msc->a.msc_addr.presence) + osmo_sccp_make_addr_pc_ssn(&msc->a.msc_addr, + osmo_ss7_pointcode_parse(NULL, MSC_DEFAULT_PC), + SCCP_SSN_BSSAP); if (!osmo_sccp_check_addr(&msc->a.msc_addr, OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) { - if (fail_on_next_invalid_cfg) - goto fail_auto_cofiguration; - free_attempt_used = true; - - LOGP(DMSC, LOGL_NOTICE, -"A-interface: invalid or missing remote (MSC) SCCP address for the MSC (a.msc_addr=%s)\n", + LOGP(DMSC, LOGL_ERROR, +"(%s) A-interface: invalid remote (MSC) SCCP address: %s\n", +
[PATCH] osmo-sgsn[master]: vty: skip installing cmds now always installed by default
Review at https://gerrit.osmocom.org/4749 vty: skip installing cmds now always installed by default vty_install_default() and install_default() will soon be deprecated. Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b Change-Id: Iee1b582a62921cb3205de01ff87d94881e8d411b --- M src/gprs/gb_proxy_vty.c M src/gprs/gtphub_vty.c M src/gprs/sgsn_vty.c 3 files changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/49/4749/1 diff --git a/src/gprs/gb_proxy_vty.c b/src/gprs/gb_proxy_vty.c index 156f337..25ef756 100644 --- a/src/gprs/gb_proxy_vty.c +++ b/src/gprs/gb_proxy_vty.c @@ -808,7 +808,6 @@ install_element(CONFIG_NODE, &cfg_gbproxy_cmd); install_node(&gbproxy_node, config_write_gbproxy); - vty_install_default(GBPROXY_NODE); install_element(GBPROXY_NODE, &cfg_nsip_sgsn_nsei_cmd); install_element(GBPROXY_NODE, &cfg_gbproxy_core_mcc_cmd); install_element(GBPROXY_NODE, &cfg_gbproxy_core_mnc_cmd); diff --git a/src/gprs/gtphub_vty.c b/src/gprs/gtphub_vty.c index 3a46e81..ec35e4d 100644 --- a/src/gprs/gtphub_vty.c +++ b/src/gprs/gtphub_vty.c @@ -583,7 +583,6 @@ install_element(CONFIG_NODE, &cfg_gtphub_cmd); install_node(>phub_node, config_write_gtphub); - vty_install_default(GTPHUB_NODE); install_element(GTPHUB_NODE, &cfg_gtphub_bind_to_sgsns_short_cmd); install_element(GTPHUB_NODE, &cfg_gtphub_bind_to_sgsns_cmd); diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index 496bd68..a01de2d 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -1232,7 +1232,6 @@ install_element(CONFIG_NODE, &cfg_sgsn_cmd); install_node(&sgsn_node, config_write_sgsn); - vty_install_default(SGSN_NODE); install_element(SGSN_NODE, &cfg_sgsn_bind_addr_cmd); install_element(SGSN_NODE, &cfg_ggsn_remote_ip_cmd); //install_element(SGSN_NODE, &cfg_ggsn_remote_port_cmd); -- To view, visit https://gerrit.osmocom.org/4749 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iee1b582a62921cb3205de01ff87d94881e8d411b Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
osmo-sgsn[master]: vty: skip installing cmds now always installed by default
Patch Set 1: seems I forgot to push this one for some reason -- To view, visit https://gerrit.osmocom.org/4749 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iee1b582a62921cb3205de01ff87d94881e8d411b Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
osmocom-bb[master]: mobile/gsm322.c: prevent buffer over-/under-run
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/4729 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No
[MERGED] osmocom-bb[master]: mobile: Do not exclude DGPS from the list of default categories
Holger Freyther has submitted this change and it was merged. Change subject: mobile: Do not exclude DGPS from the list of default categories .. mobile: Do not exclude DGPS from the list of default categories I don't remember why we parse the categories like this. First if the mobile doesn't use a subsystem there is no harm to have it enabled, second the default levels can be adjusted for all apps and third we have the VTY to reconfigure these logging targets. Change-Id: Ia874b7ed127026b8395072a3bac2aed9944b1cce --- M src/host/layer23/src/mobile/main.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 997e2d5..91ed341 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -70,7 +70,7 @@ const char *debug_default = - "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP"; + "DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS"; const char *openbsc_copyright = "Copyright (C) 2010-2015 Andreas Eversberg, Sylvain Munaut, Holger Freyther, Harald Welte\n" -- To view, visit https://gerrit.osmocom.org/4733 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia874b7ed127026b8395072a3bac2aed9944b1cce Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
osmocom-bb[master]: mobile: Do not exclude DGPS from the list of default categories
Patch Set 2: Will remove this line in the next round.. -- To view, visit https://gerrit.osmocom.org/4733 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia874b7ed127026b8395072a3bac2aed9944b1cce Gerrit-PatchSet: 2 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[MERGED] osmocom-bb[master]: mobile/gsm322.c: prevent calling memset() with zero length
Harald Welte has submitted this change and it was merged. Change subject: mobile/gsm322.c: prevent calling memset() with zero length .. mobile/gsm322.c: prevent calling memset() with zero length This change prevents a possibility of calling memset() with constant zero length parameter, and the corresponding compiler warning. Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a --- M src/host/layer23/src/mobile/gsm322.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index 8311a44..0e2c9af 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -320,6 +320,10 @@ else value -= min; + /* Prevent calling memset() with zero length */ + if (value == 0) + return ""; + memset(bar, '=', value); bar[value] = '\0'; -- To view, visit https://gerrit.osmocom.org/4645 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a Gerrit-PatchSet: 5 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy
[MERGED] osmocom-bb[master]: mobile/gsm322.c: prevent buffer over-/under-run
Harald Welte has submitted this change and it was merged. Change subject: mobile/gsm322.c: prevent buffer over-/under-run .. mobile/gsm322.c: prevent buffer over-/under-run Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 --- M src/host/layer23/src/mobile/gsm322.c 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index 0e2c9af..91729d8 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -320,6 +320,9 @@ else value -= min; + /* Prevent 'bar' buffer over-/under-run */ + OSMO_ASSERT(value >= 0 && value < 128); + /* Prevent calling memset() with zero length */ if (value == 0) return ""; -- To view, visit https://gerrit.osmocom.org/4729 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 Gerrit-PatchSet: 4 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy
[MERGED] osmocom-bb[master]: mobile: Make VTY logging commands available to the mobile app
Holger Freyther has submitted this change and it was merged. Change subject: mobile: Make VTY logging commands available to the mobile app .. mobile: Make VTY logging commands available to the mobile app So far logging_vty_add_cmds wasn't called. The main.c might be shared with other apps so place it into the routine that is setting up the VTY. Change-Id: I3db9cf288bce12f51e36caad44e9bc34094638f4 --- M src/host/layer23/src/mobile/app_mobile.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index bd786b5..e3e948f 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -398,6 +399,7 @@ vty_info.tall_ctx = l23_ctx; vty_init(&vty_info); + logging_vty_add_cmds(NULL); ms_vty_init(); dummy_conn.priv = NULL; vty_reading = 1; -- To view, visit https://gerrit.osmocom.org/4734 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3db9cf288bce12f51e36caad44e9bc34094638f4 Gerrit-PatchSet: 3 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: laforge
osmocom-bb[master]: mobile: Add initial support for scripting support
Patch Set 1: Right. All LUA related work should be merged at once or not at all. I will rebase so that general fixes are coming first. It is to catch feedback early and often. The expected next patch will build some primitives to get a feeling for lua callbacks and if it does make sense. -- To view, visit https://gerrit.osmocom.org/4737 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[PATCH] osmo-bsc[master]: bsc filter: don't ignore imsi-allow on "global" filter level
Review at https://gerrit.osmocom.org/4750 bsc filter: don't ignore imsi-allow on "global" filter level First off, there are "global" and "local" IMSI black/whitelist levels: "global" "local" VTY 'bsc' 'msc' for osmo-bsc VTY 'nat' 'bsc' for osmo-bsc_nat Both in osmo-bsc and osmo-bsc-nat, the "global" IMSI filter so far completely ignores all 'imsi-allow' rules it may contain. A comment in imsi_allow() proclaims actions that are missing in the code. Notably, in our example config osmo-bsc_nat.cfg, there is an imsi-allow on the 'nat' level, which with the code before this patch cannot have been effective in any way. Furthermore, on the "local" level the order is to check imsi-allow first, and imsi-deny after that. The comment says to do that in reverse order on the "global" level. There is no apparent reason for reversing. Add evaluation of imsi-allow directives on the "global" level, i.e. 'bsc' in osmo-bsc and 'nat' in osmo-bsc-nat, in the same order as on "local" level, to avoid confusion. Swap the comment to be consistent. Before this patch, to have effective imsi-allow, this config would be necessary for osmo-bsc: bsc access-list acl imsi-allow 999 access-list acl imsi-allow 9017.* access-list acl imsi-deny .* msc 0 access-list-name acl ... msc 1 access-list-name acl ... With this patch, imsi-allow also works on the "global" level: bsc access-list acl imsi-allow 999 access-list acl imsi-allow 9017.* access-list acl imsi-deny .* access-list-name acl msc 0 ... msc 1 ... Change-Id: Idb6c8dd62aa90666ba6fcd213f59d79f5498da3f --- M src/libfilter/bsc_msg_filter.c 1 file changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/50/4750/1 diff --git a/src/libfilter/bsc_msg_filter.c b/src/libfilter/bsc_msg_filter.c index fc87e88..816ed94 100644 --- a/src/libfilter/bsc_msg_filter.c +++ b/src/libfilter/bsc_msg_filter.c @@ -150,8 +150,8 @@ * 1.) Check the global IMSI barr list * 2.) Allow directly if the IMSI is allowed at the BSC * 3.) Reject if the IMSI is not allowed at the BSC -* 4.) Reject if the IMSI not allowed at the global level. -* 5.) Allow directly if the IMSI is allowed at the global level +* 4.) Allow directly if the IMSI is allowed at the global level +* 5.) Reject if the IMSI not allowed at the global level. */ int cm, lu; struct bsc_msg_acc_lst *nat_lst = NULL; @@ -189,8 +189,12 @@ } - /* 4. NAT deny */ if (nat_lst) { + /* 4. global allow */ + if (bsc_msg_acc_lst_check_allow(nat_lst, imsi) == 0) + return 1; + + /* 5. global deny */ if (lst_check_deny(nat_lst, imsi, &cm, &lu) == 0) { LOGP(DFILTER, LOGL_ERROR, "Filtering %s global imsi_deny on bsc nr: %d.\n", imsi, req->bsc_nr); -- To view, visit https://gerrit.osmocom.org/4750 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idb6c8dd62aa90666ba6fcd213f59d79f5498da3f Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr