* DNS: nxdomain: don't return IP address for a blocked domain

Don't return IP address for a blocked domain
 when blocking mode is "nxdomain".
This commit is contained in:
Simon Zolin
2019-12-30 18:41:51 +03:00
parent 3166607540
commit 07ebcc2bf3
4 changed files with 16 additions and 7 deletions

View File

@@ -54,7 +54,7 @@ func (s *Server) handleGetConfig(w http.ResponseWriter, r *http.Request) {
func checkBlockingMode(req dnsConfigJSON) bool {
bm := req.BlockingMode
if !(bm == "nxdomain" || bm == "null_ip" || bm == "custom_ip") {
if !(bm == "default" || bm == "nxdomain" || bm == "null_ip" || bm == "custom_ip") {
return false
}