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

Add support for SVCB and HTTPS #112

Merged
merged 1 commit into from
Nov 23, 2023
Merged

Add support for SVCB and HTTPS #112

merged 1 commit into from
Nov 23, 2023

Conversation

k0ekk0ek
Copy link
Contributor

Initial (not very optimized) implementation of RFC9460. The SVCB RRTYPE is different from all other RRTYPEs in that it requires RDATA to be sorted (unless secondary, in which case we serve what we have). To avoid additional allocations, I've implemented a strict mode that moves existing RDATA out of the way, updates the maximum size, parses the RDATA for the parameter being parsed and move data that was already there to the right position. It's not "efficient", because we need to iterate the data in linear fashion, but since we're parsing we're already doing that. IMHO it's better than separate allocations and using qsort afterwards, although in NSD, that really makes more sense. Ideally, operators make sure the keys are in wire-format order, in which case it's way more efficient that doing separate allocations.

This does introduce the concept of rdata_t, sort-of an RDATA view. It's best if that concept is used by all other parse functions too. As we'll need to cleanup the API a little bit before the initial release, I'll add that later.

@k0ekk0ek k0ekk0ek merged commit 91bb96e into NLnetLabs:main Nov 23, 2023
4 checks passed
@k0ekk0ek k0ekk0ek deleted the svcb-rr branch February 8, 2024 09:05
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