Switch replaced by if cause only one case
This commit is contained in:
parent
e28b61e2f0
commit
2e187300c6
1 changed files with 1 additions and 2 deletions
|
@ -11,8 +11,7 @@ func HandleDnsRequest(w dns.ResponseWriter, r *dns.Msg) {
|
||||||
m.SetReply(r)
|
m.SetReply(r)
|
||||||
m.Compress = true //Less CPU usage (?)
|
m.Compress = true //Less CPU usage (?)
|
||||||
|
|
||||||
switch r.Opcode { //Only respond to dns queries
|
if r.Opcode == dns.OpcodeQuery { //Only respond to dns queries
|
||||||
case dns.OpcodeQuery:
|
|
||||||
parseQuery(m)
|
parseQuery(m)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue