Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libupnp for openSUSE:Factory checked 
in at 2025-09-29 16:31:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libupnp (Old)
 and      /work/SRC/openSUSE:Factory/.libupnp.new.11973 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libupnp"

Mon Sep 29 16:31:34 2025 rev:41 rq:1307607 version:1.14.25

Changes:
--------
--- /work/SRC/openSUSE:Factory/libupnp/libupnp.changes  2025-06-13 
18:43:08.029183137 +0200
+++ /work/SRC/openSUSE:Factory/.libupnp.new.11973/libupnp.changes       
2025-09-29 16:32:55.584175513 +0200
@@ -1,0 +2,6 @@
+Sun Sep 28 20:56:08 UTC 2025 - Jan Engelhardt <[email protected]>
+
+- Update to release 1.14.25
+  * Handle multiple results of `getaddrinfo`
+
+-------------------------------------------------------------------

Old:
----
  release-1.14.24.tar.gz

New:
----
  release-1.14.25.tar.gz

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

Other differences:
------------------
++++++ libupnp.spec ++++++
--- /var/tmp/diff_new_pack.Uifqu7/_old  2025-09-29 16:32:56.380208872 +0200
+++ /var/tmp/diff_new_pack.Uifqu7/_new  2025-09-29 16:32:56.384209039 +0200
@@ -20,7 +20,7 @@
 %define pnpver 17
 %define ixmlver 11
 Name:           libupnp
-Version:        1.14.24
+Version:        1.14.25
 Release:        0
 Summary:        An implementation of Universal Plug and Play (UPnP)
 License:        BSD-3-Clause

++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.Uifqu7/_old  2025-09-29 16:32:56.424210716 +0200
+++ /var/tmp/diff_new_pack.Uifqu7/_new  2025-09-29 16:32:56.432211051 +0200
@@ -1,5 +1,5 @@
-mtime: 1749713668
-commit: a7359ec39fae3da392815b26b12ad577942ab44f13be53dcafb954d59958e770
+mtime: 1759092987
+commit: 67b0f856802a0150dad861f7e246835d9863761cd93b6d6de49c06476df85b8b
 url: https://src.opensuse.org/jengelh/libupnp
 revision: master
 

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2025-09-28 22:56:36.000000000 +0200
@@ -0,0 +1 @@
+.osc

++++++ release-1.14.24.tar.gz -> release-1.14.25.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pupnp-release-1.14.24/.github/workflows/release.yml 
new/pupnp-release-1.14.25/.github/workflows/release.yml
--- old/pupnp-release-1.14.24/.github/workflows/release.yml     2025-06-11 
22:53:32.000000000 +0200
+++ new/pupnp-release-1.14.25/.github/workflows/release.yml     2025-09-18 
14:44:41.000000000 +0200
@@ -74,7 +74,9 @@
         # This action uploads the generated release files to GitHub
         uses: softprops/action-gh-release@v2
         with:
-         files: |
+          draft: true
+          generate_release_notes: true
+          files: |
             ${{ steps.find-bzname.outputs.bz2_name }}
             ${{ steps.find-bzname.outputs.bz2_name }}.sha1
       - name: Homekeeping
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pupnp-release-1.14.24/.gitignore 
new/pupnp-release-1.14.25/.gitignore
--- old/pupnp-release-1.14.24/.gitignore        2025-06-11 22:53:32.000000000 
+0200
+++ new/pupnp-release-1.14.25/.gitignore        2025-09-18 14:44:41.000000000 
+0200
@@ -83,6 +83,7 @@
 *.config
 *.creator
 *.creator.user
+*.creator.user.*
 *.cxxflags
 *.files
 *.includes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pupnp-release-1.14.24/ChangeLog 
new/pupnp-release-1.14.25/ChangeLog
--- old/pupnp-release-1.14.24/ChangeLog 2025-06-11 22:53:32.000000000 +0200
+++ new/pupnp-release-1.14.25/ChangeLog 2025-09-18 14:44:41.000000000 +0200
@@ -9,6 +9,11 @@
        Aborted.
 
 *******************************************************************************
