@@ -1990,7 +1990,9 @@ static void processUDPQuery(ClientState& clientState, const struct msghdr* msgh,
19901990
19911991 auto dnsCryptResponse = checkDNSCryptQuery (clientState, query, ids.dnsCryptQuery , ids.queryRealTime .d_start .tv_sec , false );
19921992 if (dnsCryptResponse) {
1993- sendUDPResponse (clientState.udpFD , query, 0 , dest, remote);
1993+ if (!clientState.muted ) {
1994+ sendUDPResponse (clientState.udpFD , query, 0 , dest, remote);
1995+ }
19941996 return ;
19951997 }
19961998
@@ -2010,7 +2012,9 @@ static void processUDPQuery(ClientState& clientState, const struct msghdr* msgh,
20102012 return true ;
20112013 });
20122014
2013- sendUDPResponse (clientState.udpFD , query, 0 , dest, remote);
2015+ if (!clientState.muted ) {
2016+ sendUDPResponse (clientState.udpFD , query, 0 , dest, remote);
2017+ }
20142018 return ;
20152019 }
20162020 }
@@ -2063,7 +2067,9 @@ static void processUDPQuery(ClientState& clientState, const struct msghdr* msgh,
20632067#endif /* defined(HAVE_RECVMMSG) && defined(HAVE_SENDMMSG) && defined(MSG_WAITFORONE) */
20642068#endif /* DISABLE_RECVMMSG */
20652069 /* we use dest, always, because we don't want to use the listening address to send a response since it could be 0.0.0.0 */
2066- sendUDPResponse (clientState.udpFD , query, dnsQuestion.ids .delayMsec , dest, remote);
2070+ if (!clientState.muted ) {
2071+ sendUDPResponse (clientState.udpFD , query, dnsQuestion.ids .delayMsec , dest, remote);
2072+ }
20672073
20682074 handleResponseSent (std::move (dnsQuestion.ids .qname ), dnsQuestion.ids .qtype , 0 ., remote, ComboAddress (), query.size (), *dnsHeader, dnsdist::Protocol::DoUDP, dnsdist::Protocol::DoUDP, false );
20692075 return ;
0 commit comments