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

DNSTAP over TCP #271

Closed
iruzanov opened this issue Mar 9, 2023 · 3 comments
Closed

DNSTAP over TCP #271

iruzanov opened this issue Mar 9, 2023 · 3 comments

Comments

@iruzanov
Copy link

iruzanov commented Mar 9, 2023

Hello, colleagues!

I would like you to ask if is it possible to set up NSD to send DNSTAP statistics via fstrm over TCP-socket? I know such mode (TCP) is implemented in Unbound. So it could be nice to have multiple transports (UNIX-socket and TCP-socket but w/o SSL yet) in NSD too ;)

Actually i have written the patch (although this is not final patch) to implement such feature. Could you please revise my patch for possible critical errors, memory leakage and so on (gzipped file dnstap.c.diff):
dnstap.c.diff.gz

This is core part of my patch. The idea. And there is some little work to integrate some options like nsd->options->dnstap_ip and nsd->options->dnstap_unix_socket in configparser.c and configlexer.lex. But i would like you to revise my idea first. And if you do not mind, i'm ready to finilize patchset and gladly share it with you ;)

Thank you in advance!

@iruzanov
Copy link
Author

iruzanov commented Mar 9, 2023

I have tested my patch - connection is established and statistics is sending over TCP. I tried to send comands like dig, But i did not test it under highload yet. NSD version 4.6.0.

@wcawijngaards
Copy link
Member

Thank you for the patch! I have modified it a bit and added a config option. The option added is called dnstap-ip: "127.0.0.1@3333".

The default value for dnstap-ip is "", and this disables it and the socket path is used. It can use an address or address@port.

@iruzanov
Copy link
Author

iruzanov commented Mar 9, 2023

I saw your final patch, Wouter! Great work! Thank you!
So i will wait for new release of NSD ;)

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

No branches or pull requests

2 participants