return {"error"};
}
+static string allZerosIP{"0.0.0.0"};
+static string allZerosIP6{"::"};
+
static string lua_createForward()
{
- static string allZerosIP{"0.0.0.0"};
try {
DNSName record_name{s_lua_record_ctx->zone_record.dr.d_name};
if (!record_name.isWildcard()) {
static string lua_createForward6()
{
- static string allZerosIP{"::"};
try {
DNSName record_name{s_lua_record_ctx->zone_record.dr.d_name};
if (!record_name.isWildcard()) {
- return allZerosIP;
+ return allZerosIP6;
}
record_name.chopOff();
DNSName rel{s_lua_record_ctx->qname.makeRelative(record_name)};
return address.toString();
}
}
- return allZerosIP;
+ return allZerosIP6;
} catch (const PDNSException &e) {
- return allZerosIP;
+ return allZerosIP6;
}
}
{
ComboAddress caddr(address);
- if (nmg.match(ComboAddress(address))) {
+ if (nmg.match(caddr)) {
return {address};
}
if (fallback) {
}
if (caddr.isIPv4()) {
- return {string("0.0.0.0")};
+ return {allZerosIP};
}
- return {"::"};
+ return {allZerosIP6};
}
/*