Hello community,

here is the log from the commit of package libosmo-abis for openSUSE:Factory 
checked in at 2019-01-05 14:41:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libosmo-abis (Old)
 and      /work/SRC/openSUSE:Factory/.libosmo-abis.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libosmo-abis"

Sat Jan  5 14:41:41 2019 rev:8 rq:657186 version:0.5.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/libosmo-abis/libosmo-abis.changes        
2018-07-06 10:48:06.142818422 +0200
+++ /work/SRC/openSUSE:Factory/.libosmo-abis.new.28833/libosmo-abis.changes     
2019-01-05 14:41:41.552514147 +0100
@@ -1,0 +2,10 @@
+Tue Dec 11 00:56:52 UTC 2018 - Jan Engelhardt <[email protected]>
+
+- Update to new upstream release 0.5.1
+  * unixsocket: fix a potential string overflow
+  * fix double-free/use-after-free of pointers in struct e1inp_line
+  * ortp: reset RTP session on SSRC changes
+  * ortp: detect SSRC changes immediately
+  * e1_input: Replace '.' in counter names with ':'
+
+-------------------------------------------------------------------

Old:
----
  libosmo-abis-0.4.0.2.tar.xz

New:
----
  libosmo-abis-0.5.1.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libosmo-abis.spec ++++++
--- /var/tmp/diff_new_pack.Akt8rm/_old  2019-01-05 14:41:42.092513688 +0100
+++ /var/tmp/diff_new_pack.Akt8rm/_new  2019-01-05 14:41:42.092513688 +0100
@@ -12,14 +12,14 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
-%define version_unconverted 0.4.0.2
+%define version_unconverted 0.5.1
 
 Name:           libosmo-abis
-Version:        0.4.0.2
+Version:        0.5.1
 Release:        0
 Summary:        Osmocom library for A-bis interface between BTS and BSC
 License:        AGPL-3.0-or-later AND GPL-2.0-or-later
@@ -34,9 +34,9 @@
 BuildRequires:  libtool >= 2
 BuildRequires:  pkgconfig >= 0.20
 BuildRequires:  xz
-BuildRequires:  pkgconfig(libosmocore) >= 0.3.0
-BuildRequires:  pkgconfig(libosmogsm) >= 0.3.10
-BuildRequires:  pkgconfig(libosmovty) >= 0.3.0
+BuildRequires:  pkgconfig(libosmocore) >= 0.12.0
+BuildRequires:  pkgconfig(libosmogsm) >= 0.13~git14
+BuildRequires:  pkgconfig(libosmovty) >= 0.12.0
 BuildRequires:  pkgconfig(ortp) >= 0.22
 BuildRequires:  pkgconfig(talloc)
 

++++++ _service ++++++
--- /var/tmp/diff_new_pack.Akt8rm/_old  2019-01-05 14:41:42.116513668 +0100
+++ /var/tmp/diff_new_pack.Akt8rm/_new  2019-01-05 14:41:42.116513668 +0100
@@ -2,8 +2,8 @@
        <service name="tar_scm" mode="disabled">
                <param name="scm">git</param>
                <param name="url">git://git.osmocom.org/libosmo-abis</param>
-               <param name="parent-tag">0.4.0</param>
-               <param name="versionformat">0.4.0.@TAG_OFFSET@</param>
+               <param name="parent-tag">0.5.1</param>
+               <param name="versionformat">0.5.1</param>
        </service>
        <service name="recompress" mode="disabled">
                <param name="file">*.tar</param>

++++++ libosmo-abis-0.4.0.2.tar.xz -> libosmo-abis-0.5.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/configure.ac 
new/libosmo-abis-0.5.1/configure.ac
--- old/libosmo-abis-0.4.0.2/configure.ac       2017-09-14 04:59:32.000000000 
+0200
+++ new/libosmo-abis-0.5.1/configure.ac 2018-12-06 13:09:48.000000000 +0100
@@ -33,6 +33,18 @@
 CFLAGS="$CFLAGS -Wall"
 CPPFLAGS="$CPPFLAGS -Wall"
 
+AC_ARG_ENABLE(sanitize,
+       [AS_HELP_STRING(
+               [--enable-sanitize],
+               [Compile with address sanitizer enabled],
+       )],
+       [sanitize=$enableval], [sanitize="no"])
+if test x"$sanitize" = x"yes"
+then
+       CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined"
+       CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined"
+fi
+
 # The following test is taken from WebKit's webkit.m4
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -fvisibility=hidden "
@@ -47,9 +59,9 @@
 dnl Generate the output
 AM_CONFIG_HEADER(config.h)
 
-PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.0)
-PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.3.0)
-PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.3.10)
+PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.12.0)
+PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.12.0)
+PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.12.0)
 PKG_CHECK_MODULES(ORTP, ortp >= 0.22.0)
 
 AC_CHECK_HEADERS(dahdi/user.h,,AC_MSG_WARN(DAHDI input driver will not be 
built))
@@ -66,6 +78,24 @@
        CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined"
 fi
 
+AC_ARG_ENABLE(werror,
+       [AS_HELP_STRING(
+               [--enable-werror],
+               [Turn all compiler warnings into errors, with exceptions:
+                a) deprecation (allow upstream to mark deprecation without 
breaking builds);
+                b) "#warning" pragmas (allow to remind ourselves of errors 
without breaking builds)
+               ]
+       )],
+       [werror=$enableval], [werror="no"])
+if test x"$werror" = x"yes"
+then
+       WERROR_FLAGS="-Werror"
+       WERROR_FLAGS+=" -Wno-error=deprecated 
-Wno-error=deprecated-declarations"
+       WERROR_FLAGS+=" -Wno-error=cpp" # "#warning"
+       CFLAGS="$CFLAGS $WERROR_FLAGS"
+       CPPFLAGS="$CPPFLAGS $WERROR_FLAGS"
+fi
+
 _cflags_save=$CFLAGS
 CFLAGS="$CFLAGS $ORTP_CFLAGS"
 AC_COMPILE_IFELSE(
@@ -80,7 +110,7 @@
 CFLAGS=$_cflags_save
 
 _cflags_save=$CFLAGS
-CFLAGS="$CFLAGS $ORTP_CFLAGS"
+CFLAGS="$CFLAGS $ORTP_CFLAGS -Werror"
 AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM(
                [[#include <ortp/ortp.h>
@@ -93,6 +123,8 @@
                [rtp_session_signal_connect requires ulong parameter])])
 CFLAGS=$_cflags_save
 
+AC_MSG_RESULT([CFLAGS="$CFLAGS"])
+AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"])
 
 AC_OUTPUT(
        libosmoabis.pc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/contrib/jenkins.sh 
new/libosmo-abis-0.5.1/contrib/jenkins.sh
--- old/libosmo-abis-0.4.0.2/contrib/jenkins.sh 2017-09-14 04:59:32.000000000 
+0200
+++ new/libosmo-abis-0.5.1/contrib/jenkins.sh   2018-12-06 13:09:48.000000000 
+0100
@@ -13,12 +13,13 @@
 inst="$deps/install"
 export deps inst
 
+osmo-clean-workspace.sh
+
 mkdir "$deps" || true
-rm -rf "$inst"
 
 verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
 
-osmo-build-dep.sh libosmocore
+osmo-build-dep.sh libosmocore "" --disable-doxygen
 
 export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
 export LD_LIBRARY_PATH="$inst/lib"
@@ -32,7 +33,9 @@
 set -x
 
 autoreconf --install --force
-./configure --enable-sanitize CFLAGS="-Werror" CPPFLAGS="-Werror"
+./configure --enable-sanitize --enable-werror
 $MAKE $PARALLEL_MAKE
 $MAKE distcheck \
   || cat-testlogs.sh
+
+osmo-clean-workspace.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/debian/changelog 
new/libosmo-abis-0.5.1/debian/changelog
--- old/libosmo-abis-0.4.0.2/debian/changelog   2017-09-14 04:59:32.000000000 
+0200
+++ new/libosmo-abis-0.5.1/debian/changelog     2018-12-06 13:09:48.000000000 
+0100
@@ -1,3 +1,60 @@
+libosmo-abis (0.5.1) unstable; urgency=medium
+
+  [ Pau Espin Pedrol ]
+  * ipaccess: ipaccess_rcvmsg: Drop unneeded memcpy
+  * ipaccess: Avoid using released line and bfd in ipaccess_fd_cb
+  * e1_input.c: Replace '.' in counter names with ':'
+
+  [ Stefan Sperling ]
+  * fix double-free/use-after-free of pointers in struct e1inp_line
+
+  [ Philipp Maier ]
+  * ortp: make sure the ortp scheduler is started
+  * ortp: reset rtp session on SSRC changes
+  * ortp: detect ssrc changes immediately
+  * ortp: enable scheduled mode on rtp socket creation
+  * Revert "ortp: make sure the ortp scheduler is started"
+  * Revert "ortp: enable scheduled mode on rtp socket creation"
+
+ -- Pau Espin Pedrol <[email protected]>  Fri, 27 Jul 2018 18:15:18 +0200
+
+libosmo-abis (0.5.0) unstable; urgency=medium
+
+  [ Max ]
+  * Use value string check from osmo-ci
+  * cosmetic: update ipaccess_bts_handle_ccm()
+  * IPA: log remote address
+
+  [ Neels Hofmeyr ]
+  * cosmetic: ipa.c: use msgb_dequeue(), drop local var
+  * jenkins: use osmo-clean-workspace.sh before and after build
+  * vty: skip installing cmds now always installed by default
+  * add --enable-sanitize config option
+  * configure: add --enable-werror
+  * jenkins.sh: use --enable-werror configure flag, not CFLAGS
+
+  [ Alexander Couzens ]
+  * debian/rules: show testsuite.log when tests are failing
+  * unixsocket: fix a potential string overflow
+
+  [ Harald Welte ]
+  * debian/copyright: fix upstream-name
+  * Add SPDX-License-Identifier to all source files
+  * Add a new osmo_rtp_set_source_desc() function to set the RTCP SDES items
+  * debian/control: Fix Vcs-Browser
+
+  [ Pau Espin Pedrol ]
+  * contrib: jenkins.sh: Disable doxygen in libosmocore build
+  * e1_input.h: Remove dead declaration of unexistent API ipaccess_setup
+  * configure.ac: Fix condition check for RTP_SIGNAL_PTR_CAST define
+  * use osmo_init_logging2
+  * git-version-gen: Check first for new tag format
+
+  [ Stefan Sperling ]
+  * preserve 'when' flags of new osmo_fd in ipaccess_rcvmsg()
+
+ -- Pau Espin Pedrol <[email protected]>  Thu, 03 May 2018 16:12:04 +0200
+
 libosmo-abis (0.4.0) unstable; urgency=medium
 
   * Move forward towards a new release.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/debian/control 
new/libosmo-abis-0.5.1/debian/control
--- old/libosmo-abis-0.4.0.2/debian/control     2017-09-14 04:59:32.000000000 
+0200
+++ new/libosmo-abis-0.5.1/debian/control       2018-12-06 13:09:48.000000000 
+0100
@@ -15,22 +15,26 @@
                libortp-dev
 Standards-Version: 3.9.7
 Vcs-Git: git://git.osmocom.org/libosmo-abis.git
-Vcs-Browser: http://git.osmocom.org/gitweb?p=libosmo-abis.git;a=summary
+Vcs-Browser: http://git.osmocom.org/libosmo-abis/
 Homepage: https://projects.osmocom.org/projects/libosmo-abis
 
 Package: libosmo-abis
 Section: oldlibs
 Architecture: any
-Depends: libosmoabis5 (= ${binary:Version}), libosmotrau1 (= 
${binary:Version}), ${misc:Depends}
+Depends: libosmoabis6 (= ${binary:Version}), libosmotrau2 (= 
${binary:Version}), ${misc:Depends}
 Multi-Arch: same
 Description: Legacy package for libosmo-abis
  libosmo-abis is an empty package helping in the transition to one
  package per DSO.
 
-Package: libosmoabis5
+Package: libosmoabis6
 Section: libs
 Architecture: any
 Multi-Arch: same
+# Due to previous release issues, libosmoabis5 actually installed same 
libosmoabis.so.6 file.
+# Once major is increased to 7, following two lines below can be dropped:
+Conflicts: libosmoabis5
+Replaces: libosmoabis5
 Depends: ${shlibs:Depends},
          ${misc:Depends}
 Description: GSM A-bis handling
@@ -40,7 +44,7 @@
  It also implements drivers for mISDN and DAHDI based E1 cards, as well as some
  A-bis/IP dialects.
 
-Package: libosmotrau1
+Package: libosmotrau2
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -58,8 +62,8 @@
 Multi-Arch: same
 Section: libdevel
 Depends: ${misc:Depends},
-         libosmotrau1 (= ${binary:Version}),
-         libosmoabis5 (= ${binary:Version})
+         libosmotrau2 (= ${binary:Version}),
+         libosmoabis6 (= ${binary:Version})
 Description: Development headers for A-bis interface
  The libosmo-abis library contains common/shared code regarding the A-bis
  interface between GSM BTS and BSC. This package in particular contains the
@@ -71,8 +75,8 @@
 Multi-Arch: same
 Section: debug
 Priority: extra
-Depends: libosmoabis5 (= ${binary:Version}),
-         libosmotrau1 (= ${binary:Version}),
+Depends: libosmoabis6 (= ${binary:Version}),
+         libosmotrau2 (= ${binary:Version}),
          ${misc:Depends}
 Description: Debug symbols for A-bis interface
  The libosmo-abis library contains common/shared code regarding the A-bis
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/debian/copyright 
new/libosmo-abis-0.5.1/debian/copyright
--- old/libosmo-abis-0.4.0.2/debian/copyright   2017-09-14 04:59:32.000000000 
+0200
+++ new/libosmo-abis-0.5.1/debian/copyright     2018-12-06 13:09:48.000000000 
+0100
@@ -1,5 +1,5 @@
 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: libosmocore
+Upstream-Name: libosmo-abis
 Source: git://git.osmocom.org/libosmo-abis.git
 
 Files: *
@@ -9,7 +9,7 @@
            2010,2014 On-Waves
            2011-2014 Pablo Neira Ayuso <[email protected]>
            2012      Tobias Engel
-           2014      Sysmocom s.f.m.c. GmBH
+           2014      sysmocom - s.f.m.c. GmBH
 License: AGPL-3+
 
 Files: src/input/lapd.c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/debian/libosmoabis5.install 
new/libosmo-abis-0.5.1/debian/libosmoabis5.install
--- old/libosmo-abis-0.4.0.2/debian/libosmoabis5.install        2017-09-14 
04:59:32.000000000 +0200
+++ new/libosmo-abis-0.5.1/debian/libosmoabis5.install  1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-usr/lib/*/libosmoabis.so.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/debian/libosmoabis6.install 
new/libosmo-abis-0.5.1/debian/libosmoabis6.install
--- old/libosmo-abis-0.4.0.2/debian/libosmoabis6.install        1970-01-01 
01:00:00.000000000 +0100
+++ new/libosmo-abis-0.5.1/debian/libosmoabis6.install  2018-12-06 
13:09:48.000000000 +0100
@@ -0,0 +1 @@
+usr/lib/*/libosmoabis.so.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/debian/libosmotrau1.install 
new/libosmo-abis-0.5.1/debian/libosmotrau1.install
--- old/libosmo-abis-0.4.0.2/debian/libosmotrau1.install        2017-09-14 
04:59:32.000000000 +0200
+++ new/libosmo-abis-0.5.1/debian/libosmotrau1.install  1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-usr/lib/*/libosmotrau.so.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/debian/libosmotrau2.install 
new/libosmo-abis-0.5.1/debian/libosmotrau2.install
--- old/libosmo-abis-0.4.0.2/debian/libosmotrau2.install        1970-01-01 
01:00:00.000000000 +0100
+++ new/libosmo-abis-0.5.1/debian/libosmotrau2.install  2018-12-06 
13:09:48.000000000 +0100
@@ -0,0 +1 @@
+usr/lib/*/libosmotrau.so.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/debian/rules 
new/libosmo-abis-0.5.1/debian/rules
--- old/libosmo-abis-0.4.0.2/debian/rules       2017-09-14 04:59:32.000000000 
+0200
+++ new/libosmo-abis-0.5.1/debian/rules 2018-12-06 13:09:48.000000000 +0100
@@ -14,10 +14,9 @@
 override_dh_strip:
        dh_strip --dbg-package=libosmo-abis-dbg
 
-override_dh_autoreconf:
-       echo $(VERSION) > .tarball-version
-       dh_autoreconf
-
 override_dh_clean:
        dh_clean
-       rm -f tests/package.m4 tests/testsuite .version .tarball-version
+       rm -f tests/package.m4 tests/testsuite .version
+
+override_dh_auto_test:
+       dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/git-version-gen 
new/libosmo-abis-0.5.1/git-version-gen
--- old/libosmo-abis-0.4.0.2/git-version-gen    2017-09-14 04:59:32.000000000 
+0200
+++ new/libosmo-abis-0.5.1/git-version-gen      2018-12-06 13:09:48.000000000 
+0100
@@ -93,8 +93,8 @@
 then
     : # use $v
 elif
-       v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
-         || git describe --abbrev=4 HEAD 2>/dev/null` \
+       v=`git describe --abbrev=4 HEAD 2>/dev/null \
+         || git describe --abbrev=4 --match='v*' HEAD 2>/dev/null` \
     && case $v in
         [0-9]*) ;;
         v[0-9]*) ;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/include/osmocom/abis/e1_input.h 
new/libosmo-abis-0.5.1/include/osmocom/abis/e1_input.h
--- old/libosmo-abis-0.4.0.2/include/osmocom/abis/e1_input.h    2017-09-14 
04:59:32.000000000 +0200
+++ new/libosmo-abis-0.5.1/include/osmocom/abis/e1_input.h      2018-12-06 
13:09:48.000000000 +0100
@@ -173,6 +173,7 @@
 
        struct e1inp_sign_link *        (*sign_link_up)(void *unit_info, struct 
e1inp_line *line, enum e1inp_sign_type type);
        void    (*sign_link_down)(struct e1inp_line *line);
+       /* Called when a new message arrives. -EBADF must be returned if the 
osmo_fd in link (msg->dst) is destroyed. */
        int     (*sign_link)(struct msgb *msg);
 };
 
@@ -200,6 +201,8 @@
        struct e1inp_driver *driver;
        void *driver_data;
 };
+#define e1inp_line_ipa_oml_ts(line) (&line->ts[0])
+#define e1inp_line_ipa_rsl_ts(line, trx_id) (&line->ts[1 + (trx_id)])
 
 /* SS_L_INPUT signals */
 enum e1inp_signal_input {
@@ -303,9 +306,6 @@
 
 int e1inp_vty_init(void);
 
-struct gsm_network;
-int ipaccess_setup(struct gsm_network *gsmnet);
-
 /* activate superchannel or deactive to use timeslots. only valid for 
unixsocket driver */
 void e1inp_ericsson_set_altc(struct e1inp_line *unixlinue, int superchannel);
 
@@ -314,7 +314,7 @@
 
 /* XXX */
 struct input_signal_data {
-       int link_type;
+       enum e1inp_sign_type link_type;
        uint8_t tei;
        uint8_t sapi;
        uint8_t ts_nr;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/include/osmocom/abis/ipa.h 
new/libosmo-abis-0.5.1/include/osmocom/abis/ipa.h
--- old/libosmo-abis-0.4.0.2/include/osmocom/abis/ipa.h 2017-09-14 
04:59:32.000000000 +0200
+++ new/libosmo-abis-0.5.1/include/osmocom/abis/ipa.h   2018-12-06 
13:09:48.000000000 +0100
@@ -37,6 +37,7 @@
        int (*closed_cb)(struct ipa_server_conn *peer);
        int (*ccm_cb)(struct ipa_server_conn *peer, struct msgb *msg,
                        struct tlv_parsed *tlvp, struct ipaccess_unit *ud);
+       /* Callback when ofd has something to be read. -EBADF must be returned 
if the osmo_fd is destroyed. */
        int (*cb)(struct ipa_server_conn *peer, struct msgb *msg);
        void                            *data;
        struct msgb                     *pending_msg;
@@ -71,6 +72,7 @@
        const char                      *addr;
        uint16_t                        port;
        void (*updown_cb)(struct ipa_client_conn *link, int up);
+       /* Callback when ofd has something to be read. -EBADF must be returned 
if the osmo_fd is destroyed. */
        int (*read_cb)(struct ipa_client_conn *link, struct msgb *msg);
        int (*write_cb)(struct ipa_client_conn *link);
        void                            *data;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libosmo-abis-0.4.0.2/include/osmocom/trau/osmo_ortp.h 
new/libosmo-abis-0.5.1/include/osmocom/trau/osmo_ortp.h
--- old/libosmo-abis-0.4.0.2/include/osmocom/trau/osmo_ortp.h   2017-09-14 
04:59:32.000000000 +0200
+++ new/libosmo-abis-0.5.1/include/osmocom/trau/osmo_ortp.h     2018-12-06 
13:09:48.000000000 +0100
@@ -100,5 +100,8 @@
                                uint32_t *recv_packets, uint32_t *recv_octets,
                                uint32_t *recv_lost, uint32_t *last_jitter);
 
+void osmo_rtp_set_source_desc(struct osmo_rtp_socket *rs, const char *cname,
+                               const char *name, const char *email, const char 
*phone,
+                               const char *loc, const char *tool, const char 
*note);
 
 #endif /* _OSMO_ORTP_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/src/Makefile.am 
new/libosmo-abis-0.5.1/src/Makefile.am
--- old/libosmo-abis-0.4.0.2/src/Makefile.am    2017-09-14 04:59:32.000000000 
+0200
+++ new/libosmo-abis-0.5.1/src/Makefile.am      2018-12-06 13:09:48.000000000 
+0100
@@ -1,8 +1,8 @@
 # This is _NOT_ the library release version, it's an API version.
 # Please read chapter "Library interface versions" of the libtool documentation
 # before making any modifications: 
https://www.gnu.org/software/libtool/manual/html_node/Versioning.html
-ABIS_LIBVERSION=6:0:0
-TRAU_LIBVERSION=2:0:0
+ABIS_LIBVERSION=6:1:0
+TRAU_LIBVERSION=3:1:1
 
 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)
 AM_CFLAGS= -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOVTY_CFLAGS) $(COVERAGE_CFLAGS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/src/e1_input.c 
new/libosmo-abis-0.5.1/src/e1_input.c
--- old/libosmo-abis-0.4.0.2/src/e1_input.c     2017-09-14 04:59:32.000000000 
+0200
+++ new/libosmo-abis-0.5.1/src/e1_input.c       2018-12-06 13:09:48.000000000 
+0100
@@ -4,6 +4,8 @@
  *
  * All Rights Reserved
  *
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
  * the Free Software Foundation; either version 3 of the License, or
@@ -56,13 +58,13 @@
 
 static const struct rate_ctr_desc e1inp_ctr_d[] = {
        [E1I_CTR_HDLC_ABORT]  = {
-               "hdlc.abort",   "HDLC abort"
+               "hdlc:abort",   "HDLC abort"
        },
        [E1I_CTR_HDLC_BADFCS] = {
-               "hdlc.bad_fcs", "HLDC Bad FCS"
+               "hdlc:bad_fcs", "HLDC Bad FCS"
        },
        [E1I_CTR_HDLC_OVERR]  = {
-               "hdlc.overrun", "HDLC Overrun"
+               "hdlc:overrun", "HDLC Overrun"
        },
        [E1I_CTR_ALARM] = {
                "alarm",        "Alarm"
@@ -392,6 +394,25 @@
                return NULL;
 
        memcpy(clone, line, sizeof(struct e1inp_line));
+
+       if (line->name) {
+               clone->name = talloc_strdup(clone, line->name);
+               OSMO_ASSERT(clone->name);
+       }
+       if (line->sock_path) {
+               clone->sock_path = talloc_strdup(clone, line->sock_path);
+               OSMO_ASSERT(clone->sock_path);
+       }
+
+       /*
+        * Rate counters and driver data are shared between clones. These are 
pointers
+        * to dynamic memory so we use reference counting to avoid a 
double-free (see OS#3137).
+        */
+       OSMO_ASSERT(line->rate_ctr);
+       clone->rate_ctr = talloc_reference(clone, line->rate_ctr);
+       if (line->driver_data)
+               clone->driver_data = talloc_reference(clone, line->driver_data);
+
        clone->refcnt = 1;
        return clone;
 }
@@ -404,8 +425,28 @@
 void e1inp_line_put(struct e1inp_line *line)
 {
        line->refcnt--;
-       if (line->refcnt == 0)
+       if (line->refcnt == 0) {
+               /* Remove our counter group from libosmocore's global counter
+                * list if we are freeing the last remaining talloc context.
+                * Otherwise we get a use-after-free when libosmocore's timer
+                * ticks again and attempts to update these counters (OS#3011).
+                *
+                * Note that talloc internally counts "secondary" references
+                * _in addition to_ the initial allocation context, so yes,
+                * we must check for *zero* remaining secondary contexts here. 
*/
+               if (talloc_reference_count(line->rate_ctr) == 0) {
+                       rate_ctr_group_free(line->rate_ctr);
+               } else {
+                       /* We are not freeing the last talloc context.
+                        * Instead of calling talloc_free(), unlink this 'line' 
pointer
+                        * which serves as one of several talloc contexts for 
the rate
+                        * counters and driver private state. */
+                       talloc_unlink(line, line->rate_ctr);
+                       if (line->driver_data)
+                               talloc_unlink(line, line->driver_data);
+               }
                talloc_free(line);
+       }
 }
 
 void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/src/e1_input_vty.c 
new/libosmo-abis-0.5.1/src/e1_input_vty.c
--- old/libosmo-abis-0.4.0.2/src/e1_input_vty.c 2017-09-14 04:59:32.000000000 
+0200
+++ new/libosmo-abis-0.5.1/src/e1_input_vty.c   2018-12-06 13:09:48.000000000 
+0100
@@ -2,6 +2,8 @@
 /* (C) 2011 by Harald Welte <[email protected]>
  * All Rights Reserved
  *
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
  * the Free Software Foundation; either version 3 of the License, or
@@ -21,6 +23,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
+#include <sys/un.h>
 
 #include <osmocom/core/linuxlist.h>
 #include <osmocom/core/talloc.h>
@@ -96,6 +99,14 @@
 {
        struct e1inp_line *line;
        int e1_nr = atoi(argv[0]);
+       struct sockaddr_un sun;
+
+       /* Don't exceed the maximum unix socket path length, including a NUL 
byte. See the unix(7) man page.*/
+       if (strlen(argv[1]) > sizeof(sun.sun_path) - 1) {
+               vty_out(vty, "%% Socket path length exceeds %zd bytes: '%s'%s",
+                       sizeof(sun.sun_path) - 1, argv[1], VTY_NEWLINE);
+               return CMD_WARNING;
+       }
 
        line = e1inp_line_find(e1_nr);
        if (!line) {
@@ -380,7 +391,6 @@
        install_element(CONFIG_NODE, &cfg_e1inp_cmd);
        install_node(&e1inp_node, e1inp_config_write);
 
-       vty_install_default(L_E1INP_NODE);
        install_element(L_E1INP_NODE, &cfg_e1_line_driver_cmd);
        install_element(L_E1INP_NODE, &cfg_e1_line_port_cmd);
        install_element(L_E1INP_NODE, &cfg_e1_line_socket_cmd);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/src/init.c 
new/libosmo-abis-0.5.1/src/init.c
--- old/libosmo-abis-0.4.0.2/src/init.c 2017-09-14 04:59:32.000000000 +0200
+++ new/libosmo-abis-0.5.1/src/init.c   2018-12-06 13:09:48.000000000 +0100
@@ -1,6 +1,8 @@
 /* (C) 2011 by Harald Welte <[email protected]>
  * All Rights Reserved
  *
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
  * the Free Software Foundation; either version 3 of the License, or
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/src/input/dahdi.c 
new/libosmo-abis-0.5.1/src/input/dahdi.c
--- old/libosmo-abis-0.4.0.2/src/input/dahdi.c  2017-09-14 04:59:32.000000000 
+0200
+++ new/libosmo-abis-0.5.1/src/input/dahdi.c    2018-12-06 13:09:48.000000000 
+0100
@@ -6,6 +6,8 @@
  *
  * All Rights Reserved
  *
+ * SPDX-License-Identifier: GPL-2.0+
+ *
  * 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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/src/input/ipa.c 
new/libosmo-abis-0.5.1/src/input/ipa.c
--- old/libosmo-abis-0.4.0.2/src/input/ipa.c    2017-09-14 04:59:32.000000000 
+0200
+++ new/libosmo-abis-0.5.1/src/input/ipa.c      2018-12-06 13:09:48.000000000 
+0100
@@ -23,6 +23,8 @@
 
 #include <osmocom/abis/ipa.h>
 
+#define LOGIPA(link, level, fmt, args...) LOGP(DLINP, level, "%s:%u " fmt, 
link->addr, link->port, ## args)
+
 void ipa_msg_push_header(struct msgb *msg, uint8_t proto)
 {
        struct ipaccess_head *hh;
@@ -45,33 +47,30 @@
        link->pending_msg = NULL;
 }
 
-static void ipa_client_read(struct ipa_client_conn *link)
+static int ipa_client_read(struct ipa_client_conn *link)
 {
        struct osmo_fd *ofd = link->ofd;
        struct msgb *msg;
        int ret;
 
-       LOGP(DLINP, LOGL_DEBUG, "message received\n");
+       LOGIPA(link, LOGL_DEBUG, "message received\n");
 
        ret = ipa_msg_recv_buffered(ofd->fd, &msg, &link->pending_msg);
-       if (ret < 0) {
+       if (ret <= 0) {
                if (ret == -EAGAIN)
-                       return;
-               if (ret == -EPIPE || ret == -ECONNRESET)
-                       LOGP(DLINP, LOGL_ERROR, "lost connection with 
server\n");
-               ipa_client_conn_close(link);
-               if (link->updown_cb)
-                       link->updown_cb(link, 0);
-               return;
-       } else if (ret == 0) {
-               LOGP(DLINP, LOGL_ERROR, "connection closed with server\n");
+                       return 0;
+               else if (ret == -EPIPE || ret == -ECONNRESET)
+                       LOGIPA(link, LOGL_ERROR, "lost connection with 
server\n");
+               else if (ret == 0)
+                       LOGIPA(link, LOGL_ERROR, "connection closed with 
server\n");
                ipa_client_conn_close(link);
                if (link->updown_cb)
                        link->updown_cb(link, 0);
-               return;
+               return -EBADF;
        }
        if (link->read_cb)
-               link->read_cb(link, msg);
+               return link->read_cb(link, msg);
+       return 0;
 }
 
 static void ipa_client_write(struct ipa_client_conn *link)
@@ -87,7 +86,7 @@
        struct llist_head *lh;
        int ret;
 
-       LOGP(DLINP, LOGL_DEBUG, "sending data\n");
+       LOGIPA(link, LOGL_DEBUG, "sending data\n");
 
        if (llist_empty(&link->tx_queue)) {
                ofd->when &= ~BSC_FD_WRITE;
@@ -104,7 +103,7 @@
                        if (link->updown_cb)
                                link->updown_cb(link, 0);
                }
-               LOGP(DLINP, LOGL_ERROR, "error to send\n");
+               LOGIPA(link, LOGL_ERROR, "error to send\n");
        }
        msgb_free(msg);
        return 0;
@@ -113,7 +112,7 @@
 static int ipa_client_fd_cb(struct osmo_fd *ofd, unsigned int what)
 {
        struct ipa_client_conn *link = ofd->data;
-       int error, ret;
+       int error, ret = 0;
        socklen_t len = sizeof(error);
 
        switch(link->state) {
@@ -126,18 +125,18 @@
                        return 0;
                }
                ofd->when &= ~BSC_FD_WRITE;
-               LOGP(DLINP, LOGL_NOTICE, "connection done.\n");
+               LOGIPA(link, LOGL_NOTICE, "connection done\n");
                link->state = IPA_CLIENT_LINK_STATE_CONNECTED;
                if (link->updown_cb)
                        link->updown_cb(link, 1);
                break;
        case IPA_CLIENT_LINK_STATE_CONNECTED:
                if (what & BSC_FD_READ) {
-                       LOGP(DLINP, LOGL_DEBUG, "connected read\n");
-                       ipa_client_read(link);
+                       LOGIPA(link, LOGL_DEBUG, "connected read\n");
+                       ret = ipa_client_read(link);
                }
-               if (what & BSC_FD_WRITE) {
-                       LOGP(DLINP, LOGL_DEBUG, "connected write\n");
+               if (ret != -EBADF && (what & BSC_FD_WRITE)) {
+                       LOGIPA(link, LOGL_DEBUG, "connected write\n");
                        ipa_client_write(link);
                }
                break;
@@ -329,31 +328,29 @@
        close(link->ofd.fd);
 }
 
-static void ipa_server_conn_read(struct ipa_server_conn *conn)
+static int ipa_server_conn_read(struct ipa_server_conn *conn)
 {
        struct osmo_fd *ofd = &conn->ofd;
        struct msgb *msg;
        int ret;
 
-       LOGP(DLINP, LOGL_DEBUG, "message received\n");
+       LOGIPA(conn, LOGL_DEBUG, "message received\n");
 
        ret = ipa_msg_recv_buffered(ofd->fd, &msg, &conn->pending_msg);
-       if (ret < 0) {
+       if (ret <= 0) {
                if (ret == -EAGAIN)
-                       return;
-               if (ret == -EPIPE || ret == -ECONNRESET)
-                       LOGP(DLINP, LOGL_ERROR, "lost connection with 
server\n");
-               ipa_server_conn_destroy(conn);
-               return;
-       } else if (ret == 0) {
-               LOGP(DLINP, LOGL_ERROR, "connection closed with server\n");
+                       return 0;
+               else if (ret == -EPIPE || ret == -ECONNRESET)
+                       LOGIPA(conn, LOGL_ERROR, "lost connection with 
server\n");
+               else if (ret == 0)
+                       LOGIPA(conn, LOGL_ERROR, "connection closed with 
server\n");
                ipa_server_conn_destroy(conn);
-               return;
+               return -EBADF;
        }
        if (conn->cb)
-               conn->cb(conn, msg);
+               return conn->cb(conn, msg);
 
-       return;
+       return 0;
 }
 
 static void ipa_server_conn_write(struct ipa_server_conn *conn)
@@ -361,7 +358,7 @@
        struct msgb *msg;
        int ret;
 
-       LOGP(DLINP, LOGL_DEBUG, "sending data\n");
+       LOGIPA(conn, LOGL_DEBUG, "sending data\n");
        msg = msgb_dequeue(&conn->tx_queue);
 
        if (!msg) {
@@ -371,7 +368,7 @@
 
        ret = send(conn->ofd.fd, msg->data, msg->len, 0);
        if (ret < 0) {
-               LOGP(DLINP, LOGL_ERROR, "error to send\n");
+               LOGIPA(conn, LOGL_ERROR, "error to send\n");
        }
        msgb_free(msg);
 }
@@ -379,11 +376,12 @@
 static int ipa_server_conn_cb(struct osmo_fd *ofd, unsigned int what)
 {
        struct ipa_server_conn *conn = ofd->data;
+       int rc = 0;
 
        LOGP(DLINP, LOGL_DEBUG, "connected read/write\n");
        if (what & BSC_FD_READ)
-               ipa_server_conn_read(conn);
-       if (what & BSC_FD_WRITE)
+               rc = ipa_server_conn_read(conn);
+       if (rc != -EBADF && (what & BSC_FD_WRITE))
                ipa_server_conn_write(conn);
 
        return 0;
@@ -450,28 +448,27 @@
                break;
        default:
                /* Error */
-               LOGP(DLINP, LOGL_ERROR, "Unexpected return from "
+               LOGIPA(conn, LOGL_ERROR, "Unexpected return from "
                     "ipa_ccm_rcvmsg_base: %d\n", rc);
                goto err;
        }
 
        switch (msg_type) {
        case IPAC_MSGT_ID_RESP:
-               rc = ipa_ccm_idtag_parse(&tlvp, (uint8_t *)msg->l2h + 2,
-                                        msgb_l2len(msg)-2);
+               rc = ipa_ccm_id_resp_parse(&tlvp, (const uint8_t *)msg->l2h+1, 
msgb_l2len(msg)-1);
                if (rc < 0) {
-                       LOGP(DLINP, LOGL_ERROR, "IPA CCM RESPonse with "
+                       LOGIPA(conn, LOGL_ERROR, "IPA CCM RESPonse with "
                                "malformed TLVs\n");
                        goto err;
                }
                if (!TLVP_PRESENT(&tlvp, IPAC_IDTAG_UNIT)) {
-                       LOGP(DLINP, LOGL_ERROR, "IPA CCM RESP without "
+                       LOGIPA(conn, LOGL_ERROR, "IPA CCM RESP without "
                                "unit ID\n");
                        goto err;
                }
                len = TLVP_LEN(&tlvp, IPAC_IDTAG_UNIT);
                if (len < 1) {
-                       LOGP(DLINP, LOGL_ERROR, "IPA CCM RESP with short"
+                       LOGIPA(conn, LOGL_ERROR, "IPA CCM RESP with short"
                                "unit ID\n");
                        goto err;
                }
@@ -485,7 +482,7 @@
                        goto err;
                break;
        default:
-               LOGP(DLINP, LOGL_ERROR, "Unknown IPA message type\n");
+               LOGIPA(conn, LOGL_ERROR, "Unknown IPA message type\n");
                break;
        }
        return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/src/input/ipaccess.c 
new/libosmo-abis-0.5.1/src/input/ipaccess.c
--- old/libosmo-abis-0.4.0.2/src/input/ipaccess.c       2017-09-14 
04:59:32.000000000 +0200
+++ new/libosmo-abis-0.5.1/src/input/ipaccess.c 2018-12-06 13:09:48.000000000 
+0100
@@ -6,6 +6,8 @@
  *
  * All Rights Reserved
  *
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
  * the Free Software Foundation; either version 3 of the License, or
@@ -60,8 +62,11 @@
 static int ipaccess_drop(struct osmo_fd *bfd, struct e1inp_line *line)
 {
        int ret = 1;
-       unsigned int ts_nr = bfd->priv_nr;
-       struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1];
+       struct e1inp_ts *e1i_ts;
+       if (bfd->priv_nr == E1INP_SIGN_OML)
+               e1i_ts = e1inp_line_ipa_oml_ts(line);
+       else
+               e1i_ts = e1inp_line_ipa_rsl_ts(line, bfd->priv_nr - 
E1INP_SIGN_RSL);
 
        /* Error case: we did not see any ID_RESP yet for this socket. */
        if (bfd->fd != -1) {
@@ -82,6 +87,8 @@
        return ret;
 }
 
+/* Returns -1 on error, and 0 or 1 on success. If -1 or 1 is returned, line has
+ * been released and should not be used anymore by the caller. */
 static int ipaccess_rcvmsg(struct e1inp_line *line, struct msgb *msg,
                           struct osmo_fd *bfd)
 {
@@ -115,19 +122,16 @@
        case IPAC_MSGT_ID_RESP:
                DEBUGP(DLMI, "ID_RESP\n");
                /* parse tags, search for Unit ID */
-               ret = ipa_ccm_idtag_parse(&tlvp, (uint8_t *)msg->l2h + 2,
-                                               msgb_l2len(msg)-2);
+               ret = ipa_ccm_id_resp_parse(&tlvp, (const uint8_t *)msg->l2h+1, 
msgb_l2len(msg)-1);
                DEBUGP(DLMI, "\n");
                if (ret < 0) {
                        LOGP(DLINP, LOGL_ERROR, "IPA response message "
                                "with malformed TLVs\n");
-                       ret = -EINVAL;
                        goto err;
                }
                if (!TLVP_PRESENT(&tlvp, IPAC_IDTAG_UNIT)) {
                        LOGP(DLINP, LOGL_ERROR, "IPA response message "
                                "without unit ID\n");
-                       ret = -EINVAL;
                        goto err;
 
                }
@@ -135,7 +139,6 @@
                if (len < 1) {
                        LOGP(DLINP, LOGL_ERROR, "IPA response message "
                                "with too small unit ID\n");
-                       ret = -EINVAL;
                        goto err;
                }
                unitid = (char *) TLVP_VAL(&tlvp, IPAC_IDTAG_UNIT);
@@ -145,7 +148,6 @@
                if (!line->ops->sign_link_up) {
                        LOGP(DLINP, LOGL_ERROR,
                             "Unable to set signal link, closing socket.\n");
-                       ret = -EINVAL;
                        goto err;
                }
                /* the BSC creates the new sign links at this stage. */
@@ -157,7 +159,6 @@
                                LOGP(DLINP, LOGL_ERROR,
                                        "Unable to set signal link, "
                                        "closing socket.\n");
-                               ret = -EINVAL;
                                goto err;
                        }
                } else if (bfd->priv_nr == E1INP_SIGN_RSL) {
@@ -172,7 +173,6 @@
                                LOGP(DLINP, LOGL_ERROR,
                                        "Unable to set signal link, "
                                        "closing socket.\n");
-                               ret = -EINVAL;
                                goto err;
                        }
                        /* this is a bugtrap, the BSC should be using the
@@ -188,12 +188,13 @@
                         * this RSL link, attach it to this socket. */
                        bfd->data = new_line = sign_link->ts->line;
                        e1inp_line_get(new_line);
-                       ts = &new_line->ts[E1INP_SIGN_RSL+unit_data.trx_id-1];
+                       ts = e1inp_line_ipa_rsl_ts(new_line, unit_data.trx_id);
                        newbfd = &ts->driver.ipaccess.fd;
 
                        /* get rid of our old temporary bfd */
-                       memcpy(newbfd, bfd, sizeof(*newbfd));
-                       newbfd->priv_nr = E1INP_SIGN_RSL + unit_data.trx_id;
+                       /* preserve 'newbfd->when' flags potentially set by 
sign_link_up() */
+                       osmo_fd_setup(newbfd, bfd->fd, newbfd->when | 
bfd->when, bfd->cb,
+                                     bfd->data, E1INP_SIGN_RSL + 
unit_data.trx_id);
                        osmo_fd_unregister(bfd);
                        bfd->fd = -1;
                        ret = osmo_fd_register(newbfd);
@@ -204,11 +205,11 @@
                        }
                        /* now we can release the dummy RSL line. */
                        e1inp_line_put(line);
+                       return 1;
                }
                break;
        default:
                LOGP(DLINP, LOGL_ERROR, "Unknown IPA message type\n");
-               ret = -EINVAL;
                goto err;
        }
        return 0;
@@ -217,19 +218,25 @@
        close(bfd->fd);
        bfd->fd = -1;
        e1inp_line_put(line);
-       return ret;
+       return -1;
 }
 
+/* Returns -EBADF if bfd cannot be used by the caller anymore after return. */
 static int handle_ts1_read(struct osmo_fd *bfd)
 {
        struct e1inp_line *line = bfd->data;
        unsigned int ts_nr = bfd->priv_nr;
-       struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1];
+       struct e1inp_ts *e1i_ts;
        struct e1inp_sign_link *link;
        struct ipaccess_head *hh;
        struct msgb *msg = NULL;
        int ret, rc;
 
+       if (bfd->priv_nr == E1INP_SIGN_OML)
+               e1i_ts = e1inp_line_ipa_oml_ts(line);
+       else
+               e1i_ts = e1inp_line_ipa_rsl_ts(line, bfd->priv_nr - 
E1INP_SIGN_RSL);
+
        ret = ipa_msg_recv_buffered(bfd->fd, &msg, &e1i_ts->pending_msg);
        if (ret < 0) {
                if (ret == -EAGAIN)
@@ -245,23 +252,21 @@
 
        hh = (struct ipaccess_head *) msg->data;
        if (hh->proto == IPAC_PROTO_IPACCESS) {
-               ipaccess_rcvmsg(line, msg, bfd);
+               ret = ipaccess_rcvmsg(line, msg, bfd);
+               /* BIG FAT WARNING: bfd might no longer exist here (ret != 0),
+                * since ipaccess_rcvmsg() might have free'd it !!! */
                msgb_free(msg);
-               return 0;
+               return ret != 0 ? -EBADF : 0;
        } else if (e1i_ts->type == E1INP_TS_TYPE_NONE) {
                /* this sign link is not know yet.. complain. */
                LOGP(DLINP, LOGL_ERROR, "Timeslot is not configured.\n");
-               ret = -EINVAL;
                goto err_msg;
        }
-       /* BIG FAT WARNING: bfd might no longer exist here, since 
ipaccess_rcvmsg()
-        * might have free'd it !!! */
 
        link = e1inp_lookup_sign_link(e1i_ts, hh->proto, 0);
        if (!link) {
                LOGP(DLINP, LOGL_ERROR, "no matching signalling link for "
                        "hh->proto=0x%02x\n", hh->proto);
-               ret = -EINVAL;
                goto err_msg;
        }
        msg->dst = link;
@@ -270,7 +275,6 @@
        if (!e1i_ts->line->ops->sign_link) {
                LOGP(DLINP, LOGL_ERROR, "Fix your application, "
                        "no action set for signalling messages.\n");
-               ret = -EINVAL;
                goto err_msg;
        }
        rc = e1i_ts->line->ops->sign_link(msg);
@@ -283,12 +287,12 @@
                     " sign_link returned error: %s.\n", strerror(-rc));
        }
 
-       return 0;
+       return rc;
 err_msg:
        msgb_free(msg);
 err:
        ipaccess_drop(bfd, line);
-       return ret;
+       return -EBADF;
 }
 
 static int ts_want_write(struct e1inp_ts *e1i_ts)
@@ -316,11 +320,16 @@
 static int __handle_ts1_write(struct osmo_fd *bfd, struct e1inp_line *line)
 {
        unsigned int ts_nr = bfd->priv_nr;
-       struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1];
+       struct e1inp_ts *e1i_ts;
        struct e1inp_sign_link *sign_link;
        struct msgb *msg;
        int ret;
 
+       if (bfd->priv_nr == E1INP_SIGN_OML)
+               e1i_ts = e1inp_line_ipa_oml_ts(line);
+       else
+               e1i_ts = e1inp_line_ipa_rsl_ts(line, bfd->priv_nr - 
E1INP_SIGN_RSL);
+
        bfd->when &= ~BSC_FD_WRITE;
 
        /* get the next msg for this timeslot */
@@ -389,7 +398,7 @@
 
        if (what & BSC_FD_READ)
                rc = handle_ts1_read(bfd);
-       if (what & BSC_FD_WRITE)
+       if (rc != -EBADF && (what & BSC_FD_WRITE))
                rc = handle_ts1_write(bfd);
 
        return rc;
@@ -458,7 +467,6 @@
 static int ipaccess_bsc_oml_cb(struct ipa_server_link *link, int fd)
 {
        int ret;
-       int idx = 0;
        int i;
        struct e1inp_line *line;
        struct e1inp_ts *e1i_ts;
@@ -472,20 +480,16 @@
        }
 
        /* create virrtual E1 timeslots for signalling */
-       e1inp_ts_config_sign(&line->ts[E1INP_SIGN_OML-1], line);
+       e1inp_ts_config_sign(e1inp_line_ipa_oml_ts(line), line);
 
        /* initialize the fds */
        for (i = 0; i < ARRAY_SIZE(line->ts); ++i)
                line->ts[i].driver.ipaccess.fd.fd = -1;
 
-       e1i_ts = &line->ts[idx];
+       e1i_ts = e1inp_line_ipa_oml_ts(line);
 
        bfd = &e1i_ts->driver.ipaccess.fd;
-       bfd->fd = fd;
-       bfd->data = line;
-       bfd->priv_nr = E1INP_SIGN_OML;
-       bfd->cb = ipaccess_fd_cb;
-       bfd->when = BSC_FD_READ;
+       osmo_fd_setup(bfd, fd, BSC_FD_READ, ipaccess_fd_cb, line, 
E1INP_SIGN_OML);
        ret = osmo_fd_register(bfd);
        if (ret < 0) {
                LOGP(DLINP, LOGL_ERROR, "could not register FD\n");
@@ -532,16 +536,12 @@
 
        /* we need this to initialize this in case to avoid crashes in case
         * that the socket is closed before we've seen an ID_RESP. */
-       e1inp_ts_config_sign(&line->ts[E1INP_SIGN_OML-1], line);
+       e1inp_ts_config_sign(e1inp_line_ipa_oml_ts(line), line);
 
-       e1i_ts = &line->ts[E1INP_SIGN_RSL-1];
+       e1i_ts = e1inp_line_ipa_rsl_ts(line, 0);
 
        bfd = &e1i_ts->driver.ipaccess.fd;
-       bfd->fd = fd;
-       bfd->data = line;
-       bfd->priv_nr = E1INP_SIGN_RSL;
-       bfd->cb = ipaccess_fd_cb;
-       bfd->when = BSC_FD_READ;
+       osmo_fd_setup(bfd, fd, BSC_FD_READ, ipaccess_fd_cb, line, 
E1INP_SIGN_RSL);
        ret = osmo_fd_register(bfd);
        if (ret < 0) {
                LOGP(DLINP, LOGL_ERROR, "could not register FD\n");
@@ -569,7 +569,7 @@
 #define IPA_STRING_MAX 64
 
 static struct msgb *
-ipa_bts_id_resp(struct ipaccess_unit *dev, uint8_t *data, int len, int trx_nr)
+ipa_bts_id_resp(const struct ipaccess_unit *dev, uint8_t *data, int len, int 
trx_nr)
 {
        struct msgb *nmsg;
        char str[IPA_STRING_MAX];
@@ -603,19 +603,19 @@
                        break;
                case IPAC_IDTAG_LOCATION1:
                        if (dev->location1)
-                               strncpy(str, dev->location1, IPA_STRING_MAX);
+                               osmo_strlcpy(str, dev->location1, sizeof(str));
                        break;
                case IPAC_IDTAG_LOCATION2:
                        if (dev->location2)
-                               strncpy(str, dev->location2, IPA_STRING_MAX);
+                               osmo_strlcpy(str, dev->location2, sizeof(str));
                        break;
                case IPAC_IDTAG_EQUIPVERS:
                        if (dev->equipvers)
-                               strncpy(str, dev->equipvers, IPA_STRING_MAX);
+                               osmo_strlcpy(str, dev->equipvers, sizeof(str));
                        break;
                case IPAC_IDTAG_SWVERSION:
                        if (dev->swversion)
-                               strncpy(str, dev->swversion, IPA_STRING_MAX);
+                               osmo_strlcpy(str, dev->swversion, sizeof(str));
                        break;
                case IPAC_IDTAG_UNITNAME:
                        snprintf(str, sizeof(str),
@@ -627,7 +627,7 @@
                        break;
                case IPAC_IDTAG_SERNR:
                        if (dev->serno)
-                               strncpy(str, dev->serno, IPA_STRING_MAX);
+                               osmo_strlcpy(str, dev->serno, sizeof(str));
                        break;
                default:
                        LOGP(DLINP, LOGL_NOTICE,
@@ -635,7 +635,6 @@
                        msgb_free(nmsg);
                        return NULL;
                }
-               str[IPA_STRING_MAX-1] = '\0';
 
                LOGP(DLINP, LOGL_INFO, " tag %d: %s\n", data[1], str);
                tag = msgb_put(nmsg, 3 + strlen(str) + 1);
@@ -702,7 +701,8 @@
                        if (link->ofd->priv_nr >= E1INP_SIGN_RSL)
                                trx_nr = link->ofd->priv_nr - E1INP_SIGN_RSL;
 
-                       LOGP(DLINP, LOGL_NOTICE, "received ID get\n");
+                       LOGP(DLINP, LOGL_NOTICE, "received ID get from 
%u/%u/%u\n",
+                            dev->site_id, dev->bts_id, trx_nr);
                        rmsg = ipa_bts_id_resp(dev, data + 1, len - 1, trx_nr);
                        ret = ipa_send(link->ofd->fd, rmsg->data, rmsg->len);
                        if (ret != rmsg->len) {
@@ -739,19 +739,17 @@
        struct ipaccess_head *hh = (struct ipaccess_head *) msg->data;
        struct e1inp_ts *e1i_ts = NULL;
        struct e1inp_sign_link *sign_link;
+       uint8_t msg_type = *(msg->l2h);
        int ret = 0;
 
        /* special handling for IPA CCM. */
        if (hh->proto == IPAC_PROTO_IPACCESS) {
-               uint8_t msg_type = *(msg->l2h);
-
                /* this is a request for identification from the BSC. */
                if (msg_type == IPAC_MSGT_ID_GET) {
                        if (!link->line->ops->sign_link_up) {
                                LOGP(DLINP, LOGL_ERROR,
                                        "Unable to set signal link, "
                                        "closing socket.\n");
-                               ret = -EINVAL;
                                goto err;
                        }
                }
@@ -763,8 +761,6 @@
                goto err;
 
        if (ret == 1 && hh->proto == IPAC_PROTO_IPACCESS) {
-               uint8_t msg_type = *(msg->l2h);
-
                if (msg_type == IPAC_MSGT_ID_GET) {
                        sign_link = link->line->ops->sign_link_up(msg,
                                        link->line,
@@ -773,25 +769,29 @@
                                LOGP(DLINP, LOGL_ERROR,
                                        "Unable to set signal link, "
                                        "closing socket.\n");
-                               ret = -EINVAL;
                                goto err;
                        }
                }
                msgb_free(msg);
                return ret;
        } else if (link->port == IPA_TCP_PORT_OML)
-               e1i_ts = &link->line->ts[0];
+               e1i_ts = e1inp_line_ipa_oml_ts(link->line);
        else if (link->port == IPA_TCP_PORT_RSL)
-               e1i_ts = &link->line->ts[link->ofd->priv_nr-1];
+               e1i_ts = e1inp_line_ipa_rsl_ts(link->line, link->ofd->priv_nr - 
E1INP_SIGN_RSL);
 
        OSMO_ASSERT(e1i_ts != NULL);
 
+       if (e1i_ts->type == E1INP_TS_TYPE_NONE) {
+               LOGP(DLINP, LOGL_ERROR, "Signalling link not initialized. 
Discarding."
+                    " port=%u msg_type=%u\n", link->port, msg_type);
+               goto err;
+       }
+
        /* look up for some existing signaling link. */
        sign_link = e1inp_lookup_sign_link(e1i_ts, hh->proto, 0);
        if (sign_link == NULL) {
                LOGP(DLINP, LOGL_ERROR, "no matching signalling link for "
                        "hh->proto=0x%02x\n", hh->proto);
-               ret = -EIO;
                goto err;
        }
        msg->dst = sign_link;
@@ -800,16 +800,14 @@
        if (!link->line->ops->sign_link) {
                LOGP(DLINP, LOGL_ERROR, "Fix your application, "
                        "no action set for signalling messages.\n");
-               ret = -ENOENT;
                goto err;
        }
-       link->line->ops->sign_link(msg);
-       return 0;
+       return link->line->ops->sign_link(msg);
 
 err:
        ipa_client_conn_close(link);
        msgb_free(msg);
-       return ret;
+       return -EBADF;
 }
 
 struct ipaccess_line {
@@ -884,7 +882,7 @@
                     IPA_TCP_PORT_OML);
 
                link = ipa_client_conn_create(tall_ipa_ctx,
-                                             &line->ts[E1INP_SIGN_OML-1],
+                                             e1inp_line_ipa_oml_ts(line),
                                              E1INP_SIGN_OML,
                                              line->ops->cfg.ipa.addr,
                                              IPA_TCP_PORT_OML,
@@ -934,7 +932,7 @@
        }
 
        rsl_link = ipa_client_conn_create(tall_ipa_ctx,
-                                         &line->ts[E1INP_SIGN_RSL+trx_nr-1],
+                                         e1inp_line_ipa_rsl_ts(line, trx_nr),
                                          E1INP_SIGN_RSL+trx_nr,
                                          rem_addr, rem_port,
                                          ipaccess_bts_updown_cb,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/src/input/lapd.c 
new/libosmo-abis-0.5.1/src/input/lapd.c
--- old/libosmo-abis-0.4.0.2/src/input/lapd.c   2017-09-14 04:59:32.000000000 
+0200
+++ new/libosmo-abis-0.5.1/src/input/lapd.c     2018-12-06 13:09:48.000000000 
+0100
@@ -8,6 +8,8 @@
  *
  * All Rights Reserved
  *
+ * SPDX-License-Identifier: GPL-2.0+
+
  * 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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/src/input/lapd_pcap.c 
new/libosmo-abis-0.5.1/src/input/lapd_pcap.c
--- old/libosmo-abis-0.4.0.2/src/input/lapd_pcap.c      2017-09-14 
04:59:32.000000000 +0200
+++ new/libosmo-abis-0.5.1/src/input/lapd_pcap.c        2018-12-06 
13:09:48.000000000 +0100
@@ -5,6 +5,8 @@
  * Author: Harald Welte <[email protected]>
  *         Pablo Neira Ayuso <[email protected]>
  *
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
  * the Free Software Foundation; either version 3 of the License, or
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/src/input/misdn.c 
new/libosmo-abis-0.5.1/src/input/misdn.c
--- old/libosmo-abis-0.4.0.2/src/input/misdn.c  2017-09-14 04:59:32.000000000 
+0200
+++ new/libosmo-abis-0.5.1/src/input/misdn.c    2018-12-06 13:09:48.000000000 
+0100
@@ -5,6 +5,8 @@
  *
  * All Rights Reserved
  *
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
  * the Free Software Foundation; either version 3 of the License, or
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/src/input/rs232.c 
new/libosmo-abis-0.5.1/src/input/rs232.c
--- old/libosmo-abis-0.4.0.2/src/input/rs232.c  2017-09-14 04:59:32.000000000 
+0200
+++ new/libosmo-abis-0.5.1/src/input/rs232.c    2018-12-06 13:09:48.000000000 
+0100
@@ -7,6 +7,8 @@
  * Authors:    Harald Welte <[email protected]>
  *             Pablo Neira Ayuso <[email protected]>
  *
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
  * the Free Software Foundation; either version 3 of the License, or
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/src/input/unixsocket.c 
new/libosmo-abis-0.5.1/src/input/unixsocket.c
--- old/libosmo-abis-0.4.0.2/src/input/unixsocket.c     2017-09-14 
04:59:32.000000000 +0200
+++ new/libosmo-abis-0.5.1/src/input/unixsocket.c       2018-12-06 
13:09:48.000000000 +0100
@@ -1,12 +1,13 @@
 /* OpenBSC Abis receive lapd over a unix socket */
 
-/* (C) 2016 by sysmocom s.f.m.c. GmbH
- *
+/* (C) 2016 by sysmocom - s.f.m.c. GmbH
  * Author: Alexander Couzens <[email protected]>
  * Based on other e1_input drivers.
  *
  * All Rights Reserved
  *
+ * SPDX-License-Identifier: GPL-2.0+
+ *
  * 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
@@ -27,6 +28,7 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <sys/socket.h>
+#include <sys/un.h>
 #include <limits.h>
 #include <string.h>
 
@@ -227,16 +229,11 @@
 static int unixsocket_line_update(struct e1inp_line *line)
 {
        struct unixsocket_line *config;
-       char sock_path[PATH_MAX];
+       struct sockaddr_un un;
+       const char *sock_path;
        int ret = 0;
        int i;
 
-       if (line->sock_path)
-               strcpy(sock_path, line->sock_path);
-       else
-               sprintf(sock_path, "%s%d", UNIXSOCKET_SOCK_PATH_DEFAULT,
-                       line->num);
-
        LOGP(DLINP, LOGL_NOTICE, "line update (line=%p)\n", line);
 
        if (!line->driver_data)
@@ -254,6 +251,20 @@
        config->fd.cb = unixsocket_cb;
 
        /* Open unix domain socket */
+       if (line->sock_path == NULL) {
+               ret = snprintf(un.sun_path, sizeof(un.sun_path), "%s%d",
+                   UNIXSOCKET_SOCK_PATH_DEFAULT, line->num);
+               if (ret == -1) {
+                       LOGP(DLINP, LOGL_ERROR, "Cannot create default socket 
path: %s\n", strerror(errno));
+                       return -errno;
+               } else if (ret >= sizeof(un.sun_path)) {
+                       LOGP(DLINP, LOGL_ERROR, "Default socket path exceeds 
%zd bytes: %s%d\n",
+                            sizeof(un.sun_path), UNIXSOCKET_SOCK_PATH_DEFAULT, 
line->num);
+                       return -ENOSPC;
+               }
+               sock_path = un.sun_path;
+       } else
+               sock_path = line->sock_path;
        ret = osmo_sock_unix_init(SOCK_SEQPACKET, 0, sock_path,
                                  OSMO_SOCK_F_CONNECT);
        if (ret < 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/src/ipa_proxy.c 
new/libosmo-abis-0.5.1/src/ipa_proxy.c
--- old/libosmo-abis-0.4.0.2/src/ipa_proxy.c    2017-09-14 04:59:32.000000000 
+0200
+++ new/libosmo-abis-0.5.1/src/ipa_proxy.c      2018-12-06 13:09:48.000000000 
+0100
@@ -245,8 +245,7 @@
                        VTY_NEWLINE);
                return CMD_WARNING;
        }
-       strncpy(ipi->name, argv[0], IPA_INSTANCE_NAME);
-       ipi->name[IPA_INSTANCE_NAME - 1] = '\0';
+       osmo_strlcpy(ipi->name, argv[0], sizeof(ipi->name));
        ipi->net.type = type;
        ipi->net.addr = talloc_strdup(tall_ipa_proxy_ctx, argv[2]);
        ipi->net.port = port;
@@ -652,7 +651,6 @@
 
        install_element(CONFIG_NODE, &ipa_cfg_cmd);
        install_node(&ipa_node, ipa_cfg_write);
-       vty_install_default(L_IPA_NODE);
        install_element(L_IPA_NODE, &ipa_instance_cfg_add_cmd);
        install_element(L_IPA_NODE, &ipa_route_cfg_add_cmd);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/src/subchan_demux.c 
new/libosmo-abis-0.5.1/src/subchan_demux.c
--- old/libosmo-abis-0.4.0.2/src/subchan_demux.c        2017-09-14 
04:59:32.000000000 +0200
+++ new/libosmo-abis-0.5.1/src/subchan_demux.c  2018-12-06 13:09:48.000000000 
+0100
@@ -3,6 +3,8 @@
 /* (C) 2009 by Harald Welte <[email protected]>
  * All Rights Reserved
  *
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
  * the Free Software Foundation; either version 3 of the License, or
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/src/trau/osmo_ortp.c 
new/libosmo-abis-0.5.1/src/trau/osmo_ortp.c
--- old/libosmo-abis-0.4.0.2/src/trau/osmo_ortp.c       2017-09-14 
04:59:32.000000000 +0200
+++ new/libosmo-abis-0.5.1/src/trau/osmo_ortp.c 2018-12-06 13:09:48.000000000 
+0100
@@ -2,6 +2,8 @@
  * (C) 2011 by On-Waves e.h.f
  * All Rights Reserved
  *
+ * SPDX-License-Identifier: GPL-2.0+
+ *
  * 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
@@ -100,8 +102,35 @@
 #endif
        OrtpLogLevel lev, const char *fmt, va_list args)
 {
+       /* Some strings coming from ortp are not endline terminated and mangle
+        * the output. Make sure all strings are endl terminated before
+        * printing.
+        */
+       int needs_endl;
+       const char *domain_str;
+       char *str;
+       size_t fmt_len = strlen(fmt);
+#if HAVE_ORTP_LOG_DOMAIN
+       /* domain can be NULL, found experimentally */
+       domain_str = domain ? : "";
+#else
+       domain_str = "";
+#endif
+       size_t  domain_len = strlen(domain_str);
+
+       if (fmt_len == 0)
+               return;
+
+       needs_endl = fmt[fmt_len - 1] != '\n' ? 1 : 0;
+
+       str = osmo_ortp_malloc(domain_len + 2 /*": "*/ + fmt_len + needs_endl + 
1);
+       sprintf(str, "%s%s%s%s", domain_str, domain_len ? ": " : "", fmt, 
needs_endl ? "\n" : "");
+
        osmo_vlogp(DLMIB, ortp_to_osmo_lvl(lev), __FILE__, 0,
-                  0, fmt, args);
+                  0, str, args);
+
+       osmo_ortp_free(str);
+
 }
 
 /* ORTP signal callbacks */
@@ -112,7 +141,8 @@
        uint32_t ssrc = rtp_session_get_recv_ssrc(rs);
 
        LOGP(DLMIB, LOGL_INFO,
-            "osmo-ortp(%d): ssrc_changed to 0x%08x\n", port, ssrc);
+            "osmo-ortp(%d): ssrc_changed to 0x%08x, resetting\n", port, ssrc);
+       rtp_session_reset(rs);
 }
 
 static void ortp_sig_cb_pt(RtpSession *rs, void *data)
@@ -368,6 +398,8 @@
        rtp_session_set_seq_number(rs->sess, random());
        rs->tx_timestamp = random();
 
+       /* Make sure ssrc changes are detected immediately */
+       rtp_session_set_ssrc_changed_threshold(rs->sess, 0);
 
        return rs;
 }
@@ -653,3 +685,10 @@
        if (jitter)
                *last_jitter = jitter->jitter;
 }
+
+void osmo_rtp_set_source_desc(struct osmo_rtp_socket *rs, const char *cname,
+                               const char *name, const char *email, const char 
*phone,
+                               const char *loc, const char *tool, const char 
*note)
+{
+       rtp_session_set_source_description(rs->sess, cname, name, email, phone, 
loc, tool, note);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/src/trau_frame.c 
new/libosmo-abis-0.5.1/src/trau_frame.c
--- old/libosmo-abis-0.4.0.2/src/trau_frame.c   2017-09-14 04:59:32.000000000 
+0200
+++ new/libosmo-abis-0.5.1/src/trau_frame.c     2018-12-06 13:09:48.000000000 
+0100
@@ -3,6 +3,8 @@
 /* (C) 2009 by Harald Welte <[email protected]>
  * All Rights Reserved
  *
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
  * the Free Software Foundation; either version 3 of the License, or
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/tests/e1inp_ipa_bsc_test.c 
new/libosmo-abis-0.5.1/tests/e1inp_ipa_bsc_test.c
--- old/libosmo-abis-0.4.0.2/tests/e1inp_ipa_bsc_test.c 2017-09-14 
04:59:32.000000000 +0200
+++ new/libosmo-abis-0.5.1/tests/e1inp_ipa_bsc_test.c   2018-12-06 
13:09:48.000000000 +0100
@@ -30,9 +30,9 @@
        switch(type) {
        case E1INP_SIGN_OML:
                LOGP(DBSCTEST, LOGL_NOTICE, "OML link up request received.\n");
-               e1inp_ts_config_sign(&line->ts[E1INP_SIGN_OML - 1], line);
+               e1inp_ts_config_sign(e1inp_line_ipa_oml_ts(line), line);
                sign_link = oml_sign_link =
-                       e1inp_sign_link_create(&line->ts[E1INP_SIGN_OML - 1],
+                       e1inp_sign_link_create(e1inp_line_ipa_oml_ts(line),
                                               E1INP_SIGN_OML, NULL, 255, 0);
                break;
        case E1INP_SIGN_RSL:
@@ -45,10 +45,10 @@
 
                /* We have to use the same line that the OML link. */
                oml_line = oml_sign_link->ts->line;
-               e1inp_ts_config_sign(&oml_line->ts[E1INP_SIGN_RSL - 1],
+               e1inp_ts_config_sign(e1inp_line_ipa_rsl_ts(oml_line, 0),
                                     oml_line);
                sign_link = rsl_sign_link =
-                    e1inp_sign_link_create(&oml_line->ts[E1INP_SIGN_RSL - 1],
+                    e1inp_sign_link_create(e1inp_line_ipa_rsl_ts(oml_line, 0),
                                            E1INP_SIGN_RSL, NULL, 0, 0);
                break;
        default:
@@ -213,8 +213,8 @@
 {
        tall_test = talloc_named_const(NULL, 1, "e1inp_test");
        libosmo_abis_init(tall_test);
-
-       osmo_init_logging(&bsc_test_log_info);
+       msgb_talloc_ctx_init(tall_test, 0);
+       osmo_init_logging2(tall_test, &bsc_test_log_info);
 
        struct e1inp_line_ops ops = {
                .cfg = {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/tests/e1inp_ipa_bts_test.c 
new/libosmo-abis-0.5.1/tests/e1inp_ipa_bts_test.c
--- old/libosmo-abis-0.4.0.2/tests/e1inp_ipa_bts_test.c 2017-09-14 
04:59:32.000000000 +0200
+++ new/libosmo-abis-0.5.1/tests/e1inp_ipa_bts_test.c   2018-12-06 
13:09:48.000000000 +0100
@@ -51,9 +51,9 @@
        case E1INP_SIGN_OML:
                LOGP(DBTSTEST, LOGL_NOTICE, "OML link up request received.\n");
 
-               e1inp_ts_config_sign(&line->ts[E1INP_SIGN_OML - 1], line);
+               e1inp_ts_config_sign(e1inp_line_ipa_oml_ts(line), line);
                sign_link = oml_sign_link =
-                       e1inp_sign_link_create(&line->ts[E1INP_SIGN_OML - 1],
+                       e1inp_sign_link_create(e1inp_line_ipa_oml_ts(line),
                                                E1INP_SIGN_OML, NULL, 255, 0);
                if (!oml_sign_link) {
                        LOGP(DBTSTEST, LOGL_ERROR,
@@ -76,10 +76,10 @@
        case E1INP_SIGN_RSL:
                LOGP(DBTSTEST, LOGL_NOTICE, "RSL link up request received.\n");
 
-               e1inp_ts_config_sign(&line->ts[E1INP_SIGN_RSL - 1], line);
+               e1inp_ts_config_sign(e1inp_line_ipa_rsl_ts(line, 0), line);
 
                sign_link = rsl_sign_link =
-                       e1inp_sign_link_create(&line->ts[E1INP_SIGN_RSL - 1],
+                       e1inp_sign_link_create(e1inp_line_ipa_rsl_ts(line, 0),
                                                E1INP_SIGN_RSL, NULL, 0, 0);
                if (!rsl_sign_link) {
                        LOGP(DBTSTEST, LOGL_ERROR,
@@ -265,8 +265,8 @@
 
        tall_test = talloc_named_const(NULL, 1, "e1inp_test");
        libosmo_abis_init(tall_test);
-
-       osmo_init_logging(&bts_test_log_info);
+       msgb_talloc_ctx_init(tall_test, 0);
+       osmo_init_logging2(tall_test, &bts_test_log_info);
 
        struct e1inp_line_ops ops = {
                .cfg = {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/tests/ipa_proxy_test.c 
new/libosmo-abis-0.5.1/tests/ipa_proxy_test.c
--- old/libosmo-abis-0.4.0.2/tests/ipa_proxy_test.c     2017-09-14 
04:59:32.000000000 +0200
+++ new/libosmo-abis-0.5.1/tests/ipa_proxy_test.c       2018-12-06 
13:09:48.000000000 +0100
@@ -39,8 +39,8 @@
 {
        tall_test = talloc_named_const(NULL, 1, "ipa proxy test");
        libosmo_abis_init(tall_test);
-
-       osmo_init_logging(&ipa_proxy_test_log_info);
+       msgb_talloc_ctx_init(tall_test, 0);
+       osmo_init_logging2(tall_test, &ipa_proxy_test_log_info);
 
        vty_init(&vty_info);
        ipa_proxy_vty_init();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-0.4.0.2/tests/ipa_recv/ipa_recv_test.c 
new/libosmo-abis-0.5.1/tests/ipa_recv/ipa_recv_test.c
--- old/libosmo-abis-0.4.0.2/tests/ipa_recv/ipa_recv_test.c     2017-09-14 
04:59:32.000000000 +0200
+++ new/libosmo-abis-0.5.1/tests/ipa_recv/ipa_recv_test.c       2018-12-06 
13:09:48.000000000 +0100
@@ -2,10 +2,12 @@
 
 /*
  * (C) 2014 by On-Waves
- * (C) 2014 by sysmocom s.f.m.c. GmbH
+ * (C) 2014 by sysmocom - s.f.m.c. GmbH
  *
  * All Rights Reserved
  *
+ * SPDX-License-Identifier: AGPL-3.0+
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
  * the Free Software Foundation; either version 3 of the License, or
@@ -232,7 +234,9 @@
 
 int main(int argc, char **argv)
 {
-       osmo_init_logging(&info);
+       void *tall_ctx = talloc_named_const(NULL, 1, "Root context");
+       msgb_talloc_ctx_init(tall_ctx, 0);
+       osmo_init_logging2(tall_ctx, &info);
        log_set_all_filter(osmo_stderr_target, 1);
        log_set_log_level(osmo_stderr_target, LOGL_INFO);
 

++++++ osmo-talloc.diff ++++++
--- /var/tmp/diff_new_pack.Akt8rm/_old  2019-01-05 14:41:42.180513614 +0100
+++ /var/tmp/diff_new_pack.Akt8rm/_new  2019-01-05 14:41:42.180513614 +0100
@@ -9,23 +9,23 @@
  src/Makefile.am |    2 +-
  2 files changed, 2 insertions(+), 1 deletion(-)
 
-Index: libosmo-abis-0.4.0.2/configure.ac
+Index: libosmo-abis-0.5.1/configure.ac
 ===================================================================
---- libosmo-abis-0.4.0.2.orig/configure.ac
-+++ libosmo-abis-0.4.0.2/configure.ac
-@@ -47,6 +47,7 @@ AC_SUBST(SYMBOL_VISIBILITY)
+--- libosmo-abis-0.5.1.orig/configure.ac
++++ libosmo-abis-0.5.1/configure.ac
+@@ -59,6 +59,7 @@ AC_SUBST(SYMBOL_VISIBILITY)
  dnl Generate the output
  AM_CONFIG_HEADER(config.h)
  
 +PKG_CHECK_MODULES([TALLOC], [talloc])
- PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.0)
- PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.3.0)
- PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.3.10)
-Index: libosmo-abis-0.4.0.2/src/Makefile.am
+ PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.12.0)
+ PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.12.0)
+ PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.12.0)
+Index: libosmo-abis-0.5.1/src/Makefile.am
 ===================================================================
---- libosmo-abis-0.4.0.2.orig/src/Makefile.am
-+++ libosmo-abis-0.4.0.2/src/Makefile.am
-@@ -7,7 +7,7 @@ TRAU_LIBVERSION=2:0:0
+--- libosmo-abis-0.5.1.orig/src/Makefile.am
++++ libosmo-abis-0.5.1/src/Makefile.am
+@@ -7,7 +7,7 @@ TRAU_LIBVERSION=3:1:1
  AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)
  AM_CFLAGS= -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOVTY_CFLAGS) $(COVERAGE_CFLAGS)
  AM_LDFLAGS = $(COVERAGE_LDFLAGS)


Reply via email to