-
Notifications
You must be signed in to change notification settings - Fork 415
T8243: dhcp: add RFC9463 DNR support for Kea DHCPv4/DHCPv6 #4975
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
Open
jd82k
wants to merge
1
commit into
vyos:current
Choose a base branch
from
jd82k:dnr
base: current
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| <!-- include start from dhcp/dnr-common.xml.i --> | ||
| <leafNode name="priority"> | ||
| <properties> | ||
| <help>DNR service priority</help> | ||
| <valueHelp> | ||
| <format>u32:0-65535</format> | ||
| <description>Lower value means higher preference</description> | ||
| </valueHelp> | ||
| <constraint> | ||
| <validator name="numeric" argument="--range 0-65535"/> | ||
| </constraint> | ||
| <constraintErrorMessage>DNR priority must be between 0 and 65535</constraintErrorMessage> | ||
| </properties> | ||
| </leafNode> | ||
| <leafNode name="authentication-domain-name"> | ||
| <properties> | ||
| <help>Authentication domain name (ADN) for encrypted DNS resolver</help> | ||
| <constraint> | ||
| <validator name="fqdn"/> | ||
| </constraint> | ||
| <constraintErrorMessage>Invalid authentication domain name</constraintErrorMessage> | ||
| </properties> | ||
| </leafNode> | ||
| <!-- include end --> |
32 changes: 32 additions & 0 deletions
32
interface-definitions/include/dhcp/dnr-service-parameters.xml.i
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| <!-- include start from dhcp/dnr-service-parameters.xml.i --> | ||
| <node name="service-parameter"> | ||
| <properties> | ||
| <help>DNR service parameter</help> | ||
| </properties> | ||
| <children> | ||
| <leafNode name="alpn"> | ||
| <properties> | ||
| <help>Application-Layer Protocol Negotiation (ALPN)</help> | ||
| <completionHelp> | ||
| <list>dot doq h2 h3</list> | ||
| </completionHelp> | ||
| <constraint> | ||
| <regex>[A-Za-z0-9._-]+</regex> | ||
| </constraint> | ||
| <constraintErrorMessage>ALPN identifier may only contain letters, digits, dot, underscore, and hyphen</constraintErrorMessage> | ||
| <multi/> | ||
| </properties> | ||
| </leafNode> | ||
| #include <include/port-number.xml.i> | ||
| <leafNode name="dohpath"> | ||
| <properties> | ||
| <help>Relative DoH URI template path (example /dns-query{?dns})</help> | ||
| <constraint> | ||
| <regex>[[:graph:]]+</regex> | ||
| </constraint> | ||
| <constraintErrorMessage>DoH path must not contain whitespace</constraintErrorMessage> | ||
| </properties> | ||
| </leafNode> | ||
| </children> | ||
| </node> | ||
| <!-- include end --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| <!-- include start from dhcp/dnr-v4.xml.i --> | ||
| <tagNode name="dnr"> | ||
| <properties> | ||
| <help>Discovery of Network-designated Resolvers (DNR)</help> | ||
| <valueHelp> | ||
| <format>u32:1-9999</format> | ||
| <description>DNR instance identifier</description> | ||
| </valueHelp> | ||
| <constraint> | ||
| <validator name="numeric" argument="--range 1-9999"/> | ||
| </constraint> | ||
| <constraintErrorMessage>DNR instance identifier must be between 1 and 9999</constraintErrorMessage> | ||
| </properties> | ||
| <children> | ||
| #include <include/dhcp/dnr-common.xml.i> | ||
| <leafNode name="address"> | ||
| <properties> | ||
| <help>IPv4 address of encrypted DNS resolver</help> | ||
| <valueHelp> | ||
| <format>ipv4</format> | ||
| <description>IPv4 resolver address</description> | ||
| </valueHelp> | ||
| <constraint> | ||
| <validator name="ipv4-address"/> | ||
| </constraint> | ||
| <multi/> | ||
| </properties> | ||
| </leafNode> | ||
| #include <include/dhcp/dnr-service-parameters.xml.i> | ||
| </children> | ||
| </tagNode> | ||
| <!-- include end --> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| <!-- include start from dhcp/dnr-v6.xml.i --> | ||
| <tagNode name="dnr"> | ||
| <properties> | ||
| <help>Discovery of Network-designated Resolvers (DNR)</help> | ||
| <valueHelp> | ||
| <format>u32:1-9999</format> | ||
| <description>DNR instance identifier</description> | ||
| </valueHelp> | ||
| <constraint> | ||
| <validator name="numeric" argument="--range 1-9999"/> | ||
| </constraint> | ||
| <constraintErrorMessage>DNR instance identifier must be between 1 and 9999</constraintErrorMessage> | ||
| </properties> | ||
| <children> | ||
| #include <include/dhcp/dnr-common.xml.i> | ||
| <leafNode name="address"> | ||
| <properties> | ||
| <help>IPv6 address of encrypted DNS resolver</help> | ||
| <valueHelp> | ||
| <format>ipv6</format> | ||
| <description>IPv6 resolver address</description> | ||
| </valueHelp> | ||
| <constraint> | ||
| <validator name="ipv6-address"/> | ||
| </constraint> | ||
| <multi/> | ||
| </properties> | ||
| </leafNode> | ||
| #include <include/dhcp/dnr-service-parameters.xml.i> | ||
| </children> | ||
| </tagNode> | ||
| <!-- include end --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for 2 xml.i one for IPv4 and another for IPv6?
Can we also include IPv6 format here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We intentionally keep separate dnr-v4/dnr-v6 XML includes, with common fields already factored out into a shared include. The only remaining difference is the address family validator.
For v4-dnr we validate IPv4 hints, and for v6-dnr we validate IPv6 hints, to fail early in CLI validation rather than during Kea config load. This matches Kea’s DNR documentation: DHCPv4 DNR instances are equivalent to DHCPv6 ones except they use IPv4 (not IPv6) addresses.