You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using this library to parse dnstap files via NewDecoder() and Decode(). I noticed Decode() is documented like so:
Decode silently discards data frames larger than the Decoder's configured maxSize.
Is there a reason it was designed like that? It seems to me silently ignoring things means I can not trust that I decoded all of the dnstap entries in a file. Should I check for this some other way?
The text was updated successfully, but these errors were encountered:
In practice, a dnstap message contains small metadata on top of a single DNS message, and the latter is limited to 64KiB, so a buffer size of 96KiB (used elsewhere in the golang-dnstap code base) should contain any non-malformed dnstap frame.
That said, I will consider changing the API to return rather than eat the "frame too large" error message.
I am currently initialising my decoder via dnstap.NewDecoder(r, int(dnstap.MaxPayloadSize)) in order to get that 96KiB buffer size that you mention, so it is not really that I expect to be skipping frames. It's just that since I could be parsing a dnstap file generated from an unknown source it seems reasonable to expect the unexpected.
Hello,
I have been using this library to parse dnstap files via
NewDecoder()
andDecode()
. I noticedDecode()
is documented like so:Is there a reason it was designed like that? It seems to me silently ignoring things means I can not trust that I decoded all of the dnstap entries in a file. Should I check for this some other way?
The text was updated successfully, but these errors were encountered: