Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package qt6-coap for openSUSE:Factory 
checked in at 2026-03-28 20:13:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qt6-coap (Old)
 and      /work/SRC/openSUSE:Factory/.qt6-coap.new.8177 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "qt6-coap"

Sat Mar 28 20:13:47 2026 rev:42 rq:1342787 version:6.11.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/qt6-coap/qt6-coap.changes        2026-02-03 
21:31:32.996783405 +0100
+++ /work/SRC/openSUSE:Factory/.qt6-coap.new.8177/qt6-coap.changes      
2026-03-28 20:15:22.198422321 +0100
@@ -1,0 +2,6 @@
+Mon Mar 23 10:37:46 UTC 2026 - Christophe Marin <[email protected]>
+
+- Update to 6.11.0
+  https://www.qt.io/blog/qt-6.11-released
+
+-------------------------------------------------------------------

Old:
----
  qtcoap-everywhere-src-6.10.2.tar.xz

New:
----
  qtcoap-everywhere-src-6.11.0.tar.xz

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

Other differences:
------------------
++++++ qt6-coap.spec ++++++
--- /var/tmp/diff_new_pack.Aa9qaD/_old  2026-03-28 20:15:22.854449396 +0100
+++ /var/tmp/diff_new_pack.Aa9qaD/_new  2026-03-28 20:15:22.858449561 +0100
@@ -16,8 +16,8 @@
 #
 
 
-%define real_version 6.10.2
-%define short_version 6.10
+%define real_version 6.11.0
+%define short_version 6.11
 %define tar_name qtcoap-everywhere-src
 %define tar_suffix %{nil}
 #
@@ -27,7 +27,7 @@
 %endif
 #
 Name:           qt6-coap%{?pkg_suffix}
-Version:        6.10.2
+Version:        6.11.0
 Release:        0
 Summary:        Qt 6 CoAP client module
 License:        GPL-3.0-or-later
@@ -40,6 +40,7 @@
 BuildRequires:  cmake(Qt6CorePrivate) = %{real_version}
 BuildRequires:  cmake(Qt6Gui) = %{real_version}
 BuildRequires:  cmake(Qt6Network) = %{real_version}
+BuildRequires:  cmake(Qt6NetworkPrivate) = %{real_version}
 BuildRequires:  cmake(Qt6Qml) = %{real_version}
 BuildRequires:  cmake(Qt6Quick) = %{real_version}
 BuildRequires:  cmake(Qt6Widgets) = %{real_version}

++++++ _service ++++++
--- /var/tmp/diff_new_pack.Aa9qaD/_old  2026-03-28 20:15:22.910451708 +0100
+++ /var/tmp/diff_new_pack.Aa9qaD/_new  2026-03-28 20:15:22.918452038 +0100
@@ -1,9 +1,9 @@
 <services>
   <service name="tar_scm" mode="disabled">
    <param name="changesgenerate">disable</param>
-   <param name="version">6.10.2</param>
+   <param name="version">6.11.0</param>
    <param name="url">git://code.qt.io/qt/qtcoap.git</param>
-   <param name="revision">v6.10.2</param>
+   <param name="revision">v6.11.0</param>
    <param name="scm">git</param>
    <param name="filename">qtcoap-everywhere-src</param>
   </service>

++++++ qtcoap-everywhere-src-6.10.2.tar.xz -> 
qtcoap-everywhere-src-6.11.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtcoap-everywhere-src-6.10.2/.cmake.conf 
new/qtcoap-everywhere-src-6.11.0/.cmake.conf
--- old/qtcoap-everywhere-src-6.10.2/.cmake.conf        2026-01-20 
05:15:48.000000000 +0100
+++ new/qtcoap-everywhere-src-6.11.0/.cmake.conf        2026-03-09 
10:39:41.000000000 +0100
@@ -1,7 +1,8 @@
-set(QT_REPO_MODULE_VERSION "6.10.2")
+set(QT_REPO_MODULE_VERSION "6.11.0")
 set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1")
 set(QT_EXTRA_INTERNAL_TARGET_DEFINES
     "QT_NO_CONTEXTLESS_CONNECT=1"
     "QT_NO_FOREACH=1"
     "QT_NO_QASCONST=1"
+    "QT_NO_URL_CAST_FROM_STRING=1"
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtcoap-everywhere-src-6.10.2/CMakeLists.txt 
new/qtcoap-everywhere-src-6.11.0/CMakeLists.txt
--- old/qtcoap-everywhere-src-6.10.2/CMakeLists.txt     2026-01-20 
05:15:48.000000000 +0100
+++ new/qtcoap-everywhere-src-6.11.0/CMakeLists.txt     2026-03-09 
10:39:41.000000000 +0100
@@ -11,7 +11,13 @@
     LANGUAGES CXX
 )
 
-find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals 
Core Network)
+find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals)
+
+# This should be called as early as possible, just after 
find_package(BuildInternals) where it is
+# defined.
+qt_internal_project_setup()
+
+find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS  Core Network)
 find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Gui Widgets 
Quick Qml)
 
 if(NOT QT_FEATURE_udpsocket)
@@ -19,6 +25,4 @@
     return()
 endif()
 
-qt_internal_project_setup()
-
 qt_build_repo()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtcoap-everywhere-src-6.10.2/REUSE.toml 
new/qtcoap-everywhere-src-6.11.0/REUSE.toml
--- old/qtcoap-everywhere-src-6.10.2/REUSE.toml 2026-01-20 05:15:48.000000000 
+0100
+++ new/qtcoap-everywhere-src-6.11.0/REUSE.toml 2026-03-09 10:39:41.000000000 
+0100
@@ -3,34 +3,34 @@
 [[annotations]]
 path = ["**/.gitattributes", "**.gitignore", "**.gitreview"]
 precedence = "closest"
-SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
+SPDX-FileCopyrightText = "Copyright (C) The Qt Company Ltd."
 SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR BSD-3-Clause"
 
 [[annotations]]
 path = [".tag", ".cmake.conf", "**.yaml", "**.yml", "**ci_config_linux.json"]
 precedence = "closest"
 comment = "build system"
-SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
+SPDX-FileCopyrightText = "Copyright (C) The Qt Company Ltd."
 SPDX-License-Identifier = "BSD-3-Clause"
 
 [[annotations]]
 path = ["examples/**"]
 comment = "this must be after the build system table because example and 
snippets take precedence over build system"
 precedence = "closest"
-SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
+SPDX-FileCopyrightText = "Copyright (C) The Qt Company Ltd."
 SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR BSD-3-Clause"
 
 [[annotations]]
 path = ["**/README*", "**.qdocconf", "src/coap/doc/style/style.css"]
 comment = "documentation"
 precedence = "closest"
-SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
+SPDX-FileCopyrightText = "Copyright (C) The Qt Company Ltd."
 SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR 
GFDL-1.3-no-invariants-only"
 
 [[annotations]]
 path = ["**.toml", "licenseRule.json"]
 precedence = "override"
-SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
+SPDX-FileCopyrightText = "Copyright (C) The Qt Company Ltd."
 SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR BSD-3-Clause"
 
 [[annotations]]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtcoap-everywhere-src-6.10.2/dependencies.yaml 
new/qtcoap-everywhere-src-6.11.0/dependencies.yaml
--- old/qtcoap-everywhere-src-6.10.2/dependencies.yaml  2026-01-20 
05:15:48.000000000 +0100
+++ new/qtcoap-everywhere-src-6.11.0/dependencies.yaml  2026-03-09 
10:39:41.000000000 +0100
@@ -1,4 +1,4 @@
 dependencies:
   ../qtbase:
