Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libosmo-abis for openSUSE:Factory 
checked in at 2024-05-03 19:45:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libosmo-abis (Old)
 and      /work/SRC/openSUSE:Factory/.libosmo-abis.new.1880 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libosmo-abis"

Fri May  3 19:45:54 2024 rev:20 rq:1171491 version:1.5.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/libosmo-abis/libosmo-abis.changes        
2024-02-12 18:55:18.165200072 +0100
+++ /work/SRC/openSUSE:Factory/.libosmo-abis.new.1880/libosmo-abis.changes      
2024-05-03 19:46:09.624364674 +0200
@@ -1,0 +2,6 @@
+Fri May  3 05:02:52 UTC 2024 - Jan Engelhardt <jeng...@inai.de>
+
+- Update to release 1.5.2
+  * Fix regression with too-short TCP keepalive timeout values
+
+-------------------------------------------------------------------

Old:
----
  1.5.1.tar.gz

New:
----
  1.5.2.tar.gz

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

Other differences:
------------------
++++++ libosmo-abis.spec ++++++
--- /var/tmp/diff_new_pack.eg0NIL/_old  2024-05-03 19:46:12.824481015 +0200
+++ /var/tmp/diff_new_pack.eg0NIL/_new  2024-05-03 19:46:12.864482469 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           libosmo-abis
-Version:        1.5.1
+Version:        1.5.2
 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

