Lua2 backend unable to parse boolean value from bit
Environment
Operating system: Ubuntu 14.04 LTS x64
Software version: PowerDNS Authoritative Server 0.0.2463gc40b447
Software source: official repo
Expected behaviour
Lua2 backend should be able to parse boolean from bit value
Actual behaviour
Lua2 backend expects array of tables as result of certain methods such as 'dns_lookup' or 'dns_get_domain_keys'.
When returning the result and using bit (0/1) values for 'auth' ('dns_lookup') or 'active' ('dns_get_domain_keys') the backend fails with '(boost::bad_get: failed value get using boost::get)'
Short description
Lua2 backend unable to parse boolean value from bit
Environment
Expected behaviour
Lua2 backend should be able to parse boolean from bit value
Actual behaviour
Lua2 backend expects array of tables as result of certain methods such as 'dns_lookup' or 'dns_get_domain_keys'. When returning the result and using bit (0/1) values for 'auth' ('dns_lookup') or 'active' ('dns_get_domain_keys') the backend fails with '(boost::bad_get: failed value get using boost::get)'
Steps to reproduce
Using example from https://github.com/PowerDNS/pdns/blob/master/modules/lua2backend/regression-tests/lua2-dnssec.lua line 78
table.insert(ret, { name = qname, type = newQType(k), content = row, ttl = 60, domain_id = d_id, auth = true })
will work buttable.insert(ret, { name = qname, type = newQType(k), content = row, ttl = 60, domain_id = d_id, auth = 1 })
will fail