Skip to content

Conversation

@fippo
Copy link

@fippo fippo commented Dec 29, 2025

which allows embedding them into STUN.

which allows embedding them into STUN.
conn.go Outdated

var rawPackets [][]byte

// TODO: this is not quite correct.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"writePackets" is an odd name, this writes a series of records? Intercepting here is wrong since the goal is to intercept the handshake packets, not the individual records.
Theoretically handshake and non-handshake records could be mixed but I think that isn't allowed (at least in DTLS 1.2)

Copy link
Author

@fippo fippo Dec 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best way I came up with so far is to split the handling of handshake packets into a writeHandshakePackets (which seems like a general improvement) and call that from handshaker.go -- done in f501150

conn.go Outdated
// We need the full packets for SPED so we can crc32 them (at least the ones
// received in plain!)
}
*/
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same problem as above, this is about records, not packets.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

likewise, readAndBuffer already has a hasHandshake which could be used for an inbound interceptor (which should only be used to to let the piggybacking controller calculate and store the crc32).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

787aa43 adds an inbound notifier (which can not intercept packets)

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 this pull request may close these issues.

1 participant