++++++ 1.5.1.tar.gz -> 1.5.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-1.5.1/debian/changelog 
new/libosmo-abis-1.5.2/debian/changelog
--- old/libosmo-abis-1.5.1/debian/changelog     2024-01-28 12:04:12.000000000 
+0100
+++ new/libosmo-abis-1.5.2/debian/changelog     2024-03-14 18:32:07.000000000 
+0100
@@ -1,3 +1,12 @@
+libosmo-abis (1.5.2) unstable; urgency=medium
+
+  [ Harald Welte ]
+  * [cosmetic] input/ipaccess.c: We use tab indent, not spaces [wtf]
+  * input/ipaccess: Make sure to say "TCP keepalive"
+  * Fix critical bug in default TCP keepalive user timeout
+
+ -- Vadim Yanitskiy <vyanits...@sysmocom.de>  Fri, 15 Mar 2024 00:32:06 +0700
+
 libosmo-abis (1.5.1) unstable; urgency=medium
 
   [ Harald Welte ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-1.5.1/src/Makefile.am 
new/libosmo-abis-1.5.2/src/Makefile.am
--- old/libosmo-abis-1.5.1/src/Makefile.am      2024-01-28 12:04:12.000000000 
+0100
+++ new/libosmo-abis-1.5.2/src/Makefile.am      2024-03-14 18:32:07.000000000 
+0100
@@ -1,7 +1,7 @@
 # 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=13:1:0
+ABIS_LIBVERSION=13:2:0
 TRAU_LIBVERSION=9:1:7
 
 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libosmo-abis-1.5.1/src/input/ipaccess.c 
new/libosmo-abis-1.5.2/src/input/ipaccess.c
--- old/libosmo-abis-1.5.1/src/input/ipaccess.c 2024-01-28 12:04:12.000000000 
+0100
+++ new/libosmo-abis-1.5.2/src/input/ipaccess.c 2024-03-14 18:32:07.000000000 
+0100
@@ -599,55 +599,56 @@
 static void update_fd_settings(struct e1inp_line *line, int fd)
 {
        int ret;
-       int val;
+       int val, idle_val, interval_val, retry_count_val, user_timeout_val;
 
        if (line->keepalive_num_probes) {
                /* Enable TCP keepalive to find out if the connection is gone */
                val = 1;
                ret = setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &val, 
sizeof(val));
                if (ret < 0)
-                       LOGP(DLINP, LOGL_ERROR, "Failed to set keepalive: %s\n",
+                       LOGP(DLINP, LOGL_ERROR, "Failed to enable TCP 
keepalive: %s\n",
                             strerror(errno));
                else
-                       LOGP(DLINP, LOGL_NOTICE, "Keepalive is set: %i\n", ret);
+                       LOGP(DLINP, LOGL_NOTICE, "TCP Keepalive is enabled\n");
 
+               idle_val = line->keepalive_idle_timeout > 0 ?
+                               line->keepalive_idle_timeout :
+                               DEFAULT_TCP_KEEPALIVE_IDLE_TIMEOUT;
+               interval_val = line->keepalive_probe_interval > -1 ?
+                               line->keepalive_probe_interval :
+                               DEFAULT_TCP_KEEPALIVE_INTERVAL;
+               retry_count_val = line->keepalive_num_probes > 0 ?
+                               line->keepalive_num_probes :
+                               DEFAULT_TCP_KEEPALIVE_RETRY_COUNT;
+               user_timeout_val = 1000 * retry_count_val * (interval_val + 
idle_val);
+               LOGP(DLINP, LOGL_NOTICE,
+                    "TCP keepalive idle_timeout=%us, interval=%us, 
retry_count=%u user_timeout=%ums\n",
+                    idle_val, interval_val, retry_count_val, user_timeout_val);
                /* The following options are not portable! */
-               val = line->keepalive_idle_timeout > 0 ?
-                       line->keepalive_idle_timeout :
-                       DEFAULT_TCP_KEEPALIVE_IDLE_TIMEOUT;
-               ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE,
-                                &val, sizeof(val));
-               if (ret < 0)
+               ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &idle_val, 
sizeof(idle_val));
+               if (ret < 0) {
                        LOGP(DLINP, LOGL_ERROR,
-                            "Failed to set keepalive idle time: %s\n",
+                            "Failed to set TCP keepalive idle time: %s\n",
                             strerror(errno));
-               val = line->keepalive_probe_interval > -1 ?
-                       line->keepalive_probe_interval :
-                       DEFAULT_TCP_KEEPALIVE_INTERVAL;
-               ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL,
-                                &val, sizeof(val));
-               if (ret < 0)
+               }
+               ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &interval_val, 
sizeof(interval_val));
+               if (ret < 0) {
                        LOGP(DLINP, LOGL_ERROR,
-                            "Failed to set keepalive interval: %s\n",
+                            "Failed to set TCP keepalive interval: %s\n",
                             strerror(errno));
-               val = line->keepalive_num_probes > 0 ?
-                       line->keepalive_num_probes :
-                       DEFAULT_TCP_KEEPALIVE_RETRY_COUNT;
-               ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT,
-                                &val, sizeof(val));
-               if (ret < 0)
+               }
+               ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, 
&retry_count_val, sizeof(retry_count_val));
+               if (ret < 0) {
                        LOGP(DLINP, LOGL_ERROR,
-                            "Failed to set keepalive count: %s\n",
+                            "Failed to set TCP keepalive count: %s\n",
                             strerror(errno));
-                val = 1000 * line->keepalive_num_probes *
-                        line->keepalive_probe_interval +
-                        line->keepalive_idle_timeout;
-                ret = setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT,
-                                 &val, sizeof(val));
-                if (ret < 0)
+               }
+               ret = setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, 
&user_timeout_val, sizeof(user_timeout_val));
+               if (ret < 0) {
                        LOGP(DLINP, LOGL_ERROR,
-                             "Failed to set user timoeut: %s\n",
-                             strerror(errno));
+                            "Failed to set TCP user timeout: %s\n",
+                            strerror(errno));
+               }
        }
 
        val = 1;
@@ -718,8 +719,8 @@
        struct osmo_fd *bfd;
        int i, ret;
 
-        /* We don't know yet which OML link to associate it with. Thus, we
-         * allocate a temporary E1 line until we have received ID. */
+       /* We don't know yet which OML link to associate it with. Thus, we
+        * allocate a temporary E1 line until we have received ID. */
        line = e1inp_line_clone(tall_ipa_ctx, link->line, "ipa_bfd");
        if (line == NULL) {
                LOGP(DLINP, LOGL_ERROR, "could not clone E1 line\n");

Reply via email to