case DNSAction::Action::Truncate:
if (!dnsQuestion.overTCP()) {
VERBOSESLOG(infolog("Query from %s truncated because of dynamic block", dnsQuestion.ids.origRemote.toStringWithPort()),
- dnsQuestion.getLogger()->info("Query truncated because of a dynamic rule"));
+ dnsQuestion.getLogger()->info("Query truncated because of a dynamic rule"));
updateBlockStats();
dnsdist::PacketMangling::editDNSHeaderFromPacket(dnsQuestion.getMutableData(), [](dnsheader& header) {
header.tc = true;
case DNSAction::Action::Truncate:
if (!dnsQuestion.overTCP()) {
VERBOSESLOG(infolog("Query from %s truncated because of dynamic block", dnsQuestion.ids.origRemote.toStringWithPort()),
- dnsQuestion.getLogger()->info("Query truncated because of a suffix-based dynamic rule"));
+ dnsQuestion.getLogger()->info("Query truncated because of a suffix-based dynamic rule"));
updateBlockStats();
dnsdist::PacketMangling::editDNSHeaderFromPacket(dnsQuestion.getMutableData(), [](dnsheader& header) {
header.tc = true;
expectProxyProtocol = clientState.d_enableProxyProtocol && expectProxyProtocolFrom(remote);
if (!dnsdist::configuration::getCurrentRuntimeConfiguration().d_ACL.match(remote) && !expectProxyProtocol) {
VERBOSESLOG(infolog("Query from %s dropped because of ACL", remote.toStringWithPort()),
- dnsdist::logging::getTopLogger()->info("Query dropped because of ACL", "address", Logging::Loggable(dest)));
+ dnsdist::logging::getTopLogger()->info("Query dropped because of ACL", "address", Logging::Loggable(dest)));
++dnsdist::metrics::g_stats.aclDrops;
return false;
}
#else // DNSdist
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
-#define SLOG(nonStructured, structured) \
- do { \
- if (dnsdist::logging::doStructuredLogging()) { \
- structured; \
- } \
- else { \
- nonStructured; \
- } \
- } \
- while (0)
+#define SLOG(nonStructured, structured) \
+ do { \
+ if (dnsdist::logging::doStructuredLogging()) { \
+ structured; \
+ } \
+ else { \
+ nonStructured; \
+ } \
+ } while (0)
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
#define VERBOSESLOG(nonStructured, structured) \
if (dnsdist::logging::doVerboseLogging()) { \
SLOG(nonStructured, structured); \
} \
- } \
- while (0)
+ } while (0)
#endif /* ! DNSDIST */