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

Use valid DNS queries as largest UDP and TCP test payloads #264

Merged
merged 2 commits into from
May 27, 2024

Conversation

pspacek
Copy link
Contributor

@pspacek pspacek commented May 23, 2024

No description provided.

@jelu
Copy link
Member

jelu commented May 23, 2024

Please add a python script to actually generate these blobs and possibly Makefile.am entries, commit comment isn't the best place for this kind of documentation

pspacek and others added 2 commits May 27, 2024 17:41
EDNS0 option PADDING is used to inflate the queries.
Largest UDP payload over IPv4 is 65507 bytes, 65527 for the IPv6.
We go with IPv4. Oversized payloads are already tested using largest TCP
payload (65535 bytes).

Generated with dnspython 2.6.1:
    import dns.message
    m = dns.message.make_query('.', 'TYPE666')
    print(len(m.to_wire(max_size=65535)))
    m.options.append(dns.edns.GenericOption(dns.edns.OptionType.PADDING, '\x00' * 65475))
    print(len(m.to_wire(max_size=65535)))
    binary = m.to_wire(max_size=65535)

    import struct
    binary = struct.pack('>H', len(binary)) + binary
    open('output.blob', 'wb').write(binary)
- Add script to generate largest blobs
@jelu jelu merged commit 406c187 into DNS-OARC:develop May 27, 2024
9 checks passed
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.

None yet

2 participants