if( ( tmp = odbx_field_value( m_result, 1 ) ) != NULL )
{
- di.zone = string( tmp, odbx_field_length( m_result, 1 ) );
+ di.zone = DNSName(string( tmp, odbx_field_length( m_result, 1 ) ));
}
if( ( tmp = odbx_field_value( m_result, 0 ) ) != NULL )
if( m_qname.empty() && ( tmp = odbx_field_value( m_result, 1 ) ) != NULL )
{
- rr.qname = DNSName( tmp, odbx_field_length( m_result, 1 ) );
+ rr.qname = DNSName( string(tmp, odbx_field_length( m_result, 1 ) ));
}
if( ( tmp = odbx_field_value( m_result, 2 ) ) != NULL )
if( ( tmp = odbx_field_value( m_result, 1 ) ) != NULL )
{
- di.zone = DNSName( tmp, odbx_field_length( m_result, 1 ) );
+ di.zone = DNSName( string(tmp, odbx_field_length( m_result, 1 )) );
}
if( ( tmp = odbx_field_value( m_result, 0 ) ) != NULL )
g_lua.writeFunction("addDomainBlock", [](const std::string& domain) {
SuffixMatchNode smn;
- smn.add(domain);
+ smn.add(DNSName(domain));
g_rulactions.modify([smn](decltype(g_rulactions)::value_type& rulactions) {
rulactions.push_back({
std::make_shared<SuffixMatchNodeRule>(smn),
try
{
vector<uint8_t> packet;
- DNSPacketWriter dpw(packet, "a.root-servers.net.", QType::A);
+ DNSPacketWriter dpw(packet, DNSName("a.root-servers.net."), QType::A);
dpw.getHeader()->rd=true;
Socket sock(remote.sin4.sin_family, SOCK_DGRAM);