Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package socket_wrapper for openSUSE:Factory 
checked in at 2025-05-20 09:31:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/socket_wrapper (Old)
 and      /work/SRC/openSUSE:Factory/.socket_wrapper.new.30101 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "socket_wrapper"

Tue May 20 09:31:07 2025 rev:27 rq:1277071 version:1.5.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/socket_wrapper/socket_wrapper.changes    
2025-01-24 13:39:11.379647148 +0100
+++ /work/SRC/openSUSE:Factory/.socket_wrapper.new.30101/socket_wrapper.changes 
2025-05-20 09:31:14.008061292 +0200
@@ -1,0 +2,7 @@
+Tue May  6 08:11:40 UTC 2025 - Andreas Schneider <a...@cryptomilk.org>
+
+- Update to version 1.5.0
+  * Added support for quic_ko_wrapper
+  * Fixed pcap frames generation for recv(m)msg and recvfrom
+
+-------------------------------------------------------------------

Old:
----
  socket_wrapper-1.4.4.tar.gz
  socket_wrapper-1.4.4.tar.gz.asc

New:
----
  socket_wrapper-1.5.0.tar.gz
  socket_wrapper-1.5.0.tar.gz.asc

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

Other differences:
------------------
++++++ socket_wrapper.spec ++++++
--- /var/tmp/diff_new_pack.L9pPbO/_old  2025-05-20 09:31:14.500081793 +0200
+++ /var/tmp/diff_new_pack.L9pPbO/_new  2025-05-20 09:31:14.504081960 +0200
@@ -24,7 +24,7 @@
 ############################# NOTE ##################################
 
 Name:           socket_wrapper
-Version:        1.4.4
+Version:        1.5.0
 Release:        0
 Summary:        A library passing all socket communications through Unix 
sockets
 License:        BSD-3-Clause

++++++ socket_wrapper-1.4.4.tar.gz -> socket_wrapper-1.5.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.4.4/CHANGELOG 
new/socket_wrapper-1.5.0/CHANGELOG
--- old/socket_wrapper-1.4.4/CHANGELOG  2025-01-22 15:35:01.000000000 +0100
+++ new/socket_wrapper-1.5.0/CHANGELOG  2025-05-06 10:09:04.000000000 +0200
@@ -1,6 +1,10 @@
 CHANGELOG
 =========
 
+version 1.5.0 (released 2025-05-06)
+  * Added support for quic_ko_wrapper
+  * Fixed pcap frames generation for recv(m)msg and recvfrom
+
 version 1.4.4 (released 2025-01-21)
   * Fixed setsockopt(SO_REUSEPORT) with glibc 2.40
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.4.4/CMakeLists.txt 
new/socket_wrapper-1.5.0/CMakeLists.txt
--- old/socket_wrapper-1.4.4/CMakeLists.txt     2025-01-22 15:35:01.000000000 
+0100
+++ new/socket_wrapper-1.5.0/CMakeLists.txt     2025-05-06 10:09:04.000000000 
+0200
@@ -11,7 +11,7 @@
 include(DefineCMakeDefaults)
 include(DefineCompilerFlags)
 
-project(socket_wrapper VERSION 1.4.4 LANGUAGES C)
+project(socket_wrapper VERSION 1.5.0 LANGUAGES C)
 
 # global needed variables
 set(APPLICATION_NAME ${PROJECT_NAME})
@@ -24,8 +24,8 @@
 #   If the source code was changed, but there were no interface changes:
 #     Increment PATCH.
 set(LIBRARY_VERSION_MAJOR 0)
-set(LIBRARY_VERSION_MINOR 4)
-set(LIBRARY_VERSION_PATCH 2)
+set(LIBRARY_VERSION_MINOR 5)
+set(LIBRARY_VERSION_PATCH 0)
 set(LIBRARY_VERSION 
"${LIBRARY_VERSION_MAJOR}.${LIBRARY_VERSION_MINOR}.${LIBRARY_VERSION_PATCH}")
 set(LIBRARY_SOVERSION ${LIBRARY_VERSION_MAJOR})
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.4.4/src/socket_wrapper.c 
new/socket_wrapper-1.5.0/src/socket_wrapper.c
--- old/socket_wrapper-1.4.4/src/socket_wrapper.c       2025-01-22 
15:35:01.000000000 +0100
+++ new/socket_wrapper-1.5.0/src/socket_wrapper.c       2025-05-06 
10:09:04.000000000 +0200
@@ -326,6 +326,8 @@
        int family;
        int type;
        int protocol;
