diff options
| -rw-r--r-- | meta/recipes-connectivity/kea/files/0001-Avoid-assert-on-empty-packet.patch | 148 | ||||
| -rw-r--r-- | meta/recipes-connectivity/kea/files/0001-Replace-Name-NameString-with-vector-of-uint8_t.patch | 90 | ||||
| -rw-r--r-- | meta/recipes-connectivity/kea/files/0001-Update-asiolink-for-boost-1.87.patch | 190 | ||||
| -rw-r--r-- | meta/recipes-connectivity/kea/files/0002-Fix-unittests-Typo-in-Name-Name-append-to-ndata_-not.patch | 36 | ||||
| -rw-r--r-- | meta/recipes-connectivity/kea/kea_2.6.3.bb (renamed from meta/recipes-connectivity/kea/kea_2.6.1.bb) | 8 |
5 files changed, 2 insertions, 470 deletions
diff --git a/meta/recipes-connectivity/kea/files/0001-Avoid-assert-on-empty-packet.patch b/meta/recipes-connectivity/kea/files/0001-Avoid-assert-on-empty-packet.patch deleted file mode 100644 index 14f3424570..0000000000 --- a/meta/recipes-connectivity/kea/files/0001-Avoid-assert-on-empty-packet.patch +++ /dev/null | |||
| @@ -1,148 +0,0 @@ | |||
| 1 | From 9cf3b6e8d705957927c2fbc9928318f4eda265c8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Thomas Markwalder <tmark@isc.org> | ||
| 3 | Date: Tue, 11 Feb 2025 18:52:41 +0000 | ||
| 4 | Subject: [PATCH 1/2] Avoid assert on empty packet | ||
| 5 | |||
| 6 | /src/lib/dhcp/pkt_filter_lpf.cc | ||
| 7 | PktFilterLPF::receive() - throw if packet has no data | ||
| 8 | |||
| 9 | /src/lib/util/buffer.h | ||
| 10 | InputBuffer::readVecotr() - avoid peek if read request length is 0 | ||
| 11 | |||
| 12 | /src/lib/util/tests/buffer_unittest.cc | ||
| 13 | Updated test | ||
| 14 | |||
| 15 | Upstream-Status: Backport | ||
| 16 | [https://gitlab.isc.org/isc-projects/kea/-/commit/0b98eae16d9b6ecdf57005624712b9b26fa05bc0] | ||
| 17 | [https://gitlab.isc.org/isc-projects/kea/-/commit/16306026e37b32a2ce4b16fb5b78561ae153d570] | ||
| 18 | |||
| 19 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
| 20 | --- | ||
| 21 | src/lib/dhcp/pkt_filter_lpf.cc | 10 +++++++--- | ||
| 22 | src/lib/util/buffer.h | 9 ++++++--- | ||
| 23 | src/lib/util/tests/buffer_unittest.cc | 8 +++++++- | ||
| 24 | 3 files changed, 20 insertions(+), 7 deletions(-) | ||
| 25 | |||
| 26 | diff --git a/src/lib/dhcp/pkt_filter_lpf.cc b/src/lib/dhcp/pkt_filter_lpf.cc | ||
| 27 | index 69bdecc0e1..b0c8f108d3 100644 | ||
| 28 | --- a/src/lib/dhcp/pkt_filter_lpf.cc | ||
| 29 | +++ b/src/lib/dhcp/pkt_filter_lpf.cc | ||
| 30 | @@ -318,9 +318,14 @@ PktFilterLPF::receive(Iface& iface, const SocketInfo& socket_info) { | ||
| 31 | decodeEthernetHeader(buf, dummy_pkt); | ||
| 32 | decodeIpUdpHeader(buf, dummy_pkt); | ||
| 33 | |||
| 34 | + auto v4_len = buf.getLength() - buf.getPosition(); | ||
| 35 | + if (v4_len <= 0) { | ||
| 36 | + isc_throw(SocketReadError, "Pkt4FilterLpf:: packet has no DHCPv4 data"); | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | // Read the DHCP data. | ||
| 40 | std::vector<uint8_t> dhcp_buf; | ||
| 41 | - buf.readVector(dhcp_buf, buf.getLength() - buf.getPosition()); | ||
| 42 | + buf.readVector(dhcp_buf, v4_len); | ||
| 43 | |||
| 44 | // Decode DHCP data into the Pkt4 object. | ||
| 45 | Pkt4Ptr pkt = Pkt4Ptr(new Pkt4(&dhcp_buf[0], dhcp_buf.size())); | ||
| 46 | @@ -344,8 +349,7 @@ PktFilterLPF::receive(Iface& iface, const SocketInfo& socket_info) { | ||
| 47 | |||
| 48 | struct timeval cmsg_time; | ||
| 49 | memcpy(&cmsg_time, CMSG_DATA(cmsg), sizeof(cmsg_time)); | ||
| 50 | - pkt->addPktEvent(PktEvent::SOCKET_RECEIVED, cmsg_time); | ||
| 51 | - break; | ||
| 52 | + pkt->addPktEvent(PktEvent::SOCKET_RECEIVED, cmsg_time); break; | ||
| 53 | } | ||
| 54 | |||
| 55 | cmsg = CMSG_NXTHDR(&m, cmsg); | ||
| 56 | diff --git a/src/lib/util/buffer.h b/src/lib/util/buffer.h | ||
| 57 | index 41ecdf3375..c426a14495 100644 | ||
| 58 | --- a/src/lib/util/buffer.h | ||
| 59 | +++ b/src/lib/util/buffer.h | ||
| 60 | @@ -1,4 +1,4 @@ | ||
| 61 | -// Copyright (C) 2009-2024 Internet Systems Consortium, Inc. ("ISC") | ||
| 62 | +// Copyright (C) 2009-2025 Internet Systems Consortium, Inc. ("ISC") | ||
| 63 | // | ||
| 64 | // This Source Code Form is subject to the terms of the Mozilla Public | ||
| 65 | // License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| 66 | @@ -233,7 +233,8 @@ public: | ||
| 67 | /// @details If specified buffer is too short, it will be expanded using | ||
| 68 | /// vector::resize() method. If the remaining length of the buffer | ||
| 69 | /// is smaller than the specified length, an exception of class | ||
| 70 | - /// @c isc::OutOfRange will be thrown. | ||
| 71 | + /// @c isc::OutOfRange will be thrown. Read length zero results | ||
| 72 | + /// in an empty vector. | ||
| 73 | /// | ||
| 74 | /// @param data Reference to a buffer (data will be stored there). | ||
| 75 | /// @param len Size specified number of bytes to read in a vector. | ||
| 76 | @@ -244,7 +245,9 @@ public: | ||
| 77 | } | ||
| 78 | |||
| 79 | data.resize(len); | ||
| 80 | - peekData(&data[0], len); | ||
| 81 | + if (len) { | ||
| 82 | + peekData(&data[0], len); | ||
| 83 | + } | ||
| 84 | } | ||
| 85 | |||
| 86 | /// @brief Read specified number of bytes as a vector. | ||
| 87 | diff --git a/src/lib/util/tests/buffer_unittest.cc b/src/lib/util/tests/buffer_unittest.cc | ||
| 88 | index 66c43e8f21..bae051dd16 100644 | ||
| 89 | --- a/src/lib/util/tests/buffer_unittest.cc | ||
| 90 | +++ b/src/lib/util/tests/buffer_unittest.cc | ||
| 91 | @@ -1,4 +1,4 @@ | ||
| 92 | -// Copyright (C) 2009-2024 Internet Systems Consortium, Inc. ("ISC") | ||
| 93 | +// Copyright (C) 2009-2025 Internet Systems Consortium, Inc. ("ISC") | ||
| 94 | // | ||
| 95 | // This Source Code Form is subject to the terms of the Mozilla Public | ||
| 96 | // License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| 97 | @@ -197,6 +197,12 @@ TEST_F(BufferTest, inputBufferRead) { | ||
| 98 | ASSERT_EQ(sizeof(vdata), datav.size()); | ||
| 99 | ASSERT_EQ(0, memcmp(&vdata[0], testdata, sizeof(testdata))); | ||
| 100 | ASSERT_EQ(sizeof(vdata), ibuffer.getPosition()); | ||
| 101 | + | ||
| 102 | + // Verify that read len of zero results in an empty | ||
| 103 | + // vector without throwing. | ||
| 104 | + datav.resize(8); | ||
| 105 | + ASSERT_NO_THROW(ibuffer.readVector(datav, 0)); | ||
| 106 | + ASSERT_EQ(datav.size(), 0); | ||
| 107 | } | ||
| 108 | |||
| 109 | TEST_F(BufferTest, outputBufferReadAt) { | ||
| 110 | -- | ||
| 111 | 2.25.1 | ||
| 112 | |||
| 113 | From 614a6c136fc20ee428b1c880889ef61253657499 Mon Sep 17 00:00:00 2001 | ||
| 114 | From: Thomas Markwalder <tmark@isc.org> | ||
| 115 | Date: Tue, 18 Feb 2025 15:03:12 +0000 | ||
| 116 | Subject: [PATCH 2/2] Addressed review comments | ||
| 117 | |||
| 118 | Couple of typos fixed. | ||
| 119 | --- | ||
| 120 | src/lib/dhcp/pkt_filter_lpf.cc | 5 +++-- | ||
| 121 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
| 122 | |||
| 123 | diff --git a/src/lib/dhcp/pkt_filter_lpf.cc b/src/lib/dhcp/pkt_filter_lpf.cc | ||
| 124 | index b0c8f108d3..3642915cc1 100644 | ||
| 125 | --- a/src/lib/dhcp/pkt_filter_lpf.cc | ||
| 126 | +++ b/src/lib/dhcp/pkt_filter_lpf.cc | ||
| 127 | @@ -320,7 +320,7 @@ PktFilterLPF::receive(Iface& iface, const SocketInfo& socket_info) { | ||
| 128 | |||
| 129 | auto v4_len = buf.getLength() - buf.getPosition(); | ||
| 130 | if (v4_len <= 0) { | ||
| 131 | - isc_throw(SocketReadError, "Pkt4FilterLpf:: packet has no DHCPv4 data"); | ||
| 132 | + isc_throw(SocketReadError, "Pkt4FilterLpf packet has no DHCPv4 data"); | ||
| 133 | } | ||
| 134 | |||
| 135 | // Read the DHCP data. | ||
| 136 | @@ -349,7 +349,8 @@ PktFilterLPF::receive(Iface& iface, const SocketInfo& socket_info) { | ||
| 137 | |||
| 138 | struct timeval cmsg_time; | ||
| 139 | memcpy(&cmsg_time, CMSG_DATA(cmsg), sizeof(cmsg_time)); | ||
| 140 | - pkt->addPktEvent(PktEvent::SOCKET_RECEIVED, cmsg_time); break; | ||
| 141 | + pkt->addPktEvent(PktEvent::SOCKET_RECEIVED, cmsg_time); | ||
| 142 | + break; | ||
| 143 | } | ||
| 144 | |||
| 145 | cmsg = CMSG_NXTHDR(&m, cmsg); | ||
| 146 | -- | ||
| 147 | 2.25.1 | ||
| 148 | |||
diff --git a/meta/recipes-connectivity/kea/files/0001-Replace-Name-NameString-with-vector-of-uint8_t.patch b/meta/recipes-connectivity/kea/files/0001-Replace-Name-NameString-with-vector-of-uint8_t.patch deleted file mode 100644 index a7deeca243..0000000000 --- a/meta/recipes-connectivity/kea/files/0001-Replace-Name-NameString-with-vector-of-uint8_t.patch +++ /dev/null | |||
| @@ -1,90 +0,0 @@ | |||
| 1 | From 6b9fb56e3573aa65923df9a08201dd5321a1b1f1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Dimitry Andric <dimitry@andric.com> | ||
| 3 | Date: Sat, 3 Aug 2024 14:37:52 +0200 | ||
| 4 | Subject: [PATCH 1/2] Replace Name::NameString with vector of uint8_t | ||
| 5 | |||
| 6 | As noted in the libc++ 19 release notes, it now only provides | ||
| 7 | std::char_traits<> for types char, char8_t, char16_t, char32_t and | ||
| 8 | wchar_t, and any instantiation for other types will fail. | ||
| 9 | |||
| 10 | Name::NameString is defined as a std::basic_string<uint8_t>, so that | ||
| 11 | will no longer work. Redefine it as a std::vector<uint8_t> instead. | ||
| 12 | |||
| 13 | Upstream-Status: Submitted [https://gitlab.isc.org/isc-projects/kea/-/merge_requests/2410] | ||
| 14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 15 | --- | ||
| 16 | src/lib/dns/name.cc | 12 ++++++------ | ||
| 17 | src/lib/dns/name.h | 2 +- | ||
| 18 | 2 files changed, 7 insertions(+), 7 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/src/lib/dns/name.cc b/src/lib/dns/name.cc | ||
| 21 | index ac48205..085229b 100644 | ||
| 22 | --- a/src/lib/dns/name.cc | ||
| 23 | +++ b/src/lib/dns/name.cc | ||
| 24 | @@ -303,7 +303,7 @@ Name::Name(const std::string &namestring, bool downcase) { | ||
| 25 | // And get the output | ||
| 26 | labelcount_ = offsets.size(); | ||
| 27 | isc_throw_assert(labelcount_ > 0 && labelcount_ <= Name::MAX_LABELS); | ||
| 28 | - ndata_.assign(ndata.data(), ndata.size()); | ||
| 29 | + ndata_.assign(ndata.data(), ndata.data() + ndata.size()); | ||
| 30 | length_ = ndata_.size(); | ||
| 31 | offsets_.assign(offsets.begin(), offsets.end()); | ||
| 32 | } | ||
| 33 | @@ -336,7 +336,7 @@ Name::Name(const char* namedata, size_t data_len, const Name* origin, | ||
| 34 | // Get the output | ||
| 35 | labelcount_ = offsets.size(); | ||
| 36 | isc_throw_assert(labelcount_ > 0 && labelcount_ <= Name::MAX_LABELS); | ||
| 37 | - ndata_.assign(ndata.data(), ndata.size()); | ||
| 38 | + ndata_.assign(ndata.data(), ndata.data() + ndata.size()); | ||
| 39 | length_ = ndata_.size(); | ||
| 40 | offsets_.assign(offsets.begin(), offsets.end()); | ||
| 41 | |||
| 42 | @@ -347,7 +347,7 @@ Name::Name(const char* namedata, size_t data_len, const Name* origin, | ||
| 43 | // Drop the last character of the data (the \0) and append a copy of | ||
| 44 | // the origin's data | ||
| 45 | ndata_.erase(ndata_.end() - 1); | ||
| 46 | - ndata_.append(origin->ndata_); | ||
| 47 | + ndata_.insert(ndata.end(), origin->ndata_.begin(), origin->ndata_.end()); | ||
| 48 | |||
| 49 | // Do a similar thing with offsets. However, we need to move them | ||
| 50 | // so they point after the prefix we parsed before. | ||
| 51 | @@ -582,7 +582,7 @@ Name::concatenate(const Name& suffix) const { | ||
| 52 | |||
| 53 | Name retname; | ||
| 54 | retname.ndata_.reserve(length); | ||
| 55 | - retname.ndata_.assign(ndata_, 0, length_ - 1); | ||
| 56 | + retname.ndata_.assign(ndata_.data(), ndata_.data() + length_ - 1); | ||
| 57 | retname.ndata_.insert(retname.ndata_.end(), | ||
| 58 | suffix.ndata_.begin(), suffix.ndata_.end()); | ||
| 59 | isc_throw_assert(retname.ndata_.size() == length); | ||
| 60 | @@ -622,7 +622,7 @@ Name::reverse() const { | ||
| 61 | NameString::const_iterator n0 = ndata_.begin(); | ||
| 62 | retname.offsets_.push_back(0); | ||
| 63 | while (rit1 != offsets_.rend()) { | ||
| 64 | - retname.ndata_.append(n0 + *rit1, n0 + *rit0); | ||
| 65 | + retname.ndata_.insert(retname.ndata_.end(), n0 + *rit1, n0 + *rit0); | ||
| 66 | retname.offsets_.push_back(retname.ndata_.size()); | ||
| 67 | ++rit0; | ||
| 68 | ++rit1; | ||
| 69 | @@ -662,7 +662,7 @@ Name::split(const unsigned int first, const unsigned int n) const { | ||
| 70 | // original name, and append the trailing dot explicitly. | ||
| 71 | // | ||
| 72 | retname.ndata_.reserve(retname.offsets_.back() + 1); | ||
| 73 | - retname.ndata_.assign(ndata_, offsets_[first], retname.offsets_.back()); | ||
| 74 | + retname.ndata_.assign(ndata_.data() + offsets_[first], ndata_.data() + retname.offsets_.back()); | ||
| 75 | retname.ndata_.push_back(0); | ||
| 76 | |||
| 77 | retname.length_ = retname.ndata_.size(); | ||
| 78 | diff --git a/src/lib/dns/name.h b/src/lib/dns/name.h | ||
| 79 | index 37723e8..fac0036 100644 | ||
| 80 | --- a/src/lib/dns/name.h | ||
| 81 | +++ b/src/lib/dns/name.h | ||
| 82 | @@ -228,7 +228,7 @@ class Name { | ||
| 83 | //@{ | ||
| 84 | private: | ||
| 85 | /// \brief Name data string | ||
| 86 | - typedef std::basic_string<uint8_t> NameString; | ||
| 87 | + typedef std::vector<uint8_t> NameString; | ||
| 88 | /// \brief Name offsets type | ||
| 89 | typedef std::vector<uint8_t> NameOffsets; | ||
| 90 | |||
diff --git a/meta/recipes-connectivity/kea/files/0001-Update-asiolink-for-boost-1.87.patch b/meta/recipes-connectivity/kea/files/0001-Update-asiolink-for-boost-1.87.patch deleted file mode 100644 index 794726f1f1..0000000000 --- a/meta/recipes-connectivity/kea/files/0001-Update-asiolink-for-boost-1.87.patch +++ /dev/null | |||
| @@ -1,190 +0,0 @@ | |||
| 1 | From dab0f3daafb760ace0d4091f74ff90edb225ca02 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: q66 <q66@chimera-linux.org> | ||
| 3 | Date: Sun, 15 Dec 2024 03:04:53 +0100 | ||
| 4 | Subject: [PATCH] Update asiolink for boost 1.87 | ||
| 5 | |||
| 6 | Upstream-Status: Submitted [https://gitlab.isc.org/isc-projects/kea/-/merge_requests/2523] | ||
| 7 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
| 8 | --- | ||
| 9 | src/lib/asiolink/io_address.cc | 4 ++-- | ||
| 10 | src/lib/asiolink/io_service.cc | 8 ++++---- | ||
| 11 | src/lib/asiolink/tcp_endpoint.h | 2 +- | ||
| 12 | src/lib/asiolink/udp_endpoint.h | 2 +- | ||
| 13 | src/lib/asiolink/unix_domain_socket.cc | 16 ++++++++-------- | ||
| 14 | src/lib/dhcp/iface_mgr.cc | 2 +- | ||
| 15 | 6 files changed, 17 insertions(+), 17 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/src/lib/asiolink/io_address.cc b/src/lib/asiolink/io_address.cc | ||
| 18 | index 43459bf..06b7d3d 100644 | ||
| 19 | --- a/src/lib/asiolink/io_address.cc | ||
| 20 | +++ b/src/lib/asiolink/io_address.cc | ||
| 21 | @@ -37,7 +37,7 @@ IOAddress::Hash::operator()(const IOAddress &io_address) const { | ||
| 22 | // because we'd like to throw our own exception on failure. | ||
| 23 | IOAddress::IOAddress(const std::string& address_str) { | ||
| 24 | boost::system::error_code err; | ||
| 25 | - asio_address_ = ip::address::from_string(address_str, err); | ||
| 26 | + asio_address_ = ip::make_address(address_str, err); | ||
| 27 | if (err) { | ||
| 28 | isc_throw(IOError, "Failed to convert string to address '" | ||
| 29 | << address_str << "': " << err.message()); | ||
| 30 | @@ -116,7 +116,7 @@ IOAddress::isV6Multicast() const { | ||
| 31 | uint32_t | ||
| 32 | IOAddress::toUint32() const { | ||
| 33 | if (asio_address_.is_v4()) { | ||
| 34 | - return (asio_address_.to_v4().to_ulong()); | ||
| 35 | + return (asio_address_.to_v4().to_uint()); | ||
| 36 | } else { | ||
| 37 | isc_throw(BadValue, "Can't convert " << toText() | ||
| 38 | << " address to IPv4."); | ||
| 39 | diff --git a/src/lib/asiolink/io_service.cc b/src/lib/asiolink/io_service.cc | ||
| 40 | index 411de64..cc28d24 100644 | ||
| 41 | --- a/src/lib/asiolink/io_service.cc | ||
| 42 | +++ b/src/lib/asiolink/io_service.cc | ||
| 43 | @@ -30,7 +30,7 @@ public: | ||
| 44 | /// @brief The constructor. | ||
| 45 | IOServiceImpl() : | ||
| 46 | io_service_(), | ||
| 47 | - work_(new boost::asio::io_service::work(io_service_)) { | ||
| 48 | + work_(boost::asio::make_work_guard(io_service_)) { | ||
| 49 | }; | ||
| 50 | |||
| 51 | /// @brief The destructor. | ||
| 52 | @@ -92,7 +92,7 @@ public: | ||
| 53 | |||
| 54 | /// @brief Restarts the IOService in preparation for a subsequent @ref run() invocation. | ||
| 55 | void restart() { | ||
| 56 | - io_service_.reset(); | ||
| 57 | + io_service_.restart(); | ||
| 58 | } | ||
| 59 | |||
| 60 | /// @brief Removes IO service work object to let it finish running | ||
| 61 | @@ -115,12 +115,12 @@ public: | ||
| 62 | /// | ||
| 63 | /// @param callback The callback to be run on the IO service. | ||
| 64 | void post(const std::function<void ()>& callback) { | ||
| 65 | - io_service_.post(callback); | ||
| 66 | + boost::asio::post(io_service_, callback); | ||
| 67 | } | ||
| 68 | |||
| 69 | private: | ||
| 70 | boost::asio::io_service io_service_; | ||
| 71 | - boost::shared_ptr<boost::asio::io_service::work> work_; | ||
| 72 | + boost::asio::executor_work_guard<boost::asio::io_service::executor_type> work_; | ||
| 73 | }; | ||
| 74 | |||
| 75 | IOService::IOService() : io_impl_(new IOServiceImpl()) { | ||
| 76 | diff --git a/src/lib/asiolink/tcp_endpoint.h b/src/lib/asiolink/tcp_endpoint.h | ||
| 77 | index 8ebd575..7c8cb35 100644 | ||
| 78 | --- a/src/lib/asiolink/tcp_endpoint.h | ||
| 79 | +++ b/src/lib/asiolink/tcp_endpoint.h | ||
| 80 | @@ -42,7 +42,7 @@ public: | ||
| 81 | /// \param port The TCP port number of the endpoint. | ||
| 82 | TCPEndpoint(const IOAddress& address, const unsigned short port) : | ||
| 83 | asio_endpoint_placeholder_( | ||
| 84 | - new boost::asio::ip::tcp::endpoint(boost::asio::ip::address::from_string(address.toText()), | ||
| 85 | + new boost::asio::ip::tcp::endpoint(boost::asio::ip::make_address(address.toText()), | ||
| 86 | port)), | ||
| 87 | asio_endpoint_(*asio_endpoint_placeholder_) | ||
| 88 | {} | ||
| 89 | diff --git a/src/lib/asiolink/udp_endpoint.h b/src/lib/asiolink/udp_endpoint.h | ||
| 90 | index f960bf3..2a3da9f 100644 | ||
| 91 | --- a/src/lib/asiolink/udp_endpoint.h | ||
| 92 | +++ b/src/lib/asiolink/udp_endpoint.h | ||
| 93 | @@ -42,7 +42,7 @@ public: | ||
| 94 | /// \param port The UDP port number of the endpoint. | ||
| 95 | UDPEndpoint(const IOAddress& address, const unsigned short port) : | ||
| 96 | asio_endpoint_placeholder_( | ||
| 97 | - new boost::asio::ip::udp::endpoint(boost::asio::ip::address::from_string(address.toText()), | ||
| 98 | + new boost::asio::ip::udp::endpoint(boost::asio::ip::make_address(address.toText()), | ||
| 99 | port)), | ||
| 100 | asio_endpoint_(*asio_endpoint_placeholder_) | ||
| 101 | {} | ||
| 102 | diff --git a/src/lib/asiolink/unix_domain_socket.cc b/src/lib/asiolink/unix_domain_socket.cc | ||
| 103 | index f43e1c9..43ff3c8 100644 | ||
| 104 | --- a/src/lib/asiolink/unix_domain_socket.cc | ||
| 105 | +++ b/src/lib/asiolink/unix_domain_socket.cc | ||
| 106 | @@ -83,7 +83,7 @@ public: | ||
| 107 | /// @param buffer Buffers holding the data to be sent. | ||
| 108 | /// @param handler User supplied callback to be invoked when data have | ||
| 109 | /// been sent or sending error is signalled. | ||
| 110 | - void doSend(const boost::asio::const_buffers_1& buffer, | ||
| 111 | + void doSend(const boost::asio::const_buffer& buffer, | ||
| 112 | const UnixDomainSocket::Handler& handler); | ||
| 113 | |||
| 114 | |||
| 115 | @@ -103,7 +103,7 @@ public: | ||
| 116 | /// @param ec Error code returned as a result of sending the data. | ||
| 117 | /// @param length Length of the data sent. | ||
| 118 | void sendHandler(const UnixDomainSocket::Handler& remote_handler, | ||
| 119 | - const boost::asio::const_buffers_1& buffer, | ||
| 120 | + const boost::asio::const_buffer& buffer, | ||
| 121 | const boost::system::error_code& ec, | ||
| 122 | size_t length); | ||
| 123 | |||
| 124 | @@ -127,7 +127,7 @@ public: | ||
| 125 | /// @param buffer A buffer into which the data should be received. | ||
| 126 | /// @param handler User supplied callback invoked when data have been | ||
| 127 | /// received on an error is signalled. | ||
| 128 | - void doReceive(const boost::asio::mutable_buffers_1& buffer, | ||
| 129 | + void doReceive(const boost::asio::mutable_buffer& buffer, | ||
| 130 | const UnixDomainSocket::Handler& handler); | ||
| 131 | |||
| 132 | /// @brief Local handler invoked as a result of asynchronous receive. | ||
| 133 | @@ -146,7 +146,7 @@ public: | ||
| 134 | /// @param ec Error code returned as a result of asynchronous receive. | ||
| 135 | /// @param length Size of the received data. | ||
| 136 | void receiveHandler(const UnixDomainSocket::Handler& remote_handler, | ||
| 137 | - const boost::asio::mutable_buffers_1& buffer, | ||
| 138 | + const boost::asio::mutable_buffer& buffer, | ||
| 139 | const boost::system::error_code& ec, | ||
| 140 | size_t length); | ||
| 141 | |||
| 142 | @@ -197,7 +197,7 @@ UnixDomainSocketImpl::asyncSend(const void* data, const size_t length, | ||
| 143 | } | ||
| 144 | |||
| 145 | void | ||
| 146 | -UnixDomainSocketImpl::doSend(const boost::asio::const_buffers_1& buffer, | ||
| 147 | +UnixDomainSocketImpl::doSend(const boost::asio::const_buffer& buffer, | ||
| 148 | const UnixDomainSocket::Handler& handler) { | ||
| 149 | auto local_handler = std::bind(&UnixDomainSocketImpl::sendHandler, | ||
| 150 | shared_from_this(), | ||
| 151 | @@ -207,7 +207,7 @@ UnixDomainSocketImpl::doSend(const boost::asio::const_buffers_1& buffer, | ||
| 152 | |||
| 153 | void | ||
| 154 | UnixDomainSocketImpl::sendHandler(const UnixDomainSocket::Handler& remote_handler, | ||
| 155 | - const boost::asio::const_buffers_1& buffer, | ||
| 156 | + const boost::asio::const_buffer& buffer, | ||
| 157 | const boost::system::error_code& ec, | ||
| 158 | size_t length) { | ||
| 159 | // The asynchronous send may return EWOULDBLOCK or EAGAIN on some | ||
| 160 | @@ -230,7 +230,7 @@ UnixDomainSocketImpl::asyncReceive(void* data, const size_t length, | ||
| 161 | } | ||
| 162 | |||
| 163 | void | ||
| 164 | -UnixDomainSocketImpl::doReceive(const boost::asio::mutable_buffers_1& buffer, | ||
| 165 | +UnixDomainSocketImpl::doReceive(const boost::asio::mutable_buffer& buffer, | ||
| 166 | const UnixDomainSocket::Handler& handler) { | ||
| 167 | auto local_handler = std::bind(&UnixDomainSocketImpl::receiveHandler, | ||
| 168 | shared_from_this(), | ||
| 169 | @@ -240,7 +240,7 @@ UnixDomainSocketImpl::doReceive(const boost::asio::mutable_buffers_1& buffer, | ||
| 170 | |||
| 171 | void | ||
| 172 | UnixDomainSocketImpl::receiveHandler(const UnixDomainSocket::Handler& remote_handler, | ||
| 173 | - const boost::asio::mutable_buffers_1& buffer, | ||
| 174 | + const boost::asio::mutable_buffer& buffer, | ||
| 175 | const boost::system::error_code& ec, | ||
| 176 | size_t length) { | ||
| 177 | // The asynchronous receive may return EWOULDBLOCK or EAGAIN on some | ||
| 178 | diff --git a/src/lib/dhcp/iface_mgr.cc b/src/lib/dhcp/iface_mgr.cc | ||
| 179 | index 01a1d63..419268b 100644 | ||
| 180 | --- a/src/lib/dhcp/iface_mgr.cc | ||
| 181 | +++ b/src/lib/dhcp/iface_mgr.cc | ||
| 182 | @@ -1034,7 +1034,7 @@ IfaceMgr::getLocalAddress(const IOAddress& remote_addr, const uint16_t port) { | ||
| 183 | } | ||
| 184 | |||
| 185 | // Create socket that will be used to connect to remote endpoint. | ||
| 186 | - boost::asio::io_service io_service; | ||
| 187 | + boost::asio::io_context io_service; | ||
| 188 | boost::asio::ip::udp::socket sock(io_service); | ||
| 189 | |||
| 190 | boost::system::error_code err_code; | ||
diff --git a/meta/recipes-connectivity/kea/files/0002-Fix-unittests-Typo-in-Name-Name-append-to-ndata_-not.patch b/meta/recipes-connectivity/kea/files/0002-Fix-unittests-Typo-in-Name-Name-append-to-ndata_-not.patch deleted file mode 100644 index a24a25f1c9..0000000000 --- a/meta/recipes-connectivity/kea/files/0002-Fix-unittests-Typo-in-Name-Name-append-to-ndata_-not.patch +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | From b5f6cc6b3a2b2c35c9b9bb856861c502771079cc Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Dimitry Andric <dimitry@unified-streaming.com> | ||
| 3 | Date: Wed, 28 Aug 2024 22:32:44 +0200 | ||
| 4 | Subject: [PATCH 2/2] Fix unittests: * Typo in `Name::Name`: append to | ||
| 5 | `ndata_`, not `ndata` * In `Name::split`, use the correct iterators for | ||
| 6 | assigning | ||
| 7 | |||
| 8 | Upstream-Status: Submitted [https://gitlab.isc.org/isc-projects/kea/-/merge_requests/2410] | ||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | --- | ||
| 11 | src/lib/dns/name.cc | 5 +++-- | ||
| 12 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/src/lib/dns/name.cc b/src/lib/dns/name.cc | ||
| 15 | index 085229b..47d9b8f 100644 | ||
| 16 | --- a/src/lib/dns/name.cc | ||
| 17 | +++ b/src/lib/dns/name.cc | ||
| 18 | @@ -347,7 +347,7 @@ Name::Name(const char* namedata, size_t data_len, const Name* origin, | ||
| 19 | // Drop the last character of the data (the \0) and append a copy of | ||
| 20 | // the origin's data | ||
| 21 | ndata_.erase(ndata_.end() - 1); | ||
| 22 | - ndata_.insert(ndata.end(), origin->ndata_.begin(), origin->ndata_.end()); | ||
| 23 | + ndata_.insert(ndata_.end(), origin->ndata_.begin(), origin->ndata_.end()); | ||
| 24 | |||
| 25 | // Do a similar thing with offsets. However, we need to move them | ||
| 26 | // so they point after the prefix we parsed before. | ||
| 27 | @@ -662,7 +662,8 @@ Name::split(const unsigned int first, const unsigned int n) const { | ||
| 28 | // original name, and append the trailing dot explicitly. | ||
| 29 | // | ||
| 30 | retname.ndata_.reserve(retname.offsets_.back() + 1); | ||
| 31 | - retname.ndata_.assign(ndata_.data() + offsets_[first], ndata_.data() + retname.offsets_.back()); | ||
| 32 | + auto it = ndata_.data() + offsets_[first]; | ||
| 33 | + retname.ndata_.assign(it, it + retname.offsets_.back()); | ||
| 34 | retname.ndata_.push_back(0); | ||
| 35 | |||
| 36 | retname.length_ = retname.ndata_.size(); | ||
diff --git a/meta/recipes-connectivity/kea/kea_2.6.1.bb b/meta/recipes-connectivity/kea/kea_2.6.3.bb index ff7fb51fe0..45e98e516f 100644 --- a/meta/recipes-connectivity/kea/kea_2.6.1.bb +++ b/meta/recipes-connectivity/kea/kea_2.6.3.bb | |||
| @@ -3,7 +3,7 @@ DESCRIPTION = "Kea is the next generation of DHCP software developed by ISC. It | |||
| 3 | HOMEPAGE = "http://kea.isc.org" | 3 | HOMEPAGE = "http://kea.isc.org" |
| 4 | SECTION = "connectivity" | 4 | SECTION = "connectivity" |
| 5 | LICENSE = "MPL-2.0" | 5 | LICENSE = "MPL-2.0" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=618093ea9de92c70a115268c1d53421f" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=ee16e7280a6cf2a1487717faf33190dc" |
| 7 | 7 | ||
| 8 | DEPENDS = "boost log4cplus openssl" | 8 | DEPENDS = "boost log4cplus openssl" |
| 9 | 9 | ||
| @@ -17,13 +17,9 @@ SRC_URI = "http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.gz \ | |||
| 17 | file://fix-multilib-conflict.patch \ | 17 | file://fix-multilib-conflict.patch \ |
| 18 | file://fix_pid_keactrl.patch \ | 18 | file://fix_pid_keactrl.patch \ |
| 19 | file://0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch \ | 19 | file://0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch \ |
| 20 | file://0001-Replace-Name-NameString-with-vector-of-uint8_t.patch \ | ||
| 21 | file://0002-Fix-unittests-Typo-in-Name-Name-append-to-ndata_-not.patch \ | ||
| 22 | file://0001-Update-asiolink-for-boost-1.87.patch \ | ||
| 23 | file://0001-make-kea-environment-available-to-lfc.patch \ | 20 | file://0001-make-kea-environment-available-to-lfc.patch \ |
| 24 | file://0001-Avoid-assert-on-empty-packet.patch \ | ||
| 25 | " | 21 | " |
| 26 | SRC_URI[sha256sum] = "d2ce14a91c2e248ad2876e29152d647bcc5e433bc68dafad0ee96ec166fcfad1" | 22 | SRC_URI[sha256sum] = "00241a5955ffd3d215a2c098c4527f9d7f4b203188b276f9a36250dd3d9dd612" |
| 27 | 23 | ||
| 28 | inherit autotools systemd update-rc.d upstream-version-is-even | 24 | inherit autotools systemd update-rc.d upstream-version-is-even |
| 29 | 25 | ||
