Commit 23ac0520 authored by Ralf van der Enden's avatar Ralf van der Enden Committed by Neel Chauhan
Browse files

dns/dnsdist: update to 1.6.0

Changes: https://blog.powerdns.com/2021/05/11/dnsdist-1-6-0-released/

PR:	255781
parent e9ffddd7
# Created by: Carlos J Puga Medina <cpm@fbsd.es>
PORTNAME= dnsdist
DISTVERSION= 1.5.1
PORTREVISION= 4
DISTVERSION= 1.6.0
CATEGORIES= dns net
MASTER_SITES= https://downloads.powerdns.com/releases/
MAINTAINER= tremere@cainites.net
COMMENT= Highly DNS-, DoS-, and abuse-aware load balancer
COMMENT= Highly DNS-, DoS- and abuse-aware loadbalancer
LICENSE= GPLv2 UNLICENSE
LICENSE= GPLv2 ISCL MIT
LICENSE_COMB= multi
LICENSE_FILE_GPLv2= ${WRKSRC}/COPYING
LICENSE_FILE_UNLICENSE= ${WRKSRC}/ext/incbin/UNLICENSE
LICENSE_FILE_ISCL= ${WRKSRC}/ext/ipcrypt/LICENSE
LICENSE_FILE_MIT= ${WRKSRC}/ext/yahttp/LICENSE
BUILD_DEPENDS= ${LOCALBASE}/lib/libatomic_ops.a:devel/libatomic_ops
LIB_DEPENDS= libboost_serialization.so:devel/boost-libs \
......
TIMESTAMP = 1601542484
SHA256 (dnsdist-1.5.1.tar.bz2) = cae759729a87703f4d09b0ed4227cb224aaaa252fa92f2432fd7116f560afbf1
SIZE (dnsdist-1.5.1.tar.bz2) = 1068061
TIMESTAMP = 1620725957
SHA256 (dnsdist-1.6.0.tar.bz2) = a7783a04d8d4ad2b0168ffaaf85ef95d5f557057b0462280684dd799d0cdd292
SIZE (dnsdist-1.6.0.tar.bz2) = 1328707
--- ext/luawrapper/include/LuaContext.hpp.orig 2018-11-12 08:33:58 UTC
+++ ext/luawrapper/include/LuaContext.hpp
@@ -2649,11 +2649,21 @@ struct LuaContext::Reader<std::string>
static auto read(lua_State* state, int index)
-> boost::optional<std::string>
{
+ std::string result;
+
+ // lua_tolstring might convert the variable that would confuse lua_next, so we
+ // make a copy of the variable.
+ lua_pushvalue(state, index);
+
size_t len;
- const auto val = lua_tolstring(state, index, &len);
- if (val == 0)
- return boost::none;
- return std::string(val, len);
+ const auto val = lua_tolstring(state, -1, &len);
+
+ if (val != 0)
+ result.assign(val, len);
+
+ lua_pop(state, 1);
+
+ return val != 0 ? boost::optional<std::string>{ std::move(result) } : boost::none;
}
};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment