diff -Nru openbsc-1.3.2+dfsg1/debian/changelog openbsc-1.4.0+dfsg1/debian/changelog --- openbsc-1.3.2+dfsg1/debian/changelog 2020-12-14 11:47:31.000000000 +0000 +++ openbsc-1.4.0+dfsg1/debian/changelog 2021-05-10 01:57:36.000000000 +0000 @@ -1,9 +1,17 @@ -openbsc (1.3.2+dfsg1-2ubuntu2) hirsute; urgency=medium +openbsc (1.4.0+dfsg1-1ubuntu1) impish; urgency=medium - * Don't build with -Werror=null-dereference. Fails with -O3 on ppc64el, - and with -O2 on s390x (more agressive inlining and loop unrolling). + * Restore doko's patch from 1.3.2+dfsg1-2ubuntu2 to not build with + -Werror=null-dereference, as it is still necessary with the new upstream + release. - -- Matthias Klose Mon, 14 Dec 2020 12:47:31 +0100 + -- Logan Rosen Sun, 09 May 2021 21:57:36 -0400 + +openbsc (1.4.0+dfsg1-1) unstable; urgency=medium + + * New upstream release (Closes: #898109) + * remove gcc10.patch (applied upstream) + + -- Thorsten Alteholz Wed, 06 Jan 2021 19:54:13 +0000 openbsc (1.3.2+dfsg1-2) unstable; urgency=medium @@ -26,13 +34,6 @@ -- Thorsten Alteholz Wed, 05 Aug 2020 20:51:19 +0200 -openbsc (1.1.0-2ubuntu1) disco; urgency=low - - * Merge from Debian unstable. Remaining changes: - - Build with -O2 on ppc64el, working around a ftbfs. - - -- Steve Langasek Tue, 13 Nov 2018 08:19:33 -0800 - openbsc (1.1.0-2) unstable; urgency=low * Upload to unstable @@ -51,24 +52,6 @@ -- Thorsten Alteholz Fri, 22 Jun 2018 19:27:08 +0200 -openbsc (1.0.0-2ubuntu1) cosmic; urgency=medium - - * Build with -O2 on ppc64el, working around a ftbfs. See #898109. - - -- Matthias Klose Sun, 13 May 2018 13:49:11 -0400 - -openbsc (1.0.0-2build2) cosmic; urgency=medium - - * No-change rebuild for osmo soname changes. - - -- Matthias Klose Mon, 07 May 2018 09:22:10 +0000 - -openbsc (1.0.0-2build1) cosmic; urgency=medium - - * No-change rebuild for osmo soname changes. - - -- Matthias Klose Sun, 06 May 2018 09:48:21 +0200 - openbsc (1.0.0-2) unstable; urgency=medium * debian/rules: remove arch specific commands (Closes: #896193) @@ -121,4 +104,3 @@ * Initial release (Closes: #806583) -- Ruben Undheim Sat, 20 Feb 2016 18:21:53 +0100 - diff -Nru openbsc-1.3.2+dfsg1/debian/patches/gcc10.patch openbsc-1.4.0+dfsg1/debian/patches/gcc10.patch --- openbsc-1.3.2+dfsg1/debian/patches/gcc10.patch 2020-12-12 16:00:34.000000000 +0000 +++ openbsc-1.4.0+dfsg1/debian/patches/gcc10.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -From d2550da76f9974bb1957f74c5d3eb75fdae923d9 Mon Sep 17 00:00:00 2001 -From: Harald Welte -Date: Mon, 20 Apr 2020 20:14:01 +0200 -Subject: [PATCH] fix compilation with gcc-10 - -See also: https://alioth-lists.debian.net/pipermail/debian-mobcom-maintainers/Week-of-Mon-20200413/000648.html - -Change-Id: I0e9596c3ef26231999c729b5cc408fcaca3790fc ---- - -Index: openbsc-1.3.2/openbsc/include/openbsc/gsm_data_shared.h -=================================================================== ---- openbsc-1.3.2.orig/openbsc/include/openbsc/gsm_data_shared.h 2020-08-19 00:14:50.560852571 +0000 -+++ openbsc-1.3.2/openbsc/include/openbsc/gsm_data_shared.h 2020-08-19 00:14:50.556852571 +0000 -@@ -379,13 +379,13 @@ - #endif - }; - --enum { -+enum gsm_bts_trx_ts_flags { - TS_F_PDCH_ACTIVE = 0x1000, - TS_F_PDCH_ACT_PENDING = 0x2000, - TS_F_PDCH_DEACT_PENDING = 0x4000, - TS_F_PDCH_PENDING_MASK = 0x6000 /*< - TS_F_PDCH_ACT_PENDING | TS_F_PDCH_DEACT_PENDING */ --} gsm_bts_trx_ts_flags; -+}; - - /* One Timeslot in a TRX */ - struct gsm_bts_trx_ts { -@@ -945,8 +945,8 @@ - const char *btsvariant2str(enum gsm_bts_type_variant v); - - extern const struct value_string gsm_chreq_descs[]; --const struct value_string gsm_pchant_names[13]; --const struct value_string gsm_pchant_descs[13]; -+extern const struct value_string gsm_pchant_names[13]; -+extern const struct value_string gsm_pchant_descs[13]; - const char *gsm_pchan_name(enum gsm_phys_chan_config c); - enum gsm_phys_chan_config gsm_pchan_parse(const char *name); - const char *gsm_lchant_name(enum gsm_chan_t c); -Index: openbsc-1.3.2/openbsc/src/libbsc/bsc_subscriber.c -=================================================================== ---- openbsc-1.3.2.orig/openbsc/src/libbsc/bsc_subscriber.c 2020-08-19 00:14:50.560852571 +0000 -+++ openbsc-1.3.2/openbsc/src/libbsc/bsc_subscriber.c 2020-08-19 00:14:50.556852571 +0000 -@@ -91,6 +91,8 @@ - if (bsub) - return bsub; - bsub = bsc_subscr_alloc(list); -+ if (!bsub) -+ return NULL; - bsc_subscr_set_imsi(bsub, imsi); - return bsub; - } -@@ -103,6 +105,8 @@ - if (bsub) - return bsub; - bsub = bsc_subscr_alloc(list); -+ if (!bsub) -+ return NULL; - bsub->tmsi = tmsi; - return bsub; - } diff -Nru openbsc-1.3.2+dfsg1/debian/patches/series openbsc-1.4.0+dfsg1/debian/patches/series --- openbsc-1.3.2+dfsg1/debian/patches/series 2020-12-14 11:47:31.000000000 +0000 +++ openbsc-1.4.0+dfsg1/debian/patches/series 2021-05-10 01:57:33.000000000 +0000 @@ -1,4 +1,3 @@ lintian-spelling.patch set_version_explicitly.patch -gcc10.patch no-Werror=null-dereference.diff diff -Nru openbsc-1.3.2+dfsg1/manuals/.gitignore openbsc-1.4.0+dfsg1/manuals/.gitignore --- openbsc-1.3.2+dfsg1/manuals/.gitignore 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/manuals/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -*.html -*.svg -*.pdf -*__*.png -*.check -generated -common -build diff -Nru openbsc-1.3.2+dfsg1/manuals/OsmoBSCMGCP/Makefile openbsc-1.4.0+dfsg1/manuals/OsmoBSCMGCP/Makefile --- openbsc-1.3.2+dfsg1/manuals/OsmoBSCMGCP/Makefile 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/manuals/OsmoBSCMGCP/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -OSMO_GSM_MANUALS_DIR := $(shell ../osmo-gsm-manuals-dir.sh) -srcdir=$(CURDIR) - -VTY_REFERENCE = osmo-bsc-mgcp-vty-reference.xml -include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc - -include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc diff -Nru openbsc-1.3.2+dfsg1/manuals/OsmoBSCMGCP/osmo-bsc-mgcp-vty-reference.xml openbsc-1.4.0+dfsg1/manuals/OsmoBSCMGCP/osmo-bsc-mgcp-vty-reference.xml --- openbsc-1.3.2+dfsg1/manuals/OsmoBSCMGCP/osmo-bsc-mgcp-vty-reference.xml 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/manuals/OsmoBSCMGCP/osmo-bsc-mgcp-vty-reference.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ - - - - -]> - - - - - - v1 - 13th August 2012 - hf - Initial - - - v2 - 5th March 2014 - hf - Update to match osmo-bsc version 0.13.0-305 - - - - OsmoBSCMGCP VTY Reference - - - 2012-2014 - - - - This work is copyright by sysmocom - s.f.m.c. GmbH. All rights reserved. - - - - - - &chapter-vty; - - diff -Nru openbsc-1.3.2+dfsg1/manuals/OsmoBSCMGCP/vty/mgcp_vty_additions.xml openbsc-1.4.0+dfsg1/manuals/OsmoBSCMGCP/vty/mgcp_vty_additions.xml --- openbsc-1.3.2+dfsg1/manuals/OsmoBSCMGCP/vty/mgcp_vty_additions.xml 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/manuals/OsmoBSCMGCP/vty/mgcp_vty_additions.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - MGCP Global Commands - This node allows to configure global MGCP settings. These include - the various port numbers. - - - - MGCP Trunk Command - This node allows to configure a MGCP trunk. These include the number, - the local binding ports, SDP configuration. - - diff -Nru openbsc-1.3.2+dfsg1/manuals/OsmoBSCMGCP/vty/mgcp_vty_reference.xml openbsc-1.4.0+dfsg1/manuals/OsmoBSCMGCP/vty/mgcp_vty_reference.xml --- openbsc-1.3.2+dfsg1/manuals/OsmoBSCMGCP/vty/mgcp_vty_reference.xml 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/manuals/OsmoBSCMGCP/vty/mgcp_vty_reference.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,1397 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru openbsc-1.3.2+dfsg1/manuals/OsmoBSCNAT/chapters/counters_generated.adoc openbsc-1.4.0+dfsg1/manuals/OsmoBSCNAT/chapters/counters_generated.adoc --- openbsc-1.3.2+dfsg1/manuals/OsmoBSCNAT/chapters/counters_generated.adoc 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/manuals/OsmoBSCNAT/chapters/counters_generated.adoc 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ - -// autogenerated by show asciidoc counters -These counters and their description based on OsmoBSCNAT 1.3.0 (OsmoBSCNAT). - -=== Rate Counters - -// generating tables for rate_ctr_group -// rate_ctr_group table NAT Access-List Statistics -.nat:filter - NAT Access-List Statistics -[options="header"] -|=== -| Name | Reference | Description -| access-list:local-filter | <> | Rejected by rule for local -| access-list:global-filter | <> | Rejected by rule for global -|=== -// rate_ctr_group table NAT BSC Statistics -.nat:bsc - NAT BSC Statistics -[options="header"] -|=== -| Name | Reference | Description -| sccp:conn | <> | SCCP Connections -| sccp:calls | <> | SCCP Assignment Commands -| net:reconnects | <> | Network reconnects -| dropped:sccp | <> | Dropped SCCP connections -| dropped:calls | <> | Dropped active calls. -| rejected:cr | <> | Rejected CR due filter -| rejected:msg | <> | Rejected MSG due filter -| rejected:ill | <> | Rejected due parse error -| conn:lu | <> | Conn Location Update -| conn:rq | <> | Conn CM Service Req -| conn:pag | <> | Conn Paging Response -| conn:ssa | <> | Conn USSD -| conn:other | <> | Conn Other -|=== -== Osmo Stat Items - -// generating tables for osmo_stat_items -== Osmo Counters - -// generating tables for osmo_counters -// ungrouped osmo_counters -.ungrouped osmo counters -[options="header"] -|=== -| Name | Reference | Description -| nat.sccp.conn | <> | -| nat.sccp.calls | <> | -| nat.bsc.conn | <> | -| nat.bsc.auth_fail | <> | -| nat.msc.conn | <> | -| nat.ussd.conn | <> | -|=== diff -Nru openbsc-1.3.2+dfsg1/manuals/OsmoBSCNAT/Makefile openbsc-1.4.0+dfsg1/manuals/OsmoBSCNAT/Makefile --- openbsc-1.3.2+dfsg1/manuals/OsmoBSCNAT/Makefile 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/manuals/OsmoBSCNAT/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -OSMO_GSM_MANUALS_DIR := $(shell ../osmo-gsm-manuals-dir.sh) -srcdir=$(CURDIR) - -VTY_REFERENCE = osmo-bsc-nat-vty-reference.xml -include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc - -include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc diff -Nru openbsc-1.3.2+dfsg1/manuals/OsmoBSCNAT/osmo-bsc-nat-vty-reference.xml openbsc-1.4.0+dfsg1/manuals/OsmoBSCNAT/osmo-bsc-nat-vty-reference.xml --- openbsc-1.3.2+dfsg1/manuals/OsmoBSCNAT/osmo-bsc-nat-vty-reference.xml 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/manuals/OsmoBSCNAT/osmo-bsc-nat-vty-reference.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ - - - - -]> - - - - - - v1 - 13th August 2012 - hf - Initial - - - v2 - 5th March 2014 - hf - Update to match osmo-bsc version 0.13.0-305 - - - - OsmoBSCNAT VTY Reference - - - 2012-2014 - - - - This work is copyright by sysmocom - s.f.m.c. GmbH. All rights reserved. - - - - - - &chapter-vty; - - diff -Nru openbsc-1.3.2+dfsg1/manuals/OsmoBSCNAT/vty/nat_vty_additions.xml openbsc-1.4.0+dfsg1/manuals/OsmoBSCNAT/vty/nat_vty_additions.xml --- openbsc-1.3.2+dfsg1/manuals/OsmoBSCNAT/vty/nat_vty_additions.xml 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/manuals/OsmoBSCNAT/vty/nat_vty_additions.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ - - - - MGCP Commands - This node allows to configure global MGCP settings. These include - the various port numbers. - - - - - NAT Commands - This node allows to configure the global NAT settings. These include - the destination address of the MSC, the filter and rewriting rules to use. - - - - BSC Commands - This node allows to configure a BSC. A BSC has a list of - LACs, an access token associated to it. - - - - - - - Paging Group Commands - This node allows to configure a Paging Group. A Paging Group - holds the LACs of several destinations and a BSC can refer to a Paging - Group. This way several BSCs can receive the paging for a shared LAC. - - - diff -Nru openbsc-1.3.2+dfsg1/manuals/OsmoBSCNAT/vty/nat_vty_reference.xml openbsc-1.4.0+dfsg1/manuals/OsmoBSCNAT/vty/nat_vty_reference.xml --- openbsc-1.3.2+dfsg1/manuals/OsmoBSCNAT/vty/nat_vty_reference.xml 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/manuals/OsmoBSCNAT/vty/nat_vty_reference.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,2289 +0,0 @@ - - - Common Commands - These commands are available on all VTY nodes. They are listed here only once, to unclutter the VTY reference. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - view - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enable - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - config - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - config-log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - config-stats - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - config-line - - - - - - - - - - - - - - - - - - - - - config-ctrl - - - - - - - - - config-mgcp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - config-nat - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - config-nat-bsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - config-mgcp-trunk - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - config-nat-paging-group - - - - - - - - - - - - - - - diff -Nru openbsc-1.3.2+dfsg1/manuals/osmo-gsm-manuals-dir.sh openbsc-1.4.0+dfsg1/manuals/osmo-gsm-manuals-dir.sh --- openbsc-1.3.2+dfsg1/manuals/osmo-gsm-manuals-dir.sh 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/manuals/osmo-gsm-manuals-dir.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -#!/bin/sh -e -# Find OSMO_GSM_MANUALS_DIR and print it to stdout. Print where it was taken from to stderr. - -# Find it in env, pkg-conf and ../../osmo-gsm-manuals -RET="$OSMO_GSM_MANUALS_DIR" -if [ -n "$RET" ]; then - RET="$(realpath $RET)" - echo "OSMO_GSM_MANUALS_DIR: $RET (from env)" >&2 -else - RET="$(pkg-config osmo-gsm-manuals --variable=osmogsmmanualsdir 2>/dev/null || true)" - if [ -n "$RET" ]; then - echo "OSMO_GSM_MANUALS_DIR: $RET (from pkg-conf)" >&2 - else - RET="$(realpath $(realpath $(dirname $0))/../../osmo-gsm-manuals)" - echo "OSMO_GSM_MANUALS_DIR: $RET (fallback)" >&2 - fi -fi - -# Print the result or error message -if [ -d "$RET" ]; then - echo "$RET" -else - echo "ERROR: OSMO_GSM_MANUALS_DIR does not exist!" >&2 - echo "Install osmo-gsm-manuals or set OSMO_GSM_MANUALS_DIR." >&2 - exit 1 -fi diff -Nru openbsc-1.3.2+dfsg1/openbsc/include/openbsc/gsm_data_shared.h openbsc-1.4.0+dfsg1/openbsc/include/openbsc/gsm_data_shared.h --- openbsc-1.3.2+dfsg1/openbsc/include/openbsc/gsm_data_shared.h 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/include/openbsc/gsm_data_shared.h 2020-12-10 16:07:15.000000000 +0000 @@ -379,13 +379,13 @@ #endif }; -enum { +enum gsm_bts_trx_ts_flags { TS_F_PDCH_ACTIVE = 0x1000, TS_F_PDCH_ACT_PENDING = 0x2000, TS_F_PDCH_DEACT_PENDING = 0x4000, TS_F_PDCH_PENDING_MASK = 0x6000 /*< TS_F_PDCH_ACT_PENDING | TS_F_PDCH_DEACT_PENDING */ -} gsm_bts_trx_ts_flags; +}; /* One Timeslot in a TRX */ struct gsm_bts_trx_ts { @@ -945,8 +945,8 @@ const char *btsvariant2str(enum gsm_bts_type_variant v); extern const struct value_string gsm_chreq_descs[]; -const struct value_string gsm_pchant_names[13]; -const struct value_string gsm_pchant_descs[13]; +extern const struct value_string gsm_pchant_names[13]; +extern const struct value_string gsm_pchant_descs[13]; const char *gsm_pchan_name(enum gsm_phys_chan_config c); enum gsm_phys_chan_config gsm_pchan_parse(const char *name); const char *gsm_lchant_name(enum gsm_chan_t c); diff -Nru openbsc-1.3.2+dfsg1/openbsc/osmoappdesc.py openbsc-1.4.0+dfsg1/openbsc/osmoappdesc.py --- openbsc-1.3.2+dfsg1/openbsc/osmoappdesc.py 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/osmoappdesc.py 2020-12-10 16:07:15.000000000 +0000 @@ -39,10 +39,11 @@ apps = [(4242, "src/osmo-bsc/osmo-bsc-sccplite", "OsmoBSC", "osmo-bsc-sccplite"), (4244, "src/osmo-bsc_nat/osmo-bsc_nat", "OsmoBSCNAT", "nat"), (4243, "src/osmo-bsc_mgcp/osmo-bsc_mgcp", "OpenBSC MGCP", "mgcp"), - (4242, "src/osmo-nitb/osmo-nitb", "OpenBSC", "nitb"), + (4242, "src/osmo-nitb/osmo-nitb --yes-i-really-want-to-run-prehistoric-software", "OpenBSC", "nitb"), ] vty_command = ["./src/osmo-nitb/osmo-nitb", "-c", - "doc/examples/osmo-nitb/nanobts/osmo-nitb.cfg"] + "doc/examples/osmo-nitb/nanobts/osmo-nitb.cfg", + "--yes-i-really-want-to-run-prehistoric-software"] vty_app = apps[3] # reference apps[] entry for osmo-nitb diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/libbsc/abis_rsl.c openbsc-1.4.0+dfsg1/openbsc/src/libbsc/abis_rsl.c --- openbsc-1.3.2+dfsg1/openbsc/src/libbsc/abis_rsl.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/libbsc/abis_rsl.c 2020-12-10 16:07:15.000000000 +0000 @@ -686,6 +686,13 @@ msgb_tv_put(msg, RSL_IE_BS_POWER, lchan->bs_power); msgb_tv_put(msg, RSL_IE_MS_POWER, lchan->ms_power); msgb_tv_put(msg, RSL_IE_TIMING_ADVANCE, ta); + /* indicate MS power control to be performed by BTS: */ + if (lchan->ts->trx->bts->type == GSM_BTS_TYPE_OSMOBTS) + msgb_tl_put(msg, RSL_IE_MS_POWER_PARAM); + /* else: Since IE MS_POWER_PARAM content is operator dependent, it's not + known if non-osmocom BTS models will support an empty IE, so let's + better skip sending it unless we know for sure what each expects. */ + mr_config_for_bts(lchan, msg); msg->dst = lchan->ts->trx->rsl_link; diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/libbsc/bsc_msc.c openbsc-1.4.0+dfsg1/openbsc/src/libbsc/bsc_msc.c --- openbsc-1.3.2+dfsg1/openbsc/src/libbsc/bsc_msc.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/libbsc/bsc_msc.c 2020-12-10 16:07:15.000000000 +0000 @@ -81,7 +81,7 @@ queue = container_of(fd, struct osmo_wqueue, bfd); con = container_of(queue, struct bsc_msc_connection, write_queue); - if ((what & BSC_FD_WRITE) == 0) { + if ((what & OSMO_FD_WRITE) == 0) { LOGP(DMSC, LOGL_ERROR, "MSC(%s) Callback but not writable.\n", con->name); return -1; @@ -107,7 +107,7 @@ /* go to full operation */ fd->cb = osmo_wqueue_bfd_cb; - fd->when = BSC_FD_READ | BSC_FD_EXCEPT; + fd->when = OSMO_FD_READ | OSMO_FD_EXCEPT; con->is_connected = 1; LOGP(DMSC, LOGL_NOTICE, @@ -209,7 +209,7 @@ if (ret == -1 && errno == EINPROGRESS) { LOGP(DMSC, LOGL_ERROR, "MSC(%s) Connection in progress\n", con->name); - fd->when = BSC_FD_WRITE; + fd->when = OSMO_FD_WRITE; fd->cb = msc_connection_connect; osmo_timer_setup(&con->timeout_timer, msc_con_timeout, con); osmo_timer_schedule(&con->timeout_timer, 20, 0); @@ -218,7 +218,7 @@ connection_loss(con); return ret; } else { - fd->when = BSC_FD_READ | BSC_FD_EXCEPT; + fd->when = OSMO_FD_READ | OSMO_FD_EXCEPT; fd->cb = osmo_wqueue_bfd_cb; con->is_connected = 1; if (con->connected) diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/libbsc/bsc_rf_ctrl.c openbsc-1.4.0+dfsg1/openbsc/src/libbsc/bsc_rf_ctrl.c --- openbsc-1.3.2+dfsg1/openbsc/src/libbsc/bsc_rf_ctrl.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/libbsc/bsc_rf_ctrl.c 2020-12-10 16:07:15.000000000 +0000 @@ -373,7 +373,7 @@ osmo_wqueue_init(&conn->queue, 10); conn->queue.bfd.data = conn; conn->queue.bfd.fd = fd; - conn->queue.bfd.when = BSC_FD_READ | BSC_FD_WRITE; + conn->queue.bfd.when = OSMO_FD_READ | OSMO_FD_WRITE; conn->queue.read_cb = rf_read_cmd; conn->queue.write_cb = rf_write_cmd; conn->rf = rf; @@ -479,7 +479,7 @@ return -1; } - bfd->when = BSC_FD_READ; + bfd->when = OSMO_FD_READ; bfd->cb = rf_ctrl_accept; bfd->data = rf; diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/libbsc/bsc_subscriber.c openbsc-1.4.0+dfsg1/openbsc/src/libbsc/bsc_subscriber.c --- openbsc-1.3.2+dfsg1/openbsc/src/libbsc/bsc_subscriber.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/libbsc/bsc_subscriber.c 2020-12-10 16:07:15.000000000 +0000 @@ -91,6 +91,8 @@ if (bsub) return bsub; bsub = bsc_subscr_alloc(list); + if (!bsub) + return NULL; bsc_subscr_set_imsi(bsub, imsi); return bsub; } @@ -103,6 +105,8 @@ if (bsub) return bsub; bsub = bsc_subscr_alloc(list); + if (!bsub) + return NULL; bsub->tmsi = tmsi; return bsub; } diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/libbsc/pcu_sock.c openbsc-1.4.0+dfsg1/openbsc/src/libbsc/pcu_sock.c --- openbsc-1.3.2+dfsg1/openbsc/src/libbsc/pcu_sock.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/libbsc/pcu_sock.c 2020-12-10 16:07:15.000000000 +0000 @@ -484,7 +484,7 @@ return -EIO; } msgb_enqueue(&state->upqueue, msg); - conn_bfd->when |= BSC_FD_WRITE; + conn_bfd->when |= OSMO_FD_WRITE; return 0; } @@ -507,7 +507,7 @@ osmo_fd_unregister(bfd); /* re-enable the generation of ACCEPT for new connections */ - state->listen_bfd.when |= BSC_FD_READ; + state->listen_bfd.when |= OSMO_FD_READ; #if 0 /* remove si13, ... */ @@ -586,7 +586,7 @@ msg = llist_entry(state->upqueue.next, struct msgb, list); pcu_prim = (struct gsm_pcu_if *)msg->data; - bfd->when &= ~BSC_FD_WRITE; + bfd->when &= ~OSMO_FD_WRITE; /* bug hunter 8-): maybe someone forgot msgb_put(...) ? */ if (!msgb_length(msg)) { @@ -601,7 +601,7 @@ goto close; if (rc < 0) { if (errno == EAGAIN) { - bfd->when |= BSC_FD_WRITE; + bfd->when |= OSMO_FD_WRITE; break; } goto close; @@ -625,12 +625,12 @@ { int rc = 0; - if (flags & BSC_FD_READ) + if (flags & OSMO_FD_READ) rc = pcu_sock_read(bfd); if (rc < 0) return rc; - if (flags & BSC_FD_WRITE) + if (flags & OSMO_FD_WRITE) rc = pcu_sock_write(bfd); return rc; @@ -656,13 +656,13 @@ LOGP(DPCU, LOGL_NOTICE, "PCU connects but we already have " "another active connection ?!?\n"); /* We already have one PCU connected, this is all we support */ - state->listen_bfd.when &= ~BSC_FD_READ; + state->listen_bfd.when &= ~OSMO_FD_READ; close(rc); return 0; } conn_bfd->fd = rc; - conn_bfd->when = BSC_FD_READ; + conn_bfd->when = OSMO_FD_READ; conn_bfd->cb = pcu_sock_cb; conn_bfd->data = state; @@ -705,7 +705,7 @@ return -1; } - bfd->when = BSC_FD_READ; + bfd->when = OSMO_FD_READ; bfd->cb = pcu_sock_accept; bfd->data = state; diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/libcommon/bsc_version.c openbsc-1.4.0+dfsg1/openbsc/src/libcommon/bsc_version.c --- openbsc-1.3.2+dfsg1/openbsc/src/libcommon/bsc_version.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/libcommon/bsc_version.c 2020-12-10 16:07:15.000000000 +0000 @@ -19,12 +19,19 @@ #include "../../bscconfig.h" +#define DIVIDER "======================================================================\r\n" const char *openbsc_copyright = "Copyright (C) 2008-2016 Harald Welte, Holger Freyther\r\n" "Contributions by Daniel Willmann, Jan Lübbe, Stefan Schmidt\r\n" "Dieter Spaar, Andreas Eversberg, Sylvain Munaut, Neels Hofmeyr\r\n\r\n" "License AGPLv3+: GNU AGPL version 3 or later \r\n" "This is free software: you are free to change and redistribute it.\r\n" - "There is NO WARRANTY, to the extent permitted by law.\r\n"; + "There is NO WARRANTY, to the extent permitted by law.\r\n" DIVIDER + "WARNING: You should not run osmo-nitb except for archaeological purpose.\r\n" + "It is ancient, unmaintained and obsolete for several years. But you seem\r\n" + "to insist on using obsolete and known-broken software that ignores years \r\n" + "of hard development work. That's your choice, but you have been warned.\r\n" + "DON'T EVER BOTHER THE DEVELOPERS IF YOU ENCOUNTER PROBLEMS WITH IT!!!\r\n" + "See https://osmocom.org/projects/cellular-infrastructure/wiki/Osmocom_Network_In_The_Box\r\n" DIVIDER; diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/libcommon/gsm_data_shared.c openbsc-1.4.0+dfsg1/openbsc/src/libcommon/gsm_data_shared.c --- openbsc-1.3.2+dfsg1/openbsc/src/libcommon/gsm_data_shared.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/libcommon/gsm_data_shared.c 2020-12-10 16:07:15.000000000 +0000 @@ -87,7 +87,7 @@ { BTS_OSMO_LITECELL15, "osmo-bts-lc15" }, { BTS_OSMO_OCTPHY, "osmo-bts-octphy" }, { BTS_OSMO_SYSMO, "osmo-bts-sysmo" }, - { BTS_OSMO_TRX, "omso-bts-trx" }, + { BTS_OSMO_TRX, "osmo-bts-trx" }, { 0, NULL } }; diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/libcommon/socket.c openbsc-1.4.0+dfsg1/openbsc/src/libcommon/socket.c --- openbsc-1.3.2+dfsg1/openbsc/src/libcommon/socket.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/libcommon/socket.c 2020-12-10 16:07:15.000000000 +0000 @@ -65,7 +65,7 @@ bfd->fd = socket(AF_INET, type, proto); bfd->cb = cb; - bfd->when = BSC_FD_READ; + bfd->when = OSMO_FD_READ; bfd->data = data; bfd->priv_nr = priv_nr; diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/libmgcp/mgcp_network.c openbsc-1.4.0+dfsg1/openbsc/src/libmgcp/mgcp_network.c --- openbsc-1.3.2+dfsg1/openbsc/src/libmgcp/mgcp_network.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/libmgcp/mgcp_network.c 2020-12-10 16:07:15.000000000 +0000 @@ -972,14 +972,14 @@ mgcp_set_ip_tos(rtp_end->rtp.fd, cfg->endp_dscp); mgcp_set_ip_tos(rtp_end->rtcp.fd, cfg->endp_dscp); - rtp_end->rtp.when = BSC_FD_READ; + rtp_end->rtp.when = OSMO_FD_READ; if (osmo_fd_register(&rtp_end->rtp) != 0) { LOGP(DMGCP, LOGL_ERROR, "Failed to register RTP port %d on 0x%x\n", rtp_end->local_port, endpno); goto cleanup2; } - rtp_end->rtcp.when = BSC_FD_READ; + rtp_end->rtcp.when = OSMO_FD_READ; if (osmo_fd_register(&rtp_end->rtcp) != 0) { LOGP(DMGCP, LOGL_ERROR, "Failed to register RTCP port %d on 0x%x\n", rtp_end->local_port + 1, endpno); diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/libmgcp/mgcp_osmux.c openbsc-1.4.0+dfsg1/openbsc/src/libmgcp/mgcp_osmux.c --- openbsc-1.3.2+dfsg1/openbsc/src/libmgcp/mgcp_osmux.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/libmgcp/mgcp_osmux.c 2020-12-10 16:07:15.000000000 +0000 @@ -445,7 +445,7 @@ return ret; } mgcp_set_ip_tos(osmux_fd.fd, cfg->endp_dscp); - osmux_fd.when |= BSC_FD_READ; + osmux_fd.when |= OSMO_FD_READ; ret = osmo_fd_register(&osmux_fd); if (ret < 0) { diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/libmsc/meas_feed.c openbsc-1.4.0+dfsg1/openbsc/src/libmsc/meas_feed.c --- openbsc-1.3.2+dfsg1/openbsc/src/libmsc/meas_feed.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/libmsc/meas_feed.c 2020-12-10 16:07:15.000000000 +0000 @@ -101,7 +101,7 @@ char buf[256]; rc = read(ofd->fd, buf, sizeof(buf)); - ofd->fd &= ~BSC_FD_READ; + ofd->fd &= ~OSMO_FD_READ; return rc; } @@ -140,7 +140,7 @@ if (rc < 0) return rc; - g_mfs.wqueue.bfd.when &= ~BSC_FD_READ; + g_mfs.wqueue.bfd.when &= ~OSMO_FD_READ; if (g_mfs.dst_host) talloc_free(g_mfs.dst_host); diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/libmsc/mncc_sock.c openbsc-1.4.0+dfsg1/openbsc/src/libmsc/mncc_sock.c --- openbsc-1.3.2+dfsg1/openbsc/src/libmsc/mncc_sock.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/libmsc/mncc_sock.c 2020-12-10 16:07:15.000000000 +0000 @@ -73,7 +73,7 @@ /* Actually enqueue the message and mark socket write need */ msgb_enqueue(&net->upqueue, msg); - net->mncc_state->conn_bfd.when |= BSC_FD_WRITE; + net->mncc_state->conn_bfd.when |= OSMO_FD_WRITE; return 0; } @@ -88,7 +88,7 @@ osmo_fd_unregister(bfd); /* re-enable the generation of ACCEPT for new connections */ - state->listen_bfd.when |= BSC_FD_READ; + state->listen_bfd.when |= OSMO_FD_READ; /* release all exisitng calls */ gsm0408_clear_all_trans(state->net, GSM48_PDISC_CC); @@ -151,7 +151,7 @@ msg = llist_entry(net->upqueue.next, struct msgb, list); mncc_prim = (struct gsm_mncc *)msg->data; - bfd->when &= ~BSC_FD_WRITE; + bfd->when &= ~OSMO_FD_WRITE; /* bug hunter 8-): maybe someone forgot msgb_put(...) ? */ if (!msgb_length(msg)) { @@ -166,7 +166,7 @@ goto close; if (rc < 0) { if (errno == EAGAIN) { - bfd->when |= BSC_FD_WRITE; + bfd->when |= OSMO_FD_WRITE; break; } goto close; @@ -190,12 +190,12 @@ { int rc = 0; - if (flags & BSC_FD_READ) + if (flags & OSMO_FD_READ) rc = mncc_sock_read(bfd); if (rc < 0) return rc; - if (flags & BSC_FD_WRITE) + if (flags & OSMO_FD_WRITE) rc = mncc_sock_write(bfd); return rc; @@ -227,7 +227,7 @@ hello->lchan_type_offset = offsetof(struct gsm_mncc, lchan_type); msgb_enqueue(&mncc->net->upqueue, msg); - mncc->conn_bfd.when |= BSC_FD_WRITE; + mncc->conn_bfd.when |= OSMO_FD_WRITE; } /* accept a new connection */ @@ -250,13 +250,13 @@ LOGP(DMNCC, LOGL_NOTICE, "MNCC app connects but we already have " "another active connection ?!?\n"); /* We already have one MNCC app connected, this is all we support */ - state->listen_bfd.when &= ~BSC_FD_READ; + state->listen_bfd.when &= ~OSMO_FD_READ; close(rc); return 0; } conn_bfd->fd = rc; - conn_bfd->when = BSC_FD_READ; + conn_bfd->when = OSMO_FD_READ; conn_bfd->cb = mncc_sock_cb; conn_bfd->data = state; @@ -299,7 +299,7 @@ return -1; } - bfd->when = BSC_FD_READ; + bfd->when = OSMO_FD_READ; bfd->cb = mncc_sock_accept; bfd->data = state; diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/libmsc/smpp_smsc.c openbsc-1.4.0+dfsg1/openbsc/src/libmsc/smpp_smsc.c --- openbsc-1.3.2+dfsg1/openbsc/src/libmsc/smpp_smsc.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/libmsc/smpp_smsc.c 2020-12-10 16:07:15.000000000 +0000 @@ -915,7 +915,7 @@ osmo_wqueue_init(&esme->wqueue, 10); esme->wqueue.bfd.fd = fd; esme->wqueue.bfd.data = esme; - esme->wqueue.bfd.when = BSC_FD_READ; + esme->wqueue.bfd.when = OSMO_FD_READ; if (osmo_fd_register(&esme->wqueue.bfd) != 0) { close(fd); diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/libtrau/rtp_proxy.c openbsc-1.4.0+dfsg1/openbsc/src/libtrau/rtp_proxy.c --- openbsc-1.3.2+dfsg1/openbsc/src/libtrau/rtp_proxy.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/libtrau/rtp_proxy.c 2020-12-10 16:07:15.000000000 +0000 @@ -286,7 +286,7 @@ else memcpy(payload, frame->data, payload_len); msgb_enqueue(&rss->tx_queue, msg); - rss->bfd.when |= BSC_FD_WRITE; + rss->bfd.when |= OSMO_FD_WRITE; return 0; } @@ -396,7 +396,7 @@ rc = read(rss->bfd.fd, msg->data, RTP_ALLOC_SIZE); if (rc == 0) { - rss->bfd.when &= ~BSC_FD_READ; + rss->bfd.when &= ~OSMO_FD_READ; goto out_free; } else if (rc < 0) { /* Ignore "connection refused". this happens, If we open the @@ -405,7 +405,7 @@ goto out_free; DEBUGPC(DLMUX, "Read of RTP socket (%p) failed (errno %d, " "%s)\n", rs, errno, strerror(errno)); - rss->bfd.when &= ~BSC_FD_READ; + rss->bfd.when &= ~OSMO_FD_READ; goto out_free; } @@ -430,7 +430,7 @@ goto out_free; } msgb_enqueue(&other_rss->tx_queue, msg); - other_rss->bfd.when |= BSC_FD_WRITE; + other_rss->bfd.when |= OSMO_FD_WRITE; break; case RTP_RECV_UPSTREAM: @@ -448,7 +448,7 @@ if (rc < 0) goto out_free; msgb_enqueue(&rss->tx_queue, msg); - rss->bfd.when |= BSC_FD_WRITE; + rss->bfd.when |= OSMO_FD_WRITE; break; } if (rss->bfd.priv_nr != RTP_PRIV_RTP) { @@ -482,7 +482,7 @@ msg = msgb_dequeue(&rss->tx_queue); if (!msg) { - rss->bfd.when &= ~BSC_FD_WRITE; + rss->bfd.when &= ~OSMO_FD_WRITE; return 0; } @@ -516,10 +516,10 @@ return -EINVAL; } - if (flags & BSC_FD_READ) + if (flags & OSMO_FD_READ) rtp_socket_read(rs, rss); - if (flags & BSC_FD_WRITE) + if (flags & OSMO_FD_WRITE) rtp_socket_write(rs, rss); return 0; @@ -600,7 +600,7 @@ rss->sin_local.sin_family = AF_INET; rss->sin_local.sin_addr.s_addr = htonl(ip); rss->sin_local.sin_port = htons(port); - rss->bfd.when |= BSC_FD_READ; + rss->bfd.when |= OSMO_FD_READ; rc = bind(rss->bfd.fd, (struct sockaddr *)&rss->sin_local, sizeof(rss->sin_local)); diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/osmo-bsc/osmo_bsc_msc.c openbsc-1.4.0+dfsg1/openbsc/src/osmo-bsc/osmo_bsc_msc.c --- openbsc-1.3.2+dfsg1/openbsc/src/osmo-bsc/osmo_bsc_msc.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/osmo-bsc/osmo_bsc_msc.c 2020-12-10 16:07:15.000000000 +0000 @@ -153,7 +153,7 @@ } osmo_wqueue_init(&data->mgcp_agent, 10); - data->mgcp_agent.bfd.when = BSC_FD_READ; + data->mgcp_agent.bfd.when = OSMO_FD_READ; data->mgcp_agent.bfd.data = data; data->mgcp_agent.read_cb = mgcp_do_read; data->mgcp_agent.write_cb = mgcp_do_write; diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/osmo-bsc_mgcp/mgcp_main.c openbsc-1.4.0+dfsg1/openbsc/src/osmo-bsc_mgcp/mgcp_main.c --- openbsc-1.3.2+dfsg1/openbsc/src/osmo-bsc_mgcp/mgcp_main.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/osmo-bsc_mgcp/mgcp_main.c 2020-12-10 16:07:15.000000000 +0000 @@ -246,7 +246,7 @@ /* we need to bind a socket */ if (rc == 0) { - cfg->gw_fd.bfd.when = BSC_FD_READ; + cfg->gw_fd.bfd.when = OSMO_FD_READ; cfg->gw_fd.bfd.cb = read_call_agent; cfg->gw_fd.bfd.fd = socket(AF_INET, SOCK_DGRAM, 0); if (cfg->gw_fd.bfd.fd < 0) { diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c openbsc-1.4.0+dfsg1/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c --- openbsc-1.3.2+dfsg1/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c 2020-12-10 16:07:15.000000000 +0000 @@ -1127,7 +1127,7 @@ } osmo_wqueue_init(&cfg->gw_fd, 10); - cfg->gw_fd.bfd.when = BSC_FD_READ; + cfg->gw_fd.bfd.when = OSMO_FD_READ; cfg->gw_fd.bfd.data = nat; cfg->gw_fd.read_cb = mgcp_do_read; cfg->gw_fd.write_cb = mgcp_do_write; diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/osmo-bsc_nat/bsc_nat.c openbsc-1.4.0+dfsg1/openbsc/src/osmo-bsc_nat/bsc_nat.c --- openbsc-1.3.2+dfsg1/openbsc/src/osmo-bsc_nat/bsc_nat.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/osmo-bsc_nat/bsc_nat.c 2020-12-10 16:07:15.000000000 +0000 @@ -1381,7 +1381,7 @@ struct sockaddr_in sa; socklen_t sa_len = sizeof(sa); - if (!(what & BSC_FD_READ)) + if (!(what & OSMO_FD_READ)) return 0; fd = accept(bfd->fd, (struct sockaddr *) &sa, &sa_len); @@ -1431,7 +1431,7 @@ bsc->write_queue.bfd.fd = fd; bsc->write_queue.read_cb = ipaccess_bsc_read_cb; bsc->write_queue.write_cb = bsc_write_cb; - bsc->write_queue.bfd.when = BSC_FD_READ; + bsc->write_queue.bfd.when = OSMO_FD_READ; if (osmo_fd_register(&bsc->write_queue.bfd) < 0) { LOGP(DNAT, LOGL_ERROR, "Failed to register BSC fd.\n"); close(fd); @@ -1535,12 +1535,20 @@ } } -static void signal_handler(int signal) +static void signal_handler(int signum) { - switch (signal) { + switch (signum) { case SIGABRT: - /* in case of abort, we want to obtain a talloc report - * and then return to the caller, who will abort the process */ + /* in case of abort, we want to obtain a talloc report and + * then run default SIGABRT handler, who will generate coredump + * and abort the process. abort() should do this for us after we + * return, but program wouldn't exit if an external SIGABRT is + * received. + */ + talloc_report_full(tall_bsc_ctx, stderr); + signal(SIGABRT, SIG_DFL); + raise(SIGABRT); + break; case SIGUSR1: talloc_report_full(tall_bsc_ctx, stderr); break; diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/osmo-bsc_nat/bsc_ussd.c openbsc-1.4.0+dfsg1/openbsc/src/osmo-bsc_nat/bsc_ussd.c --- openbsc-1.3.2+dfsg1/openbsc/src/osmo-bsc_nat/bsc_ussd.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/osmo-bsc_nat/bsc_ussd.c 2020-12-10 16:07:15.000000000 +0000 @@ -237,7 +237,7 @@ socklen_t sa_len = sizeof(sa); int fd; - if (!(what & BSC_FD_READ)) + if (!(what & OSMO_FD_READ)) return 0; fd = accept(bfd->fd, (struct sockaddr *) &sa, &sa_len); @@ -259,7 +259,7 @@ osmo_wqueue_init(&conn->queue, 10); conn->queue.bfd.data = conn; conn->queue.bfd.fd = fd; - conn->queue.bfd.when = BSC_FD_READ; + conn->queue.bfd.when = OSMO_FD_READ; conn->queue.read_cb = ussd_read_cb; conn->queue.write_cb = bsc_write_cb; diff -Nru openbsc-1.3.2+dfsg1/openbsc/src/osmo-nitb/bsc_hack.c openbsc-1.4.0+dfsg1/openbsc/src/osmo-nitb/bsc_hack.c --- openbsc-1.3.2+dfsg1/openbsc/src/osmo-nitb/bsc_hack.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/src/osmo-nitb/bsc_hack.c 2020-12-10 16:07:15.000000000 +0000 @@ -65,6 +65,7 @@ static int daemonize = 0; static const char *mncc_sock_path = NULL; static int use_db_counter = 1; +static bool yes_i_really_want = false; /* timer to store statistics */ #define DB_SYNC_INTERVAL 60, 0 @@ -115,6 +116,7 @@ while (1) { int option_index = 0, c; static struct option long_options[] = { + {"yes-i-really-want-to-run-prehistoric-software", 0, 0, 0}, {"help", 0, 0, 'h'}, {"debug", 1, 0, 'd'}, {"daemonize", 0, 0, 'D'}, @@ -139,6 +141,10 @@ break; switch (c) { + case 0: + if (option_index == 0) + yes_i_really_want = true; + break; case 'h': print_usage(); print_help(); @@ -196,11 +202,11 @@ } extern void *tall_vty_ctx; -static void signal_handler(int signal) +static void signal_handler(int signum) { - fprintf(stdout, "signal %u received\n", signal); + fprintf(stdout, "signal %u received\n", signum); - switch (signal) { + switch (signum) { case SIGINT: case SIGTERM: bsc_shutdown_net(bsc_gsmnet); @@ -210,8 +216,17 @@ break; case SIGABRT: osmo_generate_backtrace(); - /* in case of abort, we want to obtain a talloc report - * and then return to the caller, who will abort the process */ + /* in case of abort, we want to obtain a talloc report and + * then run default SIGABRT handler, who will generate coredump + * and abort the process. abort() should do this for us after we + * return, but program wouldn't exit if an external SIGABRT is + * received. + */ + talloc_report(tall_vty_ctx, stderr); + talloc_report_full(tall_bsc_ctx, stderr); + signal(SIGABRT, SIG_DFL); + raise(SIGABRT); + break; case SIGUSR1: talloc_report(tall_vty_ctx, stderr); talloc_report_full(tall_bsc_ctx, stderr); @@ -273,6 +288,28 @@ /* Parse options */ handle_options(argc, argv); +#define DIVIDER "======================================================================\n" + if (!yes_i_really_want) { + fprintf(stderr, DIVIDER + "ERROR: You should not run osmo-nitb. It is ancient, unmaintained and\n" + "obsolete for several years. If you really want to ignore years of hard work on\n" + "the new post-NITB stack (osmo-bsc, osmo-mgw, osmo-msc, osmo-hlr, osmo-stp),\n" + "you may ues the '--yes-i-really-want-to-run-prehistoric-software' command line\n" + "argument. DON'T EVER BOTHER THE DEVELOPERS IF YOU ENCOUNTER PROBLEMS WITH IT!!!\n" + "Use https://osmocom.org/projects/cellular-infrastructure/wiki/Osmocom_Network_In_The_Box\n" + DIVIDER); + exit(2); + } else { + fprintf(stderr, DIVIDER + "WARNING: You should not run osmo-nitb except for archaeological purpose.\n" + "It is ancient, unmaintained and obsolete for several years. But you seem\n" + "to insist on using obsolete and known-broken software that ignores years \n" + "of hard development work. That's your choice, but you have been warned.\n" + "DON'T EVER BOTHER THE DEVELOPERS IF YOU ENCOUNTER PROBLEMS WITH IT!!!\n" + "Use https://osmocom.org/projects/cellular-infrastructure/wiki/Osmocom_Network_In_The_Box\n" + DIVIDER); + } + /* Allocate global gsm_network struct; choose socket/internal MNCC */ rc = bsc_network_alloc(mncc_sock_path? mncc_sock_from_cc : int_mncc_recv); diff -Nru openbsc-1.3.2+dfsg1/openbsc/tests/ctrl_test_runner.py openbsc-1.4.0+dfsg1/openbsc/tests/ctrl_test_runner.py --- openbsc-1.3.2+dfsg1/openbsc/tests/ctrl_test_runner.py 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/tests/ctrl_test_runner.py 2020-12-10 16:07:15.000000000 +0000 @@ -468,7 +468,8 @@ def ctrl_command(self): return ["./src/osmo-nitb/osmo-nitb", "-c", - "doc/examples/osmo-nitb/nanobts/osmo-nitb.cfg", "-l", "test_hlr.sqlite3"] + "doc/examples/osmo-nitb/nanobts/osmo-nitb.cfg", "-l", "test_hlr.sqlite3", + "--yes-i-really-want-to-run-prehistoric-software"] def ctrl_app(self): return (4249, "./src/osmo-nitb/osmo-nitb", "OsmoBSC", "nitb") diff -Nru openbsc-1.3.2+dfsg1/openbsc/tests/db/db_test.c openbsc-1.4.0+dfsg1/openbsc/tests/db/db_test.c --- openbsc-1.3.2+dfsg1/openbsc/tests/db/db_test.c 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/tests/db/db_test.c 2020-12-10 16:07:15.000000000 +0000 @@ -206,6 +206,7 @@ printf("Testing subscriber database code.\n"); osmo_init_logging(&log_info); log_set_print_filename(osmo_stderr_target, 0); + log_set_use_color(osmo_stderr_target, 0); dummy_net.subscr_group = &dummy_sgrp; dummy_sgrp.net = &dummy_net; diff -Nru openbsc-1.3.2+dfsg1/openbsc/tests/db/db_test.err openbsc-1.4.0+dfsg1/openbsc/tests/db/db_test.err --- openbsc-1.3.2+dfsg1/openbsc/tests/db/db_test.err 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/tests/db/db_test.err 2020-12-10 16:07:15.000000000 +0000 @@ -1,3 +1,2 @@ Going to migrate from revision 3 -Going to migrate from revision 4 - \ No newline at end of file +Going to migrate from revision 4 diff -Nru openbsc-1.3.2+dfsg1/openbsc/tests/smpp_test_runner.py openbsc-1.4.0+dfsg1/openbsc/tests/smpp_test_runner.py --- openbsc-1.3.2+dfsg1/openbsc/tests/smpp_test_runner.py 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/tests/smpp_test_runner.py 2020-12-10 16:07:15.000000000 +0000 @@ -64,7 +64,8 @@ def vty_command(self): return ["./src/osmo-nitb/osmo-nitb", "-c", - "doc/examples/osmo-nitb/nanobts/osmo-nitb.cfg"] + "doc/examples/osmo-nitb/nanobts/osmo-nitb.cfg", + "--yes-i-really-want-to-run-prehistoric-software"] def vty_app(self): return (4242, "./src/osmo-nitb/osmo-nitb", "OpenBSC", "nitb") diff -Nru openbsc-1.3.2+dfsg1/openbsc/tests/vty_test_runner.py openbsc-1.4.0+dfsg1/openbsc/tests/vty_test_runner.py --- openbsc-1.3.2+dfsg1/openbsc/tests/vty_test_runner.py 2020-01-03 18:12:23.000000000 +0000 +++ openbsc-1.4.0+dfsg1/openbsc/tests/vty_test_runner.py 2020-12-10 16:07:15.000000000 +0000 @@ -171,7 +171,8 @@ def vty_command(self): return ["./src/osmo-nitb/osmo-nitb", "-c", - "doc/examples/osmo-nitb/nanobts/osmo-nitb.cfg"] + "doc/examples/osmo-nitb/nanobts/osmo-nitb.cfg", + "--yes-i-really-want-to-run-prehistoric-software"] def vty_app(self): return (4242, "./src/osmo-nitb/osmo-nitb", "OpenBSC", "nitb")