-    ref: 000d6c62f7880bb8d3054724e8da0b8ae244130e
+    ref: 8ba7ea4b77a4b8f1948760221e264917ddc9e1c8
     required: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtcoap-everywhere-src-6.10.2/dist/REUSE.toml 
new/qtcoap-everywhere-src-6.11.0/dist/REUSE.toml
--- old/qtcoap-everywhere-src-6.10.2/dist/REUSE.toml    2026-01-20 
05:15:48.000000000 +0100
+++ new/qtcoap-everywhere-src-6.11.0/dist/REUSE.toml    2026-03-09 
10:39:41.000000000 +0100
@@ -4,5 +4,5 @@
 path = ["*"]
 precedence = "override"
 comment = "Licensed as documentation."
-SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
+SPDX-FileCopyrightText = "Copyright (C) The Qt Company Ltd."
 SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR 
GFDL-1.3-no-invariants-only"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtcoap-everywhere-src-6.10.2/src/coap/CMakeLists.txt 
new/qtcoap-everywhere-src-6.11.0/src/coap/CMakeLists.txt
--- old/qtcoap-everywhere-src-6.10.2/src/coap/CMakeLists.txt    2026-01-20 
05:15:48.000000000 +0100
+++ new/qtcoap-everywhere-src-6.11.0/src/coap/CMakeLists.txt    2026-03-09 
10:39:41.000000000 +0100
@@ -25,12 +25,12 @@
         qcoapsecurityconfiguration.cpp qcoapsecurityconfiguration.h
     LIBRARIES
         Qt::CorePrivate
-        Qt::Network
+        Qt::NetworkPrivate
     PUBLIC_LIBRARIES
         Qt::Core
     PRIVATE_MODULE_INTERFACE
         Qt::CorePrivate