+       int opt_type;
+       int opt_protocol;
        int bound;
        int bcast;
        int is_server;
@@ -3684,13 +3686,15 @@
  *   SOCKET
  ***************************************************************************/
 
-static int swrap_socket(int family, int type, int protocol)
+static int swrap_socket(int family, int type, int protocol, int allow_quic)
 {
        struct socket_info *si = NULL;
        struct socket_info _si = { 0 };
        int fd;
        int ret;
        int real_type = type;
+       int opt_type;
+       int opt_protocol;
 
        /*
         * Remove possible addition flags passed to socket() so
@@ -3737,17 +3741,35 @@
 
        switch (real_type) {
        case SOCK_STREAM:
+               if (protocol == 0) {
+                       protocol = 6; /* IPPROTO_TCP */
+               }
                break;
        case SOCK_DGRAM:
+               if (protocol == 0) {
+                       protocol = 17; /* IPPROTO_UDP */
+               }
                break;
        default:
                errno = EPROTONOSUPPORT;
                return -1;
        }
 
+       opt_type = real_type;
+       opt_protocol = protocol;
+
        switch (protocol) {
-       case 0:
-               break;
+       case 261: /* IPPROTO_QUIC */
+               if (allow_quic) {
+                       /* for the unix socket */
+                       type &= ~real_type;
+                       type |= SOCK_SEQPACKET;
+                       /* capture should use UDP */
+                       real_type = SOCK_DGRAM;
+                       break;
+               }
+               errno = EPROTONOSUPPORT;
+               return -1;
        case 6:
                if (real_type == SOCK_STREAM) {
                        break;
@@ -3783,6 +3805,8 @@
         * the type, not the flags */
        si->type = real_type;
        si->protocol = protocol;
+       si->opt_type = opt_type;
+       si->opt_protocol = opt_protocol;
 
        /*
         * Setup myname so getsockname() can succeed to find out the socket
@@ -3833,7 +3857,13 @@
 
 int socket(int family, int type, int protocol)
 {
-       return swrap_socket(family, type, protocol);
+       return swrap_socket(family, type, protocol, 0);
+}
+
+int socket_wrapper_ipproto_quic_socket(int family, int type)
+{
+       const int protocol = 261; /* IPPROTO_QUIC */
+       return swrap_socket(family, type, protocol, 1);
 }
 
 /****************************************************************************
@@ -4046,6 +4076,8 @@
        child_si->family = parent_si->family;
        child_si->type = parent_si->type;
        child_si->protocol = parent_si->protocol;
+       child_si->opt_type = parent_si->opt_type;
+       child_si->opt_protocol = parent_si->opt_protocol;
        child_si->bound = 1;
        child_si->is_server = 1;
        child_si->connected = 1;
@@ -4973,7 +5005,7 @@
                        }
 
                        *optlen = sizeof(int);
-                       *(int *)optval = si->protocol;
+                       *(int *)optval = si->opt_protocol;
                        ret = 0;
                        goto done;
 #endif /* SO_PROTOCOL */
@@ -4986,7 +5018,7 @@
                        }
 
                        *optlen = sizeof(int);
-                       *(int *)optval = si->type;
+                       *(int *)optval = si->opt_type;
                        ret = 0;
                        goto done;
                default:
@@ -5596,7 +5628,7 @@
        return rc;
 }
 
-static const uint64_t swrap_unix_scm_right_magic = 0x8e0e13f27c42fc36;
+static const uint64_t swrap_unix_scm_right_magic = 0x8e0e13f27c42fc37;
 
 /*
  * We only allow up to 6 fds at a time
@@ -6807,6 +6839,7 @@
 static int swrap_recvmsg_after(int fd,
                               struct socket_info *si,
                               struct msghdr *msg,
+                              int flags,
                               const struct sockaddr_un *un_addr,
                               socklen_t un_addrlen,
                               ssize_t ret)
@@ -6835,8 +6868,16 @@
 
        SWRAP_LOCK_SI(si);
 
+       if (flags & MSG_PEEK) {
+               rc = 0;
+               goto done;
+       }
+
        /* Convert the socket address before we leave */
-       if (si->type == SOCK_DGRAM && un_addr != NULL) {
+       if (si->type == SOCK_DGRAM &&
+           si->protocol == 17 && /* IPPROTO_UDP */
+           un_addr != NULL)
+       {
                rc = sockaddr_convert_from_un(si,
                                              un_addr,
                                              un_addrlen,
@@ -6847,6 +6888,15 @@
                        goto done;
                }
        }
+       if (si->type == SOCK_DGRAM &&
+           si->protocol == 261 && /* IPPROTO_QUIC */
+           un_addr != NULL &&
+           msg->msg_name != NULL &&
+           msg->msg_namelen > 0)
+       {
+               msg->msg_namelen = MIN(si->peername.sa_socklen, 
msg->msg_namelen);
+               memcpy(msg->msg_name, &si->peername.sa, msg->msg_namelen);
+       }
 
        if (avail == 0) {
                rc = 0;
@@ -6999,6 +7049,7 @@
        tret = swrap_recvmsg_after(s,
                                   si,
                                   &msg,
+                                  flags,
                                   &from_addr.sa.un,
                                   from_addr.sa_socklen,
                                   ret);
@@ -7195,7 +7246,7 @@
 
        ret = libc_recv(s, buf, len, flags);
 
-       tret = swrap_recvmsg_after(s, si, &msg, NULL, 0, ret);
+       tret = swrap_recvmsg_after(s, si, &msg, flags, NULL, 0, ret);
        if (tret != 0) {
                return tret;
        }
@@ -7255,7 +7306,7 @@
 
        ret = libc_read(s, buf, len);
 
-       tret = swrap_recvmsg_after(s, si, &msg, NULL, 0, ret);
+       tret = swrap_recvmsg_after(s, si, &msg, 0, NULL, 0, ret);
        if (tret != 0) {
                return tret;
        }
@@ -7457,6 +7508,7 @@
        rc = swrap_recvmsg_after(s,
                                 si,
                                 &msg,
+                                flags,
                                 &from_addr.sa.un,
                                 from_addr.sa_socklen,
                                 ret);
@@ -7660,7 +7712,7 @@
                msg->msg_name = &tmp[i].convert_addr.sa;
                msg->msg_namelen = tmp[i].convert_addr.sa_socklen;
 
-               swrap_recvmsg_after(s, si, msg,
+               swrap_recvmsg_after(s, si, msg, flags,
                                    &tmp[i].from_addr.sa.un,
                                    tmp[i].from_addr.sa_socklen,
                                    ret);
@@ -8179,7 +8231,7 @@
 
        ret = libc_readv(s, msg.msg_iov, msg.msg_iovlen);
 
-       rc = swrap_recvmsg_after(s, si, &msg, NULL, 0, ret);
+       rc = swrap_recvmsg_after(s, si, &msg, 0, NULL, 0, ret);
        if (rc != 0) {
                return rc;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/socket_wrapper-1.4.4/src/socket_wrapper.h 
new/socket_wrapper-1.5.0/src/socket_wrapper.h
--- old/socket_wrapper-1.4.4/src/socket_wrapper.h       2024-06-10 
09:43:42.000000000 +0200
+++ new/socket_wrapper-1.5.0/src/socket_wrapper.h       2025-05-06 
10:09:04.000000000 +0200
@@ -86,4 +86,13 @@
  */
 void socket_wrapper_indicate_no_inet_fd(int fd);
 
+/*
+ * This allows quic_ko_wrapper to create a socket
+ * that simulates an IPPROTO_QUIC socket with
+ * connected datagram semantics. The low-level
+ * AF_UNIX socket will use SOCK_SEQPACKET, but
+ * pretends to be UDP in the generated pcap files
+ */
+int socket_wrapper_ipproto_quic_socket(int family, int type);
+
 #endif /* __SOCKET_WRAPPER_H__ */

Reply via email to