int asyncresolve(const ComboAddress& ip, const DNSName& domain, int type, bool doTCP, bool sendRDQuery, int EDNS0Level, struct timeval* now, boost::optional<Netmask>& srcmask, LWResult *lwr)
{
int len;
- int bufsize=1500;
+ int bufsize=g_outgoingEDNSBufsize;
scoped_array<unsigned char> buf(new unsigned char[bufsize]);
vector<uint8_t> vpacket;
// string mapped0x20=dns0x20(domain);
srcmask=boost::optional<Netmask>(); // this is also our return value
}
- pw.addOpt(1200, 0, EDNSOpts::DNSSECOK, opts); // 1200 bytes answer size
+ pw.addOpt(g_outgoingEDNSBufsize, 0, EDNSOpts::DNSSECOK, opts);
pw.commit();
}
lwr->d_rcode = 0;
uint64_t g_latencyStatSize;
bool g_logCommonErrors;
bool g_anyToTcp;
-uint16_t g_udpTruncationThreshold;
+uint16_t g_udpTruncationThreshold, g_outgoingEDNSBufsize;
__thread shared_ptr<RecursorLua>* t_pdl;
__thread addrringbuf_t* t_remotes, *t_servfailremotes, *t_largeanswerremotes;
}
setupDelegationOnly();
-
+ g_outgoingEDNSBufsize=::arg().asNum("edns-outgoing-bufsize");
if(::arg()["trace"]=="fail") {
SyncRes::setDefaultLogMode(SyncRes::Store);
::arg().setSwitch( "root-nx-trust", "If set, believe that an NXDOMAIN from the root means the TLD does not exist")="no";
::arg().setSwitch( "any-to-tcp","Answer ANY queries with tc=1, shunting to TCP" )="no";
::arg().set("udp-truncation-threshold", "Maximum UDP response size before we truncate")="1680";
+ ::arg().set("edns-outgoing-bufsize", "Outgoing EDNS buffer size")="1680";
::arg().set("minimum-ttl-override", "Set under adverse conditions, a minimum TTL")="0";
::arg().set("max-qperq", "Maximum outgoing queries per query")="50";
::arg().set("max-total-msec", "Maximum total wall-clock time per query in milliseconds, 0 for unlimited")="7000";
extern RecursorStats g_stats;
extern unsigned int g_numThreads;
extern SuffixMatchNode g_delegationOnly;
+extern uint16_t g_outgoingEDNSBufsize;
std::string reloadAuthAndForwards();
ComboAddress parseIPAndPort(const std::string& input, uint16_t port);
ComboAddress getQueryLocalAddress(int family, uint16_t port);