dear holger,
i tried your channel allocation stress-test patch for openbsc with
osmo-bts-trx. i had no crashes, but it helped me to find a bug in the
scheduler. i remember that there was an issue that causes a crash of
osmo-bts (sysmobts, trx ?), but i am not sure. if so, can you give me a
hint, which test procedure caused a crash?
regards,
andreas
Hi,
Is MultiCarrier operation possible with the UmTRX in combination either
OsmoBTS? On another note, is it possible for the outbound MNCC interface to
pass call control to a standard SIP softswitch (kamaillio?) without going
through LCR?
The New function offers the actual octet that is needed to correctly
compose USSD response.
---
openbsc/src/libmsc/gsm_04_80.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/openbsc/src/libmsc/gsm_04_80.c b/openbsc/src/libmsc/gsm_04_80.c
index 39738a5..1b1c449 100644
--- a/openbsc/src/libmsc/gsm_04_80.c
+++ b/openbsc/src/libmsc/gsm_04_80.c
@@ -72,7 +72,7 @@ int gsm0480_send_ussd_response(struct gsm_subscriber_connection *conn,
/* First put the payload text into the message */
ptr8 = msgb_put(msg, 0);
- response_len = gsm_7bit_encode(ptr8, response_text);
+ gsm_7bit_encode_ussd(ptr8, response_text, &response_len);
msgb_put(msg, response_len);
/* Then wrap it as an Octet String */
--
1.7.3.4
Bit of a random one,
After I start Osmo-NITB is there any way for me to stop the process. I have
had a look around the VTY interface, with not much luck.
The only way I have found so far is by pressing CTRL+Z in the terminal
window, but I then have to restart the computer to be able to start
Osmo-NITB again.
Many thanks,
Ash
Compiled with ubuntu 1204 (precise), where -Wformat-security is enabled by
-Wall.
Test yields ok, but the current implementation doesn't properly support
multi-character separators and end strings. So the test output is truncated.
Addresses:
utils.c: In function 'vty_cmd_string_from_valstr':
utils.c:84:2: warning: format not a string literal and no format arguments [-Wformat-security]
utils.c:84:2: warning: format not a string literal and no format arguments [-Wformat-security]
utils.c:108:2: warning: format not a string literal and no format arguments [-Wformat-security]
utils.c:108:2: warning: format not a string literal and no format arguments [-Wformat-security]
---
.gitignore | 1 +
src/vty/utils.c | 4 ++--
tests/Makefile.am | 9 +++++--
tests/testsuite.at | 6 +++++
tests/vty/vty_test.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++
tests/vty/vty_test.ok | 3 +++
6 files changed, 81 insertions(+), 4 deletions(-)
create mode 100644 tests/vty/vty_test.c
create mode 100644 tests/vty/vty_test.ok
diff --git a/.gitignore b/.gitignore
index 2ed0144..da36165 100644
--- a/.gitignore
+++ b/.gitignore
@@ -72,6 +72,7 @@ tests/fr/fr_test
tests/loggingrb/loggingrb_test
tests/ringbuf/ringbuf_test
tests/strrb/strrb_test
+tests/vty/vty_test
utils/osmo-arfcn
utils/osmo-auc-gen
diff --git a/src/vty/utils.c b/src/vty/utils.c
index e9c0d2d..88932fa 100644
--- a/src/vty/utils.c
+++ b/src/vty/utils.c
@@ -81,7 +81,7 @@ char *vty_cmd_string_from_valstr(void *ctx, const struct value_string *vals,
if (!str)
return NULL;
- ret = snprintf(str + offset, rem, prefix);
+ ret = snprintf(str + offset, rem, "%s", prefix);
if (ret < 0)
goto err;
OSMO_SNPRINTF_RET(ret, rem, offset, len);
@@ -105,7 +105,7 @@ char *vty_cmd_string_from_valstr(void *ctx, const struct value_string *vals,
offset--; /* to remove the trailing | */
rem++;
- ret = snprintf(str + offset, rem, end);
+ ret = snprintf(str + offset, rem, "%s", end);
if (ret < 0)
goto err;
OSMO_SNPRINTF_RET(ret, rem, offset, len);
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e5fc718..ecb2b6c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -5,7 +5,8 @@ check_PROGRAMS = timer/timer_test sms/sms_test ussd/ussd_test \
conv/conv_test auth/milenage_test lapd/lapd_test \
gsm0808/gsm0808_test gsm0408/gsm0408_test \
gb/bssgp_fc_test logging/logging_test fr/fr_test \
- loggingrb/loggingrb_test strrb/strrb_test
+ loggingrb/loggingrb_test strrb/strrb_test \
+ vty/vty_test
if ENABLE_MSGFILE
check_PROGRAMS += msgfile/msgfile_test
@@ -62,6 +63,9 @@ loggingrb_loggingrb_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_buildd
strrb_strrb_test_SOURCES = strrb/strrb_test.c
strrb_strrb_test_LDADD = $(top_builddir)/src/libosmocore.la
+vty_vty_test_SOURCES = vty/vty_test.c
+vty_vty_test_LDADD = $(top_builddir)/src/vty/libosmovty.la $(top_builddir)/src/libosmocore.la
+
# The `:;' works around a Bash 3.2 bug when the output is not writeable.
$(srcdir)/package.m4: $(top_srcdir)/configure.ac
@@ -91,7 +95,8 @@ EXTRA_DIST = testsuite.at $(srcdir)/package.m4 $(TESTSUITE) \
msgfile/msgfile_test.ok msgfile/msgconfig.cfg \
logging/logging_test.ok logging/logging_test.err \
fr/fr_test.ok loggingrb/logging_test.ok \
- loggingrb/logging_test.err strrb/strrb_test.ok
+ loggingrb/logging_test.err strrb/strrb_test.ok \
+ vty/vty_test.ok
DISTCLEANFILES = atconfig
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 684ec4f..1a6fa55 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -112,3 +112,9 @@ AT_KEYWORDS([strrb])
cat $abs_srcdir/strrb/strrb_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/strrb/strrb_test], [0], [expout], [ignore])
AT_CLEANUP
+
+AT_SETUP([vty])
+AT_KEYWORDS([vty])
+cat $abs_srcdir/vty/vty_test.ok > expout
+AT_CHECK([$abs_top_builddir/tests/vty/vty_test], [0], [expout], [ignore])
+AT_CLEANUP
diff --git a/tests/vty/vty_test.c b/tests/vty/vty_test.c
new file mode 100644
index 0000000..6a53fb8
--- /dev/null
+++ b/tests/vty/vty_test.c
@@ -0,0 +1,62 @@
+/* (C) 2013 by Jacob Erlbeck <jerlbeck(a)osmocom.de>
+ * All Rights Reserved
+ *
+ * This program is iree 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 3 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 <stdio.h>
+#include <string.h>
+
+#include <osmocom/core/talloc.h>
+#include <osmocom/core/logging.h>
+#include <osmocom/core/utils.h>
+#include <osmocom/vty/misc.h>
+
+static void init_vty(void)
+{
+}
+
+static void free_vty(void)
+{
+}
+
+static void test_cmd_string_from_valstr(void)
+{
+ char *cmd;
+ const struct value_string printf_seq_vs[] = {
+ { .value = 42, .str = "[foo%s%s%s%s%s]"},
+ { .value = 43, .str = "[bar%s%s%s%s%s]"},
+ { .value = 0, .str = NULL}
+ };
+
+ printf("Going to test vty_cmd_string_from_valstr()\n");
+
+ // check against character strings that could break printf
+
+ cmd = vty_cmd_string_from_valstr (NULL, printf_seq_vs, "[prefix%s%s%s%s%s]", "[sep%s%s%s%s%s]", "[end%s%s%s%s%s]", 1);
+ printf ("Tested with %%s-strings, resulting cmd = '%s'\n", cmd);
+ talloc_free (cmd);
+}
+
+int main(int argc, char **argv)
+{
+ init_vty();
+ test_cmd_string_from_valstr();
+ printf("All tests passed\n");
+
+ free_vty();
+ return 0;
+}
diff --git a/tests/vty/vty_test.ok b/tests/vty/vty_test.ok
new file mode 100644
index 0000000..9ff68c8
--- /dev/null
+++ b/tests/vty/vty_test.ok
@@ -0,0 +1,3 @@
+Going to test vty_cmd_string_from_valstr()
+Tested with %s-strings, resulting cmd = '[prefix%s%s%s%s%s][foo%s%s%s%s%s][sep%s%s%s%s%s]['
+All tests passed
--
1.7.9.5
Patrick Klapper <ptmk06 <at> googlemail.com> writes:
>
> Hello,
>
> I am interested in buying a nanoBTS.
> The sales department of ip.access told me, that they only sell their
products to mobile operators.
>
> Where can I buy an ip.access nanoBTS (GSM1800) and what's its price?
>
> Regards
>
> Patrick
>
>
Hello Patrick,
Still searching for the nanoBTS?
I have one for sale.
Kind regards,
Patrick
=======
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hey folks,
I have just received this new piece of hardware and I wanted to share some preliminary info about it.
As far as I noticed, the picocell was used by Orange UK some years ago.
As you will see from the photos below the board has different populated pins, which one of them seems a 14-pin JTAG connector. (I apologise for the low quality of the images, but at the moment is the best I can do)
At the moment I am unable to fully test it cause logic analyzer, jtag and uart connectors are physically not with me.
In the meanwhile I will get them, I was wondering if someone of you guys already had the opportunity to play with it. Or have more info/specs/etc. about it.
- -------------------------------------
IC PRIXPH425BT (Intel):
- -------------------------------------
http://media.digikey.com/pdf/Data%20Sheets/Intel%20PDFs/IXP42X,%20IXC1100.p…http://media.digikey.com/pdf/Data%20Sheets/Intel%20PDFs/IXP42X,%20IXC1100%2…
- -------------------------------------
PHOTOS
- -------------------------------------
http://imageshack.us/a/img856/5395/d0xt.jpghttp://imageshack.us/a/img266/8011/x64h.jpghttp://imageshack.us/a/img801/9504/0zir.jpghttp://imageshack.us/a/img839/4488/sq4r.jpg
- -------------------------------------
NMAP SCAN
- -------------------------------------
These are the ports available on the LAN side:
PORT STATE SERVICE VERSION
22/tcp open ssh Dropbear sshd 0.47 (protocol 2.0)
23/tcp open telnet NASLite-SMB/Sveasoft Alchemy firmware telnetd
53/tcp open domain dnsmasq 2.31
80/tcp open http Boa HTTPd 0.93.15
443/tcp open ssl/http Boa HTTPd 0.93.15
I have already tried a known vuln for Boa HTTPd 0.93.15 to bypass auth, but since the webapp is customized, that flaw is no longer available.
At the moment I am trying to bruteforce ssh/telnet, but I guess it would not get any result.
Overall, while continuing to disassemble and test it, If someone have some hints or material to share, is welcome.
Cheers,
Luca
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
iQIcBAEBAgAGBQJR/izEAAoJEPLE1Qsi6ZiTOBYP+wTEeqOYpUxULV24dF8FBu/W
ZwL18Dw8zZAp2AEn7C4bGbajH/OAmrTz0Ae0a/jiZCxDEtN7MlF82+9cy8aQvQh/
xMeA3BiA9HlmDKJJO3fsCBoUNXXLIMt4/8F779qPtE2kNRGCkwafVkID93kU2qtA
KGUsLeXHZyOzTbxtvwzxwQmAAyna3I2Z4jLzj3O61fpElR2CwFLSokcAqfYp1wNL
gw/ofYZhBISqsCn403DMRcZTrfiO8YuqG0I3gdOtrrI2u2UPW3U6OGgtNi3Lz0Gn
vLCeS5PMjrhdDKGGEd0IJRZu20QWKJVHUeksQ+fVI6o28TQ84bmvkohkuE8mhzYA
rVPzva9+QJbGCHce0+UX3mSjtNl4Tsr1qJ6+useqQaa0KmHLR5SRMEBRAdvMAVQ7
5cgetujabmwyzeNtZECIxZlLmpfscm2ckiSYvnnH4gM3xhS0FZ6i3a5zSCdzCNHT
RqFOlBLAUHopS9p5AoAQP5nWqK+xuj3iVWGq++pk6Q/aK7kvMNtlAIpQNhcDN236
9iHloZfeW/eIIBVhtNe6NEuAt4ry8hbeiuGjzJtAR+WAR/PwCtgdEQdOZnLD2LWV
FhVNsGySrVvP63gZqhhsW8sUpP8IUaTzoKBgyZ7+fLDoRdqKFVcs+xhqzIfV5dm8
YumNguOR7GwCcAGgBW8g
=d+QM
-----END PGP SIGNATURE-----
Hi Peter,
> Ok. Do you have a later message from the following line?
> LOGP(DLLAPD, LOGL_INFO, "I received in state %s\n", lapd_state_names[dl->state]);
Sure, this is how it looks with all relevant debugging enabled:
Fri Aug 2 16:50:13 2013 <0018> lapd_core.c:1465 I received in state LAPD_STATE_MF_EST
Fri Aug 2 16:50:13 2013 <0018> lapd_core.c:1548 incrementing V(R) to 1
Fri Aug 2 16:50:13 2013 <0018> lapd_core.c:222 stop T203
Fri Aug 2 16:50:13 2013 <0018> lapd_core.c:206 start T203
Fri Aug 2 16:50:13 2013 <0018> lapd_core.c:1557 message in single I frame
Fri Aug 2 16:50:13 2013 <001b> e1_input.c:594 RX: 80 80 00 08 81 00 00 01 5f 23 01 01 sapi=62 tei=1
Fri Aug 2 16:50:13 2013 <0005> bts_nokia_site.c:1668 Nokia: Abis received!
Fri Aug 2 16:50:13 2013 <0005> bts_nokia_site.c:1688 ABIS_OM_MDISC_FOM
Fri Aug 2 16:50:13 2013 <0005> bts_nokia_site.c:1515 (0x81) NOKIA_BTS_ACK
Fri Aug 2 16:50:13 2013 <0005> bts_nokia_site.c:1547 ACK = 1
Fri Aug 2 16:50:13 2013 <0005> bts_nokia_site.c:1588 Nokia: STOP OML
& RSL lapd (cause: RESET)
Fri Aug 2 16:50:13 2013 <0018> input/lapd.c:513 LAPD DL-RELEASE request TEI=1 SAPI=62
Fri Aug 2 16:50:13 2013 <0018> lapd_core.c:2183 Message DL-RELEASE-REQUEST received in state LAPD_STATE_MF_EST
Fri Aug 2 16:50:13 2013 <0018> lapd_core.c:2024 perform local release
Fri Aug 2 16:50:13 2013 <0018> lapd_core.c:229 new state LAPD_STATE_MF_EST -> LAPD_STATE_IDLE
Fri Aug 2 16:50:13 2013 <0018> lapd_core.c:222 stop T203
Fri Aug 2 16:50:13 2013 <0018> input/lapd.c:628 LAPD DL-RELEASE confirm TEI=1 SAPI=62
Fri Aug 2 16:50:13 2013 <001b> e1_input.c:585 DL_REL: sapi(62) tei(1)
Fri Aug 2 16:50:13 2013 <001b> bsc_init.c:318 Lost some E1 TEI link: 1 0x887f038
Fri Aug 2 16:50:13 2013 <0018> lapd_core.c:1781 lapd_send_i() called from line 1615
Segmentation fault (core dumped)
bsc_init.c probably complaining because the LAPD connection is closed,
but the OML context does not. Maybe this is the root cause of the
problem: if the OML context not disconnected with the LAPD connection,
it still listens on the OML timeslot and if something got received, it
tries to process it. But still: this is not how it should work. The
OML context is not closed, because we are waiting for the already
resetting BTS, then the OML lapd got restarted again (after the
RESET_TIMER expired). My opinion is that after we closed the lapd
connection, it should not reactivate itself, if data appears on the OML
TS.
BR,
Csaba