Hi All,<br><br>My boss asked me to modify PNDS to be able to support DNS64 specification. DNS64 specification mandates DNS resolver to synthesize AAAA record from A record, if AAAA record is missing. I started with Lua script example of PDNS recursor. But i could not find any clue on how to get A record from nodata function parameters:<br>
<br><a href="http://wiki.powerdns.com/trac/browser/branches/pdns-dns64/pdns/powerdns-example-script.lua">http://wiki.powerdns.com/trac/browser/branches/pdns-dns64/pdns/powerdns-example-script.lua</a><br><br>function nodata ( remoteip, domain, qtype, records )<br>
print ("nodata called for: ", remoteip, getlocaladdress(), domain, qtype)<br> if qtype ~= pdns.AAAA then return -1, {} end -- only AAAA records<br> setvariable()<br> return "getFakeAAAARecords", domain, "fe80::21b:77ff:0:0" -- here i need to return ::ffff:ipv4.dotted.decimal.format<br>
end <br><br>I would like to do something like this<br><br> ipv4 = "1.2.3.4" -- how do i get this data from recursor ??? <br> ipv6 = "::ffff:" .. ipv4 -- synthesized representation of IPv4 in IPv6<br>
return "getFakeAAARecords", domain, ipv6<br><br>My question is:<br>- how do i get IPv4 data using lua API in above script examples?<br><br>Regards,<br>Muntasir<br><br>