mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 02:03:20 -04:00 
			
		
		
		
	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:
		| @@ -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 { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user