Index: head/dns/dnsdist/Makefile =================================================================== --- head/dns/dnsdist/Makefile (revision 543915) +++ head/dns/dnsdist/Makefile (revision 543916) @@ -1,74 +1,94 @@ # Created by: Carlos J Puga Medina # $FreeBSD$ PORTNAME= dnsdist -DISTVERSION= 1.4.0 -PORTREVISION= 2 +DISTVERSION= 1.5.0 CATEGORIES= dns net MASTER_SITES= https://downloads.powerdns.com/releases/ MAINTAINER= tremere@cainites.net COMMENT= Highly DNS-, DoS- and abuse-aware loadbalancer LICENSE= GPLv2 UNLICENSE LICENSE_COMB= multi LICENSE_FILE_GPLv2= ${WRKSRC}/COPYING LICENSE_FILE_UNLICENSE= ${WRKSRC}/ext/incbin/UNLICENSE BUILD_DEPENDS= ${LOCALBASE}/lib/libatomic_ops.a:devel/libatomic_ops LIB_DEPENDS= libboost_serialization.so:devel/boost-libs \ libh2o-evloop.so:www/h2o \ libprotobuf.so:devel/protobuf \ libre2.so:devel/re2 \ libsodium.so:security/libsodium -USES= bison:alias compiler:c++14-lang cpe gmake libedit libtool localbase \ - pkgconfig tar:bz2 +USES= bison:alias compiler:c++14-lang cpe gmake libedit libtool \ + localbase pkgconfig tar:bz2 USE_RC_SUBR= dnsdist GNU_CONFIGURE= yes CONFIGURE_ARGS= --bindir=${PREFIX}/sbin \ --enable-dns-over-https \ --enable-dns-over-tls \ --enable-dnscrypt \ --sysconfdir=${ETCDIR} \ --with-libsodium \ --with-re2 INSTALL_TARGET= install-strip USERS= _dnsdist GROUPS= _dnsdist -OPTIONS_DEFINE= DNSTAP LUAJIT SNMP -OPTIONS_DEFAULT= GNUTLS OPENSSL +OPTIONS_DEFINE= DNSTAP SNMP +OPTIONS_DEFAULT= CDB GNUTLS LMDB LUA OPENSSL +OPTIONS_GROUP= KSVOPT +OPTIONS_GROUP_KSVOPT= CDB LMDB OPTIONS_MULTI= TLS OPTIONS_MULTI_TLS= GNUTLS OPENSSL +OPTIONS_SINGLE= EXTLUA +OPTIONS_SINGLE_EXTLUA= LUA LUAJIT LUAJITOR +CDB_DESC= CDB backend DNSTAP_DESC= dnstap support (see dnstap.info) -LUAJIT_DESC= Use LuaJIT instead of Lua +KSVOPT_DESC= Key Value Stores +LMDB_DESC= LMDB backend +LUAJITOR_DESC= Use lang/luajit-openresty +LUAJIT_DESC= Use lang/luajit +LUA_DESC= Use lang/lua +CDB_LIB_DEPENDS= libcdb.so:databases/tinycdb +CDB_CONFIGURE_ON= CDB_CFLAGS="-I${LOCALBASE}/include" \ + CDB_LIBS="-L${LOCALBASE}/lib -lcdb" + DNSTAP_LIB_DEPENDS= libfstrm.so:devel/fstrm DNSTAP_CONFIGURE_ENABLE= fstrm GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls GNUTLS_CONFIGURE_ENABLE= gnutls -LUAJIT_LIB_DEPENDS= libluajit-5.1.so:lang/luajit-openresty -LUAJIT_USES_OFF= lua -LUAJIT_CONFIGURE_OFF= --with-lua=lua-${LUA_VER} +LMDB_LIB_DEPENDS= liblmdb.so:databases/lmdb +LMDB_CONFIGURE_ON= --with-lmdb=${LOCALBASE} +LMDB_CONFIGURE_OFF= --without-lmdb + +LUAJITOR_LIB_DEPENDS= libluajit-5.1.so:lang/luajit-openresty +LUAJITOR_CONFIGURE_ON= --with-lua=luajit + +LUAJIT_LIB_DEPENDS= libluajit-5.1.so:lang/luajit LUAJIT_CONFIGURE_ON= --with-lua=luajit + +LUA_USES= lua +LUA_CONFIGURE_ON= --with-lua=lua-${LUA_VER} OPENSSL_USES= ssl OPENSSL_CONFIGURE_ON= LIBSSL_CFLAGS=-I${OPENSSLINC} \ LIBSSL_LIBS="-L${OPENSSLLIB} -lssl" OPENSSL_CONFIGURE_WITH= libssl SNMP_LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp SNMP_CONFIGURE_WITH= net-snmp post-install: @${MKDIR} ${STAGEDIR}${ETCDIR} ${INSTALL_DATA} ${FILESDIR}/dnsdist.conf.sample ${STAGEDIR}${ETCDIR} .include Index: head/dns/dnsdist/distinfo =================================================================== --- head/dns/dnsdist/distinfo (revision 543915) +++ head/dns/dnsdist/distinfo (revision 543916) @@ -1,3 +1,3 @@ -TIMESTAMP = 1579127277 -SHA256 (dnsdist-1.4.0.tar.bz2) = a336fa2c3eb381c2464d9d9790014fd6d4505029ed2c1b73ee1dc9115a2f1dc0 -SIZE (dnsdist-1.4.0.tar.bz2) = 1044479 +TIMESTAMP = 1596123185 +SHA256 (dnsdist-1.5.0.tar.bz2) = 2c07c4ef0c497f5223909ff181fe3ba7c6016962a2855cffe26b7f3609f27b58 +SIZE (dnsdist-1.5.0.tar.bz2) = 1067645 Index: head/dns/dnsdist/files/patch-ext_luawrapper_include_LuaContext.hpp =================================================================== --- head/dns/dnsdist/files/patch-ext_luawrapper_include_LuaContext.hpp (revision 543915) +++ head/dns/dnsdist/files/patch-ext_luawrapper_include_LuaContext.hpp (revision 543916) @@ -1,28 +1,28 @@ ---- ext/luawrapper/include/LuaContext.hpp.orig 2018-03-29 15:25:58 UTC +--- ext/luawrapper/include/LuaContext.hpp.orig 2018-11-12 08:33:58 UTC +++ ext/luawrapper/include/LuaContext.hpp -@@ -2635,11 +2635,21 @@ struct LuaContext::Reader +@@ -2649,11 +2649,21 @@ struct LuaContext::Reader static auto read(lua_State* state, int index) -> boost::optional { + 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::move(result) } : boost::none; } }; Index: head/dns/dnsdist/pkg-descr =================================================================== --- head/dns/dnsdist/pkg-descr (revision 543915) +++ head/dns/dnsdist/pkg-descr (revision 543916) @@ -1,6 +1,29 @@ -dnsdist is a highly DNS-, DoS- and abuse-aware loadbalancer. Its -goal in life is to route DNS traffic to the best DNS server, -delivering top performance to legitimate users while shunting or -blocking abusive traffic. +dnsdist is a highly DNS-, DoS- and abuse-aware loadbalancer. Its goal in life +is to route traffic to the best server, delivering top performance to +legitimate users while shunting or blocking abusive traffic. + +dnsdist is dynamic, its configuration language is Lua and it can be can be +changed at runtime, and its statistics can be queried from a console-like +interface or an HTTP API. + +dnsdist is used to protect and optimize the DNS traffic of hundreds of millions +of internet subscribers. + + * IPv4, UDP/TCP + * IPv6, UDP/TCP, 100% compliant + * Remotely pollable statistics for real time graphing + * High performance + * SNMP statistics bridge (read only) + * Dynamically route queries to backend servers + * Advanced anti-spoofing measures + * Reconfiguration without downtime + * Kernel based filtering of harmful traffic, rejecting packets at 'line speed' + * Internal Lua-based scripted answer generation + * Question interception, answer reconditioning, NXDOMAIN redirection + - Including 'block lists' and security measures + * Built-in memory efficient cache for increased performance + * Ability to continue serving data from cache for non-responsive backends + * Smart rate limiting per user, per subnet, per domain + * Capable of writing dynamic rules to block harmful traffic WWW: https://dnsdist.org/