Skip to content

Comments

Added basic support for DNS cookies#56

Open
zbalkan wants to merge 6 commits intoTechnitiumSoftware:masterfrom
zbalkan:feat/add-dns-cookie-support
Open

Added basic support for DNS cookies#56
zbalkan wants to merge 6 commits intoTechnitiumSoftware:masterfrom
zbalkan:feat/add-dns-cookie-support

Conversation

@zbalkan
Copy link
Contributor

@zbalkan zbalkan commented Feb 18, 2026

Adds DNS Cookies support across TechnitiumLibrary EDNS(0) COOKIE parsing, server-side cookie generation/validation, and request/response handling per RFC 7873/9018.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds DNS Cookie support to the TechnitiumLibrary DNS implementation per RFC 7873/9018. It introduces a new EDnsCookieOptionData class to handle EDNS(0) COOKIE parsing and validation, and updates the EDnsOption class to support null option data and handle COOKIE options during serialization/deserialization.

Changes:

  • Added EDnsCookieOptionData class for RFC 7873 DNS Cookie support with client (8 bytes) and optional server cookies (8-32 bytes)
  • Updated EDnsOption to handle COOKIE option code parsing and null data scenarios
  • Modified EDnsOption.WriteTo() and SerializeTo() to support EDNS options with zero-length data

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
TechnitiumLibrary.Net/Dns/EDnsOptions/EDnsOption.cs Added COOKIE case in parsing switch, null data handling in WriteTo/SerializeTo, and nullable UncompressedLength calculation
TechnitiumLibrary.Net/Dns/EDnsOptions/EDnsCookieOptionData.cs New sealed class implementing DNS Cookie EDNS option with validation, serialization, and equality support

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zbalkan
Copy link
Contributor Author

zbalkan commented Feb 18, 2026

Okay, Copilot has some valid suggestions. I'll fix them tomorrow.

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