-        Qt::Network
+        Qt::NetworkPrivate
 )
 qt_internal_add_docs(Coap
     doc/qtcoap.qdocconf
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtcoap-everywhere-src-6.10.2/src/coap/qcoapclient.cpp 
new/qtcoap-everywhere-src-6.11.0/src/coap/qcoapclient.cpp
--- old/qtcoap-everywhere-src-6.10.2/src/coap/qcoapclient.cpp   2026-01-20 
05:15:48.000000000 +0100
+++ new/qtcoap-everywhere-src-6.11.0/src/coap/qcoapclient.cpp   2026-03-09 
10:39:41.000000000 +0100
@@ -303,7 +303,8 @@
 
     Sends the \a request using the POST method and returns a new QCoapReply
     object. Uses \a device content as the payload for this request.
-    A null device is treated as empty content.
+    A null device is treated as empty content, in which case the payload of the
+    \a request will be used.
 
     \note The device has to be open and readable before calling this function.
 
@@ -311,10 +312,7 @@
 */
 QCoapReply *QCoapClient::post(const QCoapRequest &request, QIODevice *device)
 {
-    if (!device)
-        return nullptr;
-
-    return post(request, device->readAll());
+    return post(request, device ? device->readAll() : QByteArray());
 }
 
 /*!
@@ -442,7 +440,7 @@
                                                                   
d->connection->isSecure());
     copyRequest.enableObserve();
 
-    return get(copyRequest);
+    return d->sendRequest(copyRequest);
 }
 
 /*!
@@ -690,4 +688,48 @@
                               Q_ARG(int, tokenSize));
 }
 
+#if QT_CONFIG(networkinterface)
+/*!
+    \property QCoapClient::bindInterface
+    \brief the network interface to be used by the socket
+    \since 6.11
+
+    The default value is an \l {QNetworkInterface::isValid()}{invalid}
+    QNetworkInterface object, meaning that incoming packets will be accepted
+    from all network interfaces. Similarly, all network interfaces can be used
+    to send outgoing packets.
+
+    When a valid network interface is specified, incoming packets will only be
+    accepted from that interface. Similarly, outgoing packets will only be sent
+    using that interface.
+
+    Changing the property only has an effect the next time the client binds to
+    the socket, so make sure to call \l disconnect() if there was any prior
+    communication.
+*/
+void QCoapClient::setBindInterface(const QNetworkInterface &iface)
+{
+    Q_D(QCoapClient);
+    // QNI does not have operator==(). We use index() to distinguish the
+    // interfaces, because this is the value provided by the OS, and it is
+    // unlikely to change.
+    // We also need to check isValid(), because an invalid interface has
+    // index() == 0, which might clash with an existing interface index.
+    if (iface.isValid() == d->interface.isValid()
+        && iface.index() == d->interface.index()) {
+        return;
+    }
+    d->interface = iface;
+    QMetaObject::invokeMethod(d->connection, 
&QCoapConnection::setUdpNetworkInterface,
+                              Qt::QueuedConnection, iface);
+    Q_EMIT bindInterfaceChanged(iface);
+}
+
+QNetworkInterface QCoapClient::bindInterface() const
+{
+    Q_D(const QCoapClient);
+    return d->interface;
+}
+#endif
+
 QT_END_NAMESPACE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtcoap-everywhere-src-6.10.2/src/coap/qcoapclient.h 
new/qtcoap-everywhere-src-6.11.0/src/coap/qcoapclient.h
--- old/qtcoap-everywhere-src-6.10.2/src/coap/qcoapclient.h     2026-01-20 
05:15:48.000000000 +0100
+++ new/qtcoap-everywhere-src-6.11.0/src/coap/qcoapclient.h     2026-03-09 
10:39:41.000000000 +0100
@@ -11,6 +11,7 @@
 #include <QtCoap/qcoapnamespace.h>
 #include <QtCore/qobject.h>
 #include <QtNetwork/qabstractsocket.h>
+#include <QtNetwork/qnetworkinterface.h>
 
 QT_BEGIN_NAMESPACE
 
@@ -27,6 +28,10 @@
 class Q_COAP_EXPORT QCoapClient : public QObject
 {
     Q_OBJECT
+#if QT_CONFIG(networkinterface)
+    Q_PROPERTY(QNetworkInterface bindInterface READ bindInterface WRITE 
setBindInterface
+                                               NOTIFY bindInterfaceChanged)
+#endif
 public:
     explicit QCoapClient(QtCoap::SecurityMode securityMode = 
QtCoap::SecurityMode::NoSecurity,
                          QObject *parent = nullptr);
@@ -65,12 +70,21 @@
     void setMaximumRetransmitCount(uint maximumRetransmitCount);
     void setMinimumTokenSize(int tokenSize);
 
+#if QT_CONFIG(networkinterface)
+    void setBindInterface(const QNetworkInterface &iface);
+    QNetworkInterface bindInterface() const;
+#endif
+
 Q_SIGNALS:
     void finished(QCoapReply *reply);
     void responseToMulticastReceived(QCoapReply *reply, const QCoapMessage 
&message,
                                      const QHostAddress &sender);
     void error(QCoapReply *reply, QtCoap::Error error);
 
+#if QT_CONFIG(networkinterface)
+    void bindInterfaceChanged(const QNetworkInterface &iface);
+#endif
+
 protected:
     Q_DECLARE_PRIVATE(QCoapClient)
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtcoap-everywhere-src-6.10.2/src/coap/qcoapclient_p.h 
new/qtcoap-everywhere-src-6.11.0/src/coap/qcoapclient_p.h
--- old/qtcoap-everywhere-src-6.10.2/src/coap/qcoapclient_p.h   2026-01-20 
05:15:48.000000000 +0100
+++ new/qtcoap-everywhere-src-6.11.0/src/coap/qcoapclient_p.h   2026-03-09 
10:39:41.000000000 +0100
@@ -33,6 +33,9 @@
     QCoapProtocol *protocol = nullptr;
     QCoapConnection *connection = nullptr;
     QThread *workerThread = nullptr;
+#if QT_CONFIG(networkinterface)
+    QNetworkInterface interface;
+#endif
 
     QCoapReply *sendRequest(const QCoapRequest &request);
     QCoapResourceDiscoveryReply *sendDiscovery(const QCoapRequest &request);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtcoap-everywhere-src-6.10.2/src/coap/qcoapconnection.cpp 
new/qtcoap-everywhere-src-6.11.0/src/coap/qcoapconnection.cpp
--- old/qtcoap-everywhere-src-6.10.2/src/coap/qcoapconnection.cpp       
2026-01-20 05:15:48.000000000 +0100
+++ new/qtcoap-everywhere-src-6.11.0/src/coap/qcoapconnection.cpp       
2026-03-09 10:39:41.000000000 +0100
@@ -270,4 +270,24 @@
     d->state = ConnectionState::Unconnected;
 }
 
+#if QT_CONFIG(networkinterface)
+/*!
+    \internal
+*/
+void QCoapConnection::setUdpNetworkInterface(const QNetworkInterface &iface)
+{
+    Q_D(QCoapConnection);
+    d->udpNetworkInterface = iface;
+}
+
+/*!
+    \internal
+*/
+QNetworkInterface QCoapConnection::udpNetworkInterface() const
+{
+    Q_D(const QCoapConnection);
+    return d->udpNetworkInterface;
+}
+#endif
+
 QT_END_NAMESPACE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtcoap-everywhere-src-6.10.2/src/coap/qcoapconnection_p.h 
new/qtcoap-everywhere-src-6.11.0/src/coap/qcoapconnection_p.h
--- old/qtcoap-everywhere-src-6.10.2/src/coap/qcoapconnection_p.h       
2026-01-20 05:15:48.000000000 +0100
+++ new/qtcoap-everywhere-src-6.11.0/src/coap/qcoapconnection_p.h       
2026-03-09 10:39:41.000000000 +0100
@@ -11,6 +11,7 @@
 #include <QtCore/qqueue.h>
 #include <QtCore/qobject.h>
 #include <QtNetwork/qabstractsocket.h>
+#include <QtNetwork/qnetworkinterface.h>
 #include <private/qobject_p.h>
 
 //
@@ -48,6 +49,11 @@
     Q_INVOKABLE void setSecurityConfiguration(const QCoapSecurityConfiguration 
&configuration);
     Q_INVOKABLE void disconnect();
 
+#if QT_CONFIG(networkinterface)
+    void setUdpNetworkInterface(const QNetworkInterface &iface);
+    QNetworkInterface udpNetworkInterface() const;
+#endif
+
 Q_SIGNALS:
     void error(QAbstractSocket::SocketError error);
     void readyRead(const QByteArray &data, const QHostAddress &sender);
@@ -92,6 +98,9 @@
     QtCoap::SecurityMode securityMode;
     QCoapConnection::ConnectionState state;
     QQueue<CoapFrame> framesToSend;
+#if QT_CONFIG(networkinterface)
+    QNetworkInterface udpNetworkInterface;
+#endif
 
     Q_DECLARE_PUBLIC(QCoapConnection)
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtcoap-everywhere-src-6.10.2/src/coap/qcoapoption.cpp 
new/qtcoap-everywhere-src-6.11.0/src/coap/qcoapoption.cpp
--- old/qtcoap-everywhere-src-6.10.2/src/coap/qcoapoption.cpp   2026-01-20 
05:15:48.000000000 +0100
+++ new/qtcoap-everywhere-src-6.11.0/src/coap/qcoapoption.cpp   2026-03-09 
10:39:41.000000000 +0100
@@ -158,7 +158,7 @@
  */
 void QCoapOption::swap(QCoapOption &other) noexcept
 {
-    qSwap(d_ptr, other.d_ptr);
+    qt_ptr_swap(d_ptr, other.d_ptr);
 }
 
 /*!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtcoap-everywhere-src-6.10.2/src/coap/qcoapqudpconnection.cpp 
new/qtcoap-everywhere-src-6.11.0/src/coap/qcoapqudpconnection.cpp
--- old/qtcoap-everywhere-src-6.10.2/src/coap/qcoapqudpconnection.cpp   
2026-01-20 05:15:48.000000000 +0100
+++ new/qtcoap-everywhere-src-6.11.0/src/coap/qcoapqudpconnection.cpp   
2026-03-09 10:39:41.000000000 +0100
@@ -8,6 +8,7 @@
 
 #include <QtCore/qloggingcategory.h>
 #include <QtNetwork/qnetworkdatagram.h>
+#include <QtNetwork/private/qabstractsocket_p.h>
 
 #if QT_CONFIG(dtls)
 #include <QtNetwork/QDtls>
@@ -159,7 +160,15 @@
 */
 bool QCoapQUdpConnectionPrivate::bind()
 {
+#if QT_CONFIG(networkinterface)
+    // Using the QAbstractSocketPrivate private API to bind to a specific
+    // network interface.
+    auto priv = static_cast<QAbstractSocketPrivate 
*>(QObjectPrivate::get(socket()));
+    QNetworkInterface *iface = udpNetworkInterface.isValid() ? 
&udpNetworkInterface : nullptr;
+    return priv->bind(QHostAddress::Any, 0, QAbstractSocket::ShareAddress, 
iface);
+#else
     return socket()->bind(QHostAddress::Any, 0, QAbstractSocket::ShareAddress);
+#endif
 }
 
 /*!
@@ -196,7 +205,7 @@
         if (d->dtls->isConnectionEncrypted()) {
             emit bound();
         } else if (socket()->state() == QAbstractSocket::UnconnectedState) {
-            socket()->bind();
+            d->bind();
             d->dtls->setPeer(QHostAddress(host), port);
             if (!d->dtls->doHandshake(d->socket()))
                 qCWarning(lcCoapConnection) << "Handshake error: " << 
d->dtls->dtlsErrorString();
@@ -310,7 +319,8 @@
     while (socket()->hasPendingDatagrams()) {
         if (!q->isSecure()) {
             const auto &datagram = socket()->receiveDatagram();
-            emit q->readyRead(datagram.data(), datagram.senderAddress());
+            if (datagramMatchesNetworkInterface(datagram))
+                emit q->readyRead(datagram.data(), datagram.senderAddress());
 #if QT_CONFIG(dtls)
         } else {
             handleEncryptedDatagram();
@@ -375,6 +385,23 @@
 #endif
 }
 
+/*!
+    \internal
+
+    Checks if the datagram was received on a specified network interface
+*/
+bool QCoapQUdpConnectionPrivate::datagramMatchesNetworkInterface(
+        const QNetworkDatagram &datagram) const
+{
+#if QT_CONFIG(networkinterface)
+    return !udpNetworkInterface.isValid()
+            || uint(udpNetworkInterface.index()) == datagram.interfaceIndex();
+#else
+    Q_UNUSED(datagram);
+    return true;
+#endif
+}
+
 #if QT_CONFIG(dtls)
 /*!
     \internal
@@ -409,11 +436,15 @@
 /*!
     \internal
 
-    Returns a decrypted datagram received from a UDP socket.
+    Returns a decrypted datagram received from a UDP socket or a std::nullopt
+    if the datagram was received on an incorrect network interface.
 */
-QNetworkDatagram QCoapQUdpConnectionPrivate::receiveDatagramDecrypted() const
+std::optional<QNetworkDatagram> 
QCoapQUdpConnectionPrivate::receiveDatagramDecrypted() const
 {
     auto datagram = socket()->receiveDatagram();
+    if (!datagramMatchesNetworkInterface(datagram))
+        return std::nullopt;
+
     const QByteArray plainText = dtls->decryptDatagram(socket(), 
datagram.data());
     datagram.setData(plainText);
     return datagram;
@@ -433,10 +464,15 @@
     Q_ASSERT(dtls);
 
     if (dtls->isConnectionEncrypted()) {
-        const auto &datagram = receiveDatagramDecrypted();
-        emit q->readyRead(datagram.data(), datagram.senderAddress());
+        const auto datagram = receiveDatagramDecrypted();
+        if (datagram)
+            emit q->readyRead(datagram->data(), datagram->senderAddress());
     } else {
-        if (!dtls->doHandshake(socket(), socket()->receiveDatagram().data())) {
+        const auto datagram = socket()->receiveDatagram();
+        if (!datagramMatchesNetworkInterface(datagram))
+            return;
+
+        if (!dtls->doHandshake(socket(), datagram.data())) {
             qCWarning(lcCoapConnection) << "Handshake error: " << 
dtls->dtlsErrorString();
             return;
         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtcoap-everywhere-src-6.10.2/src/coap/qcoapqudpconnection_p.h 
new/qtcoap-everywhere-src-6.11.0/src/coap/qcoapqudpconnection_p.h
--- old/qtcoap-everywhere-src-6.10.2/src/coap/qcoapqudpconnection_p.h   
2026-01-20 05:15:48.000000000 +0100
+++ new/qtcoap-everywhere-src-6.11.0/src/coap/qcoapqudpconnection_p.h   
2026-03-09 10:39:41.000000000 +0100
@@ -14,6 +14,8 @@
 #include <QtCore/qpointer.h>
 #include <QtCore/qqueue.h>
 
+#include <optional>
+
 //
 //  W A R N I N G
 //  -------------
@@ -78,8 +80,10 @@
 
     void setSecurityConfiguration(const QCoapSecurityConfiguration 
&configuration);
 
+    bool datagramMatchesNetworkInterface(const QNetworkDatagram &datagram) 
const;
+
 #if QT_CONFIG(dtls)
-    QNetworkDatagram receiveDatagramDecrypted() const;
+    std::optional<QNetworkDatagram> receiveDatagramDecrypted() const;
     void handleEncryptedDatagram();
 
     QPointer<QDtls> dtls;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtcoap-everywhere-src-6.10.2/src/coap/qcoaprequest.cpp 
new/qtcoap-everywhere-src-6.11.0/src/coap/qcoaprequest.cpp
--- old/qtcoap-everywhere-src-6.10.2/src/coap/qcoaprequest.cpp  2026-01-20 
05:15:48.000000000 +0100
+++ new/qtcoap-everywhere-src-6.11.0/src/coap/qcoaprequest.cpp  2026-03-09 
10:39:41.000000000 +0100
@@ -10,6 +10,8 @@
 #include <QtCore/qloggingcategory.h>
 #include <QtCore/QDebug>
 
+using namespace Qt::StringLiterals;
+
 QT_BEGIN_NAMESPACE
 
 namespace {
@@ -259,7 +261,7 @@
     if (url.host().isEmpty() && url.isRelative()) {
         // In some cases host address is mistaken for part of the relative 
path,
         // prepending the scheme fixes this.
-        finalizedUrl = url.toString().prepend(scheme + QLatin1String("://"));
+        finalizedUrl = QUrl{scheme + "://"_L1 + url.toString()};
     } else if (url.scheme().isEmpty()) {
         finalizedUrl.setScheme(scheme);
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtcoap-everywhere-src-6.10.2/tests/auto/qcoapclient/tst_qcoapclient.cpp 
new/qtcoap-everywhere-src-6.11.0/tests/auto/qcoapclient/tst_qcoapclient.cpp
--- old/qtcoap-everywhere-src-6.10.2/tests/auto/qcoapclient/tst_qcoapclient.cpp 
2026-01-20 05:15:48.000000000 +0100
+++ new/qtcoap-everywhere-src-6.11.0/tests/auto/qcoapclient/tst_qcoapclient.cpp 
2026-03-09 10:39:41.000000000 +0100
@@ -217,9 +217,9 @@
 void tst_QCoapClient::initTestCase()
 {
 #if defined(COAP_TEST_SERVER_IP) || defined(QT_TEST_SERVER)
-    QVERIFY2(waitForHost(testServerHost()), "Failed to connect to Californium 
plugtest server.");
+    QVERIFY2(waitForHost(QUrl{testServerHost()}), "Failed to connect to 
Californium plugtest server.");
 #if QT_CONFIG(dtls)
-    QVERIFY2(waitForHost(timeServerUrl(), QtCoap::SecurityMode::Certificate),
+    QVERIFY2(waitForHost(QUrl{timeServerUrl()}, 
QtCoap::SecurityMode::Certificate),
              "Failed to connect to FreeCoAP sample time server.");
 #endif
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtcoap-everywhere-src-6.10.2/tests/auto/qcoapinternalrequest/tst_qcoapinternalrequest.cpp
 
new/qtcoap-everywhere-src-6.11.0/tests/auto/qcoapinternalrequest/tst_qcoapinternalrequest.cpp
--- 
old/qtcoap-everywhere-src-6.10.2/tests/auto/qcoapinternalrequest/tst_qcoapinternalrequest.cpp
       2026-01-20 05:15:48.000000000 +0100
+++ 
new/qtcoap-everywhere-src-6.11.0/tests/auto/qcoapinternalrequest/tst_qcoapinternalrequest.cpp
       2026-03-09 10:39:41.000000000 +0100
@@ -235,7 +235,7 @@
     QFETCH(QString, url);
     QFETCH(QList<QCoapOption>, options);
 
-    const QCoapRequest request(url);
+    const QCoapRequest request(QUrl{url});
     const QCoapInternalRequest internalRequest(request);
 
     auto requestOptions = internalRequest.message()->options();
@@ -264,7 +264,7 @@
 void tst_QCoapInternalRequest::invalidUrls()
 {
     QFETCH(QString, url);
-    const QCoapRequest request(url);
+    const QCoapRequest request(QUrl{url});
     const QCoapInternalRequest internalRequest(request);
 
     QVERIFY(!internalRequest.isValid());
@@ -288,7 +288,7 @@
     QFETCH(QString, url);
     QFETCH(bool, result);
 
-    const QCoapRequest request(url);
+    const QCoapRequest request(QUrl{url});
     const QCoapInternalRequest internalRequest(request);
     QCOMPARE(internalRequest.isMulticast(), result);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtcoap-everywhere-src-6.10.2/tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp
 
new/qtcoap-everywhere-src-6.11.0/tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp
--- 
old/qtcoap-everywhere-src-6.10.2/tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp
 2026-01-20 05:15:48.000000000 +0100
+++ 
new/qtcoap-everywhere-src-6.11.0/tests/auto/qcoapqudpconnection/tst_qcoapqudpconnection.cpp
 2026-03-09 10:39:41.000000000 +0100
@@ -50,7 +50,7 @@
 void tst_QCoapQUdpConnection::initTestCase()
 {
 #if defined(COAP_TEST_SERVER_IP) || defined(QT_TEST_SERVER)
-    QVERIFY2(waitForHost(testServerHost()), "Failed to connect to Californium 
plugtest server.");
+    QVERIFY2(waitForHost(QUrl{testServerHost()}), "Failed to connect to 
Californium plugtest server.");
 #endif
 }
 
@@ -164,7 +164,7 @@
     QSignalSpy spyConnectionReadyRead(&connection, 
&QCoapQUdpConnection::readyRead);
 
     QCoapRequest request =
-            QCoapRequestPrivate::createRequest(QCoapRequest(protocol + host + 
path), method);
+            QCoapRequestPrivate::createRequest(QCoapRequest(QUrl{protocol + 
host + path}), method);
     request.setMessageId(24806);
     request.setToken(QByteArray("abcd"));
     QVERIFY(connection.socket() != nullptr);

Reply via email to