Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong dnstap Message.Type value used in logger #11

Closed
edmonds opened this issue Oct 31, 2022 · 0 comments
Closed

Wrong dnstap Message.Type value used in logger #11

edmonds opened this issue Oct 31, 2022 · 0 comments

Comments

@edmonds
Copy link

edmonds commented Oct 31, 2022

Hi,

The logging code uses dnstap. Here is where the dnstap Message.Type field is set:

https://github.com/facebookincubator/dns/blob/f25121dfd6b150e372ea7762eaddaa4a5e815bb7/dnsrocks/logger/dnstap_logger.go#L140

See:

https://github.com/dnstap/dnstap.pb/blob/1061e3ed4430f68a0adb87eecadbb9208e7b51dd/dnstap.proto#L157-L160

        // AUTH_QUERY is a DNS query message received from a resolver by an
        // authoritative name server, from the perspective of the authoritative
        // name server.
        AUTH_QUERY = 1;

and

https://github.com/dnstap/dnstap.pb/blob/1061e3ed4430f68a0adb87eecadbb9208e7b51dd/dnstap.proto#L178-L185

        // CLIENT_QUERY is a DNS query message sent from a client to a DNS
        // server which is expected to perform further recursion, from the
        // perspective of the DNS server. The client may be a stub resolver or
        // forwarder or some other type of software which typically sets the RD
        // (recursion desired) bit when querying the DNS server. The DNS server
        // may be a simple forwarding proxy or it may be a full recursive
        // resolver.
        CLIENT_QUERY = 5;

I did not see any recursive or forwarding features in dnsrocks (it seems to be an authoritative nameserver), so AUTH_QUERY rather than CLIENT_QUERY is the correct value to use for the dnstap Message.Type field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant