Skip to content
Snippets Groups Projects
Unverified Commit 3bb130d0 authored by Joona Hoikkala's avatar Joona Hoikkala Committed by GitHub
Browse files

Refuse dynamic updates properly (#124)

parent 1d85bf75
Branches
Tags
No related merge requests found
......@@ -303,6 +303,7 @@ logformat = "text"
- unreleased
- New
- Command line flag `-c` to specify location of config file.
- Proper refusal of dynamic update requests.
- v0.5
- New
- Configurable certificate cache directory
......
......@@ -56,7 +56,6 @@ func answer(q dns.Question) ([]dns.RR, int, error) {
if !ok {
rcode = dns.RcodeNameError
}
}
log.WithFields(log.Fields{"qtype": dns.TypeToString[rtype], "domain": domain, "rcode": dns.RcodeToString[rcode]}).Debug("Answering question for domain")
return r, rcode, nil
......@@ -68,6 +67,9 @@ func handleRequest(w dns.ResponseWriter, r *dns.Msg) {
if r.Opcode == dns.OpcodeQuery {
readQuery(m)
} else if r.Opcode == dns.OpcodeUpdate {
log.Debug("Refusing DNS Dynamic update request")
m.MsgHdr.Rcode = dns.RcodeRefused
}
w.WriteMsg(m)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment