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:
parent
a740ed7536
commit
0511ca2e4d
4 changed files with 67 additions and 10 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue