mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
Identity and version support for the dnstap plugin (#5555)
* Added identity and version support to dnstap plugin Signed-off-by: Daniel Jolly <code@danieljolly.com> * Added missing commas Signed-off-by: Daniel Jolly <code@danieljolly.com> * Moved byte slice conversions to setup rather than handler. Fixed indentation issue. Signed-off-by: Daniel Jolly <code@danieljolly.com> * Improved setup config parsing and added tests to detect various configurations Signed-off-by: Daniel Jolly <code@danieljolly.com> Signed-off-by: Daniel Jolly <code@danieljolly.com> Co-authored-by: Daniel Jolly <code@danieljolly.com>
This commit is contained in:
@@ -18,12 +18,14 @@ type Dnstap struct {
|
||||
|
||||
// IncludeRawMessage will include the raw DNS message into the dnstap messages if true.
|
||||
IncludeRawMessage bool
|
||||
Identity []byte
|
||||
Version []byte
|
||||
}
|
||||
|
||||
// TapMessage sends the message m to the dnstap interface.
|
||||
func (h Dnstap) TapMessage(m *tap.Message) {
|
||||
t := tap.Dnstap_MESSAGE
|
||||
h.io.Dnstap(&tap.Dnstap{Type: &t, Message: m})
|
||||
h.io.Dnstap(&tap.Dnstap{Type: &t, Message: m, Identity: h.Identity, Version: h.Version})
|
||||
}
|
||||
|
||||
func (h Dnstap) tapQuery(w dns.ResponseWriter, query *dns.Msg, queryTime time.Time) {
|
||||
|
||||
Reference in New Issue
Block a user