+Version 1.14.25
+*******************************************************************************
+
+
+*******************************************************************************
 Version 1.14.24
 *******************************************************************************
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pupnp-release-1.14.24/README.md 
new/pupnp-release-1.14.25/README.md
--- old/pupnp-release-1.14.24/README.md 2025-06-11 22:53:32.000000000 +0200
+++ new/pupnp-release-1.14.25/README.md 2025-09-18 14:44:41.000000000 +0200
@@ -102,7 +102,8 @@
 | -------------- | ---------- | ---------------------------------------- |
 | 1.18.0         | TBA ?      | [Portable UPnP SDK][Portable UPnP SDK]   |
 | 1.16.0         | aborted    | [Portable UPnP SDK][Portable UPnP SDK]   |
-| 1.14.24        | TBA        | [Portable UPnP SDK][Portable UPnP SDK]   |
+| 1.14.25        | TBA        | [Portable UPnP SDK][Portable UPnP SDK]   |
+| 1.14.24        | 2025-06-11 | [Portable UPnP SDK][Portable UPnP SDK]   |
 | 1.14.23        | 2025-06-07 | [Portable UPnP SDK][Portable UPnP SDK]   |
 | 1.14.22        | 2025-06-02 | [Portable UPnP SDK][Portable UPnP SDK]   |
 | 1.14.21        | 2025-06-01 | [Portable UPnP SDK][Portable UPnP SDK]   |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pupnp-release-1.14.24/configure.ac 
new/pupnp-release-1.14.25/configure.ac
--- old/pupnp-release-1.14.24/configure.ac      2025-06-11 22:53:32.000000000 
+0200
+++ new/pupnp-release-1.14.25/configure.ac      2025-09-18 14:44:41.000000000 
+0200
@@ -23,11 +23,11 @@
 dnl # *please update only once, before a formal release, not for each change*
 dnl #
 dnl 
############################################################################
-AC_INIT([libupnp],[1.14.24],[[email protected]])
+AC_INIT([libupnp],[1.14.25],[[email protected]])
 AC_SUBST([LT_VERSION_IXML], [12:3:1])
-AC_SUBST([LT_VERSION_UPNP], [19:4:2])
+AC_SUBST([LT_VERSION_UPNP], [19:5:2])
 dnl 
############################################################################
-dnl # Release 1.14.22
+dnl # Release 1.14.23
 dnl # "current:revision:age"
 dnl #
 dnl # - Code has changed in upnp
@@ -51,6 +51,15 @@
 dnl #   age: eee_1_1 -> 0
 dnl #
 dnl #AC_SUBST([LT_VERSION_IXML], [12:3:1])
+dnl #AC_SUBST([LT_VERSION_UPNP], [19:4:2])
+dnl 
############################################################################
+dnl # Release 1.14.24
+dnl # "current:revision:age"
+dnl #
+dnl # - Code has changed in upnp
+dnl #   revision: 3 -> 4
+dnl #
+dnl #AC_SUBST([LT_VERSION_IXML], [12:3:1])
 dnl #AC_SUBST([LT_VERSION_UPNP], [19:3:2])
 dnl 
############################################################################
 dnl # Release 1.14.23
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pupnp-release-1.14.24/docs/Doxyfile 
new/pupnp-release-1.14.25/docs/Doxyfile
--- old/pupnp-release-1.14.24/docs/Doxyfile     2025-06-11 22:53:32.000000000 
+0200
+++ new/pupnp-release-1.14.25/docs/Doxyfile     2025-09-18 14:44:41.000000000 
+0200
@@ -38,7 +38,7 @@
 # could be handy for archiving the generated documentation or if some version
 # control system is used.
 
-PROJECT_NUMBER         = 1.14.24
+PROJECT_NUMBER         = 1.14.25
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pupnp-release-1.14.24/docs/changelog_template.txt 
new/pupnp-release-1.14.25/docs/changelog_template.txt
--- old/pupnp-release-1.14.24/docs/changelog_template.txt       2025-06-11 
22:53:32.000000000 +0200
+++ new/pupnp-release-1.14.25/docs/changelog_template.txt       2025-09-18 
14:44:41.000000000 +0200
@@ -1,5 +1,5 @@
 *******************************************************************************
-Version 1.14.24
+Version 1.14.25
 *******************************************************************************
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pupnp-release-1.14.24/libupnp.spec 
new/pupnp-release-1.14.25/libupnp.spec
--- old/pupnp-release-1.14.24/libupnp.spec      2025-06-11 22:53:32.000000000 
+0200
+++ new/pupnp-release-1.14.25/libupnp.spec      2025-09-18 14:44:41.000000000 
+0200
@@ -1,4 +1,4 @@
-Version: 1.14.24
+Version: 1.14.25
 Summary: Universal Plug and Play (UPnP) SDK
 Name: libupnp-1.14
 Release: 1%{?dist}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pupnp-release-1.14.24/upnp/src/ssdp/ssdp_device.c 
new/pupnp-release-1.14.25/upnp/src/ssdp/ssdp_device.c
--- old/pupnp-release-1.14.24/upnp/src/ssdp/ssdp_device.c       2025-06-11 
22:53:32.000000000 +0200
+++ new/pupnp-release-1.14.25/upnp/src/ssdp/ssdp_device.c       2025-09-18 
14:44:41.000000000 +0200
@@ -142,7 +142,7 @@
                        API,
                        __FILE__,
                        __LINE__,
-                       "MX     =  %d\n",
+                       "MX          =  %d\n",
                        event.Mx);
                UpnpPrintf(UPNP_INFO,
                        API,
@@ -210,80 +210,73 @@
                errorBuffer);
 }
 
-               #define PROCESS_SOCKET_ERROR(file, line, error, func_name) \
+               #define PROCESS_SOCKET_ERROR(file, line, rc, error, func_name) \
                        do { \
                                if (rc == -1) { \
                                        ProcessSocketError( \
                                                file, line, func_name); \
                                        ret = error; \
-                                       goto end_NewRequestHandler; \
+                                       goto end_SendToCaller; \
                                } \
                        } while (0)
 
 /*!
- * \brief Works as a request handler which passes the HTTP request string
- * to multicast channel.
+ * \brief Handles the request for one potential target port
  *
  * \return UPNP_E_SUCCESS if successful else appropriate error.
  */
-static int NewRequestHandler(
-       /*! [in] Ip address, to send the reply. */
+static int SendToCaller(
+       /*! [in] Address detail for socket */
+       struct addrinfo *res,
+       /*! [in] Socket address, to send the reply. */
        struct sockaddr *DestAddr,
        /*! [in] Number of packet to be sent. */
        int NumPacket,
-       /*! [in] . */
-       char **RqPacket)
+       /*! [in] Request content */
+       char **RqPacket,
+       /*! [in] Ip address, to send the reply. */
+       struct in_addr *replyAddr)
 {
        int rc;
        SOCKET ReplySock;
        socklen_t socklen = sizeof(struct sockaddr_storage);
        int Index;
-       struct in_addr replyAddr;
-       struct addrinfo hints, *res;
-       int yes = 1;
+       static const int yes = 1;
        /* a/c to UPNP Spec */
-       int ttl = 4;
+       static const int ttl = 4;
                #ifdef UPNP_ENABLE_IPV6
-       int hops = 1;
+       static const int hops = 1;
                #endif
        char buf_ntop[INET6_ADDRSTRLEN];
        int ret = UPNP_E_SUCCESS;
 
-       if (strlen(gIF_IPV4) > (size_t)0 &&
-               !inet_pton(AF_INET, gIF_IPV4, &replyAddr)) {
-               return UPNP_E_INVALID_PARAM;
-       }
-
-       memset(&hints, 0, sizeof(hints));
-       hints.ai_family = DestAddr->sa_family;
-       hints.ai_socktype = SOCK_DGRAM;
-       hints.ai_flags = AI_PASSIVE;
-       if ((rc = getaddrinfo(NULL, SSDP_PORT_STR, &hints, &res)) != 0) {
-               UpnpPrintf(UPNP_INFO,
-                       SSDP,
-                       __FILE__,
-                       __LINE__,
-                       "SSDP_LIB: New Request Handler:"
-                       "Error in getaddrinfo(): %s\n",
-                       gai_strerror(rc));
-               ret = UPNP_E_SOCKET_ERROR;
-               goto end_NewRequestHandlerDontClose;
-       }
        ReplySock = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
        if (ReplySock == INVALID_SOCKET) {
                ProcessSocketError(__FILE__, __LINE__, "socket");
                ret = UPNP_E_OUTOF_SOCKET;
-               goto end_NewRequestHandlerDontClose;
+               goto end_SendToCallerDontClose;
        }
        rc = setsockopt(ReplySock,
                SOL_SOCKET,
                SO_REUSEADDR,
                (OPTION_VALUE_CAST)&yes,
-               sizeof yes);
+               sizeof(yes));
        PROCESS_SOCKET_ERROR(
-               __FILE__, __LINE__, UPNP_E_SOCKET_ERROR, "setsockopt-1");
-       rc = bind(ReplySock, res->ai_addr, res->ai_addrlen);
-       PROCESS_SOCKET_ERROR(__FILE__, __LINE__, UPNP_E_SOCKET_BIND, "bind");
+               __FILE__, __LINE__, rc, UPNP_E_SOCKET_ERROR, "setsockopt-1");
+               #if (defined(BSD) && !defined(__GNU__)) || \
+                       defined(__APPLE__) || defined(__linux__)
+       rc = setsockopt(ReplySock,
+               SOL_SOCKET,
+               SO_REUSEPORT,
+               (OPTION_VALUE_CAST)&yes,
+               sizeof(yes));
+       PROCESS_SOCKET_ERROR(
+               __FILE__, __LINE__, rc, UPNP_E_SOCKET_ERROR, "setsockopt-1x");
+               #endif /* BSD, __APPLE__, __linux__ */
+       ssize_t bindrc = bind(ReplySock, res->ai_addr, res->ai_addrlen);
+       PROCESS_SOCKET_ERROR(
+               __FILE__, __LINE__, bindrc, UPNP_E_SOCKET_BIND, "bind");
+
        switch (DestAddr->sa_family) {
        case AF_INET:
                inet_ntop(AF_INET,
@@ -293,19 +286,21 @@
                rc = setsockopt(ReplySock,
                        IPPROTO_IP,
                        IP_MULTICAST_IF,
-                       (OPTION_VALUE_CAST)&replyAddr,
-                       sizeof(replyAddr));
+                       (OPTION_VALUE_CAST)replyAddr,
+                       sizeof(*replyAddr));
                PROCESS_SOCKET_ERROR(__FILE__,
                        __LINE__,
+                       rc,
                        UPNP_E_SOCKET_ERROR,
                        "setsockopt-2");
                rc = setsockopt(ReplySock,
                        IPPROTO_IP,
                        IP_MULTICAST_TTL,
                        (OPTION_VALUE_CAST)&ttl,
-                       sizeof(int));
+                       sizeof(ttl));
                PROCESS_SOCKET_ERROR(__FILE__,
                        __LINE__,
+                       rc,
                        UPNP_E_SOCKET_ERROR,
                        "setsockopt-3");
                socklen = sizeof(struct sockaddr_in);
@@ -323,6 +318,7 @@
                        sizeof(gIF_INDEX));
                PROCESS_SOCKET_ERROR(__FILE__,
                        __LINE__,
+                       rc,
                        UPNP_E_SOCKET_ERROR,
                        "setsockopt-2");
                rc = setsockopt(ReplySock,
@@ -332,22 +328,15 @@
                        sizeof(hops));
                PROCESS_SOCKET_ERROR(__FILE__,
                        __LINE__,
+                       rc,
                        UPNP_E_SOCKET_ERROR,
                        "setsockopt-3");
                break;
                #endif
-       default:
-               UpnpPrintf(UPNP_CRITICAL,
-                       SSDP,
-                       __FILE__,
-                       __LINE__,
-                       "Invalid destination address specified.");
-               ret = UPNP_E_NETWORK_ERROR;
-               goto end_NewRequestHandler;
        }
 
        for (Index = 0; Index < NumPacket; Index++) {
-               ssize_t rc;
+               ssize_t sendrc;
                UpnpPrintf(UPNP_INFO,
                        SSDP,
                        __FILE__,
@@ -355,19 +344,101 @@
                        ">>> SSDP SEND to %s >>>\n%s\n",
                        buf_ntop,
                        *(RqPacket + Index));
-               rc = sendto(ReplySock,
+               sendrc = sendto(ReplySock,
                        *(RqPacket + Index),
                        strlen(*(RqPacket + Index)),
                        0,
                        DestAddr,
                        socklen);
-               PROCESS_SOCKET_ERROR(
-                       __FILE__, __LINE__, UPNP_E_SOCKET_WRITE, "sendto");
+               PROCESS_SOCKET_ERROR(__FILE__,
+                       __LINE__,
+                       sendrc,
+                       UPNP_E_SOCKET_WRITE,
+                       "sendto");
        }
 
-end_NewRequestHandler:
+end_SendToCaller:
        UpnpCloseSocket(ReplySock);
-end_NewRequestHandlerDontClose:
+
+end_SendToCallerDontClose:
+
+       return ret;
+}
+
+/*!
+ * \brief Works as a request handler which passes the HTTP request string
+ * to multicast channel.
+ *
+ * \return UPNP_E_SUCCESS if successful else appropriate error.
+ */
+static int NewRequestHandler(
+       /*! [in] Ip address, to send the reply. */
+       struct sockaddr *DestAddr,
+       /*! [in] Number of packet to be sent. */
+       int NumPacket,
+       /*! [in] Request content */
+       char **RqPacket)
+{
+       int rc;
+       struct in_addr replyAddr;
+       struct addrinfo hints, *result, *res;
+       int ret = UPNP_E_SOCKET_ERROR;
+
+       if (strlen(gIF_IPV4) > (size_t)0 &&
+               !inet_pton(AF_INET, gIF_IPV4, &replyAddr)) {
+               return UPNP_E_INVALID_PARAM;
+       }
+
+       memset(&hints, 0, sizeof(hints));
+       hints.ai_family = DestAddr->sa_family;
+       hints.ai_socktype = SOCK_DGRAM;
+       hints.ai_flags = AI_PASSIVE;
+       hints.ai_protocol = 0;
+       hints.ai_canonname = NULL;
+       hints.ai_addr = NULL;
+       hints.ai_next = NULL;
+
+               #ifdef UPNP_ENABLE_IPV6
+       if (DestAddr->sa_family != AF_INET6 && DestAddr->sa_family != AF_INET)
+               #else
+       if (DestAddr->sa_family != AF_INET)
+               #endif
+       {
+               UpnpPrintf(UPNP_CRITICAL,
+                       SSDP,
+                       __FILE__,
+                       __LINE__,
+                       "Invalid destination address specified.");
+               ret = UPNP_E_NETWORK_ERROR;
+               goto end_NewRequestHandler;
+       }
+
+       // getaddrinfo() returns a list of address structures.
+       // Try each address until we successfully bind(2).
+       // If socket(2) (or bind(2)) fails, we (close the socket
+       // and) try the next address
+       if ((rc = getaddrinfo(NULL, SSDP_PORT_STR, &hints, &result)) != 0) {
+               UpnpPrintf(UPNP_INFO,
+                       SSDP,
+                       __FILE__,
+                       __LINE__,
+                       "SSDP_LIB: New Request Handler:"
+                       "Error in getaddrinfo(): %s\n",
+                       gai_strerror(rc));
+               ret = UPNP_E_SOCKET_ERROR;
+               goto end_NewRequestHandler;
+       }
+
+       for (res = result; res != NULL; res = res->ai_next) {
+               if (SendToCaller(
+                           res, DestAddr, NumPacket, RqPacket, &replyAddr) ==
+                       UPNP_E_SUCCESS)
+                       ret = UPNP_E_SUCCESS; // one successful send makes
+                                             // response successful
+       }
+       freeaddrinfo(result);
+
+end_NewRequestHandler:
 
        return ret;
 }

Reply via email to