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

RawInfo doesn't play well with UDP datagram headers #173

Closed
rmarx opened this issue Aug 6, 2021 · 1 comment
Closed

RawInfo doesn't play well with UDP datagram headers #173

rmarx opened this issue Aug 6, 2021 · 1 comment

Comments

@rmarx
Copy link
Contributor

rmarx commented Aug 6, 2021

Currently, we re-use the RawInfo struct to give a simple re-usable way to log raw packet/frame/datagram contents.

In the struct, we have two length-fields: the full length and payload_length, assuming the header length can be calculated from those two.

However, we do not have a way to log e.g., only the payload without the header (we can only log the full value truncated, but not indicate it starts at the payload).

This isn't a problem for QUIC/H3 packets/frames, but as @jlaine pointed out, it is a problem for UDP datagrams. In most stacks, you don't get the pure UDP packet header and so can't log it (so you'd always start with the payload).

This can be solved in several different ways:

  1. disallow usage of RawInfo for datagrams
  2. make explicit that datagram-related events start at the payload
  3. log a fixed-value/fixed-size dummy UDP datagram (e.g., 8 bytes of zeroes)
  4. extend RawInfo to make it more flexible

I'm currently most in favor of 2, as I don't see many people logging full UDP datagrams instead of logging the QUIC packets.

@rmarx
Copy link
Contributor Author

rmarx commented Jan 19, 2023

Fixed by #274

@rmarx rmarx closed this as completed Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant