plugin/k8s_external: Set authoritative bit in responses (#5284)
set authoritative bit in responses Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
parent
83021637b3
commit
e60c179194
4 changed files with 9 additions and 0 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
func (e *External) serveApex(state request.Request) (int, error) {
|
||||
m := new(dns.Msg)
|
||||
m.SetReply(state.Req)
|
||||
m.Authoritative = true
|
||||
switch state.QType() {
|
||||
case dns.TypeSOA:
|
||||
m.Answer = []dns.RR{e.soa(state)}
|
||||
|
@ -37,6 +38,7 @@ func (e *External) serveSubApex(state request.Request) (int, error) {
|
|||
|
||||
m := new(dns.Msg)
|
||||
m.SetReply(state.Req)
|
||||
m.Authoritative = true
|
||||
|
||||
// base is either dns. of ns1.dns (or another name), if it's longer return nxdomain
|
||||
switch labels := dns.CountLabel(base); labels {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue