From patchwork Fri Jan 5 17:04:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Sperling X-Patchwork-Id: 856127 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.osmocom.org (client-ip=144.76.43.76; helo=lists.osmocom.org; envelope-from=openbsc-bounces@lists.osmocom.org; receiver=) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by ozlabs.org (Postfix) with ESMTP id 3zCrqm6HN6z9s7F for ; Sat, 6 Jan 2018 04:14:10 +1100 (AEDT) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id 5DC183E13B; Fri, 5 Jan 2018 17:13:47 +0000 (UTC) Authentication-Results: lists.osmocom.org; dmarc=none header.from=stsp.name X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org X-Greylist: delayed 492 seconds by postgrey-1.34 at lists.osmocom.org; Fri, 05 Jan 2018 17:13:45 UTC Authentication-Results: lists.osmocom.org; dmarc=none header.from=stsp.name Received-SPF: None (no SPF record) identity=mailfrom; client-ip=192.109.42.8; helo=einhorn-mail.in-berlin.de; envelope-from=stsp@stsp.name; receiver=openbsc@lists.osmocom.org Received: from einhorn-mail.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by lists.osmocom.org (Postfix) with ESMTP id 286283E129 for ; Fri, 5 Jan 2018 17:13:44 +0000 (UTC) X-Envelope-From: stsp@stsp.name X-Envelope-To: Received: from byrne.stsp.name (byrne.stsp.name [217.197.84.41]) by einhorn.in-berlin.de (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id w05H4xGO006483 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 5 Jan 2018 18:05:11 +0100 Received: from localhost (byrne.stsp.name [local]) by byrne.stsp.name (OpenSMTPD) with ESMTPA id 5bcbe22f for ; Fri, 5 Jan 2018 18:04:59 +0100 (CET) Date: Fri, 5 Jan 2018 18:04:59 +0100 From: Stefan Sperling To: openbsc@lists.osmocom.org Subject: question about 'lai & lac' paging Message-ID: <20180105170458.GA19240@byrne.stsp.name> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of OpenBSC, OsmoBSC, OsmoNITB, OsmoCSCN" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" I am trying to fix issue OS#2754 "Paging on LAI not working". There are two tests related to this issue: 1) osmo-bsc/tests/bssap/bssap_test 2) TC_paging_imsi_nochan_lai in osmo-ttcn3-hacks/bss The first test is successful with my patch below. But the second test fails. It looks as if the MSC expects a response which is not delivered. I am unsure if the test has wrong expectations or if osmo-bsc is not sending a required response? The test's verdict is: Test case TC_paging_imsi_nochan_lai finished. Verdict: fail reason: Timeout expecting { msg_disc := { msg_group := RSL_MDISC_CCHAN (6), transparent := false }, msg_type := RSL_MT_PAGING_CMD (21), ies := { { iei := ?, body := { chan_nr := { u := { ch0 := RSL_CHAN_NR_PCH_AGCH (18) }, tn := ? } } }, { iei := ?, body := { paging_group := ? } }, { iei := ?, body := { ms_identity := { len := ?, payload := ? } } }, * } } Note that the existing ttcn3 test for the LAC case, which is already supported, and also covered by the bssap_test, fails in the same way: Test case TC_paging_imsi_nochan_lac finished. Verdict: fail reason: Timeout expecting { msg_disc := { msg_group := RSL_MDISC_CCHAN (6), transparent := false }, msg_type := RSL_MT_PAGING_CMD (21), ies := { { iei := ?, body := { chan_nr := { u := { ch0 := RSL_CHAN_NR_PCH_AGCH (18) }, tn := ? } } }, { iei := ?, body := { paging_group := ? } }, { iei := ?, body := { ms_identity := { len := ?, payload := ? } } }, * } } Any hints how to proceed? Thanks, Stefan From 01200d452971cd20c8a0304e180c2d11ff399d3f Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Fri, 5 Jan 2018 17:22:11 +0100 Subject: [PATCH] Implement support for paging by LAI. This is very similar to the paging by LAC case. We can simply extract the LAC at a different offset. Change-Id: Ic3c62ff0fccea586794ea4b3c275a0685cc9326e Related: OS#2751 --- src/osmo-bsc/osmo_bsc_bssap.c | 9 +++++++++ tests/bssap/bssap_test.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 45861ccc..9bc59623 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -288,6 +288,15 @@ static int bssmap_handle_paging(struct bsc_msc_data *msc, lac = GSM_LAC_RESERVED_ALL_BTS; switch (cell_ident) { + case CELL_IDENT_LAI_AND_LAC: + if (data_length != 6) { + LOGP(DMSC, LOGL_ERROR, "Paging IMSI %s: Cell Identifier List for BSS (0x%x)" + " has invalid length: %u, paging entire BSS anyway (%s)\n", + mi_string, CELL_IDENT_BSS, data_length, osmo_hexdump(data, data_length)); + } + lac = osmo_load16be(&data[4]); + break; + case CELL_IDENT_LAC: if (data_length != 3) { LOGP(DMSC, LOGL_ERROR, "Paging IMSI %s: Cell Identifier List for LAC (0x%x)" diff --git a/tests/bssap/bssap_test.c b/tests/bssap/bssap_test.c index 579cae23..2fa2b1fe 100644 --- a/tests/bssap/bssap_test.c +++ b/tests/bssap/bssap_test.c @@ -71,7 +71,7 @@ struct { { "001952080859512069000743940904010844601a060415f5490065", /* ^^^^^^^^^^^^ Cell Identifier List: LAI */ - GSM_LAC_RESERVED_ALL_BTS, 0 + 0x65, 0 }, };