For boolean settings, specifying the name of the setting without a value means
`yes`.
+## `8bit-dns`
+* Allow 8 bit dns queries
+* Default: no
+* Available since: 4.0.0
+
+Allow 8 bit DNS queries.
+
## `allow-axfr-ips`
* IP ranges, separated by commas
* Default: 127.0.0.0/8,::1
#endif
bool g_anyToTcp;
+bool g_8bitDNS;
typedef Distributor<DNSPacket,DNSPacket,PacketHandler> DNSDistributor;
ArgvMap theArg;
::arg().set("security-poll-suffix","Domain name from which to query security update notifications")="secpoll.powerdns.com.";
::arg().setSwitch("outgoing-axfr-expand-alias", "Expand ALIAS records during outgoing AXFR")="no";
+ ::arg().setSwitch("8bit-dns", "Allow 8bit dns queries")="no";
}
static time_t s_start=time(0);
newuid=Utility::makeUidNumeric(::arg()["setuid"]);
g_anyToTcp = ::arg().mustDo("any-to-tcp");
+ g_8bitDNS = ::arg().mustDo("8bit-dns");
DNSPacket::s_udpTruncationThreshold = std::max(512, ::arg().asNum("udp-truncation-threshold"));
DNSPacket::s_doEDNSSubnetProcessing = ::arg().mustDo("edns-subnet-processing");
extern int isGuarded( char ** );
void* carbonDumpThread(void*);
extern bool g_anyToTcp;
+extern bool g_8bitDNS;
#endif // COMMON_STARTUP_HH
bool validDNSName(const DNSName &name)
{
- string::size_type pos, length;
- char c;
- for(const auto& s : name.getRawLabels()) {
- length=s.length();
- for(pos=0; pos < length; ++pos) {
- c=s[pos];
- if(!((c >= 'a' && c <= 'z') ||
- (c >= 'A' && c <= 'Z') ||
- (c >= '0' && c <= '9') ||
- c =='-' || c == '_' || c=='*' || c=='.' || c=='/' || c=='@' || c==' ' || c=='\\' || c==':'))
- return false;
+ if (!g_8bitDNS) {
+ string::size_type pos, length;
+ char c;
+ for(const auto& s : name.getRawLabels()) {
+ length=s.length();
+ for(pos=0; pos < length; ++pos) {
+ c=s[pos];
+ if(!((c >= 'a' && c <= 'z') ||
+ (c >= 'A' && c <= 'Z') ||
+ (c >= '0' && c <= '9') ||
+ c =='-' || c == '_' || c=='*' || c=='.' || c=='/' || c=='@' || c==' ' || c=='\\' || c==':'))
+ return false;
+ }
}
}
return true;