View | Details | Raw Unified | Return to bug 242125 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-4 / +7 lines)
Lines 2-9 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	dnsdist
4
PORTNAME=	dnsdist
5
DISTVERSION=	1.3.3
5
DISTVERSION=	1.4.0
6
PORTREVISION=	11
7
CATEGORIES=	dns net
6
CATEGORIES=	dns net
8
MASTER_SITES=	https://downloads.powerdns.com/releases/ \
7
MASTER_SITES=	https://downloads.powerdns.com/releases/ \
9
		LOCAL/cpm
8
		LOCAL/cpm
Lines 38-51 Link Here
38
37
39
USE_RC_SUBR=	dnsdist
38
USE_RC_SUBR=	dnsdist
40
39
41
OPTIONS_DEFINE=		FSTRM LUAJIT SNMP
40
OPTIONS_DEFINE=		DOH FSTRM LUAJIT SNMP
42
OPTIONS_DEFAULT=	GNUTLS OPENSSL
41
OPTIONS_DEFAULT=	DOH GNUTLS OPENSSL
43
OPTIONS_MULTI=		TLS
42
OPTIONS_MULTI=		TLS
44
OPTIONS_MULTI_TLS=	GNUTLS OPENSSL
43
OPTIONS_MULTI_TLS=	GNUTLS OPENSSL
45
44
45
DOH_DESC=	DNS over HTTPS support
46
FSTRM_DESC=		dnstap support (see dnstap.info)
46
FSTRM_DESC=		dnstap support (see dnstap.info)
47
LUAJIT_DESC=		Use LuaJIT instead of Lua
47
LUAJIT_DESC=		Use LuaJIT instead of Lua
48
48
49
DOH_LIB_DEPENDS=	libh2o-evloop.so:www/h2o
50
DOH_CONFIGURE_ON=	--enable-dns-over-https
51
49
FSTRM_LIB_DEPENDS=	libfstrm.so:devel/fstrm
52
FSTRM_LIB_DEPENDS=	libfstrm.so:devel/fstrm
50
FSTRM_CONFIGURE_ENABLE=	fstrm
53
FSTRM_CONFIGURE_ENABLE=	fstrm
51
54
(-)distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1541860683
1
TIMESTAMP = 1574293009
2
SHA256 (dnsdist-1.3.3.tar.bz2) = 9fb24f9032025955169f3c6e9b0a05b6aa9d6441ec47da08d22de1c1aa23e8cf
2
SHA256 (dnsdist-1.4.0.tar.bz2) = a336fa2c3eb381c2464d9d9790014fd6d4505029ed2c1b73ee1dc9115a2f1dc0
3
SIZE (dnsdist-1.3.3.tar.bz2) = 971253
3
SIZE (dnsdist-1.4.0.tar.bz2) = 1044479
(-)files/patch-dnsdist-lua-vars.cc (-11 lines)
Lines 1-11 Link Here
1
--- dnsdist-lua-vars.cc.orig	2018-10-03 09:48:10 UTC
2
+++ dnsdist-lua-vars.cc
3
@@ -22,6 +22,8 @@
4
 #include "dnsdist.hh"
5
 #include "ednsoptions.hh"
6
 
7
+#undef BADSIG // signal.h SIG_ERR
8
+
9
 void setupLuaVars()
10
 {
11
   g_lua.writeVariable("DNSAction", std::unordered_map<string,int>{
(-)files/patch-ext_luawrapper_include_LuaContext.hpp (-28 lines)
Lines 1-28 Link Here
1
--- ext/luawrapper/include/LuaContext.hpp.orig	2018-03-29 15:25:58 UTC
2
+++ ext/luawrapper/include/LuaContext.hpp
3
@@ -2635,11 +2635,21 @@ struct LuaContext::Reader<std::string>
4
     static auto read(lua_State* state, int index)
5
         -> boost::optional<std::string>
6
     {
7
+        std::string result;
8
+
9
+        // lua_tolstring might convert the variable that would confuse lua_next, so we
10
+        //   make a copy of the variable.
11
+        lua_pushvalue(state, index);
12
+
13
         size_t len;
14
-        const auto val = lua_tolstring(state, index, &len);
15
-        if (val == 0)
16
-            return boost::none;
17
-        return std::string(val, len);
18
+        const auto val = lua_tolstring(state, -1, &len);
19
+
20
+        if (val != 0)
21
+          result.assign(val, len);
22
+
23
+        lua_pop(state, 1);
24
+
25
+        return val != 0 ? boost::optional<std::string>{ std::move(result) } : boost::none;
26
     }
27
 };
28
 

Return to bug 242125