odhcpd: ensure zero padding on DNSSL#386
Merged
openwrt-bot merged 1 commit intoopenwrt:masterfrom Mar 16, 2026
Merged
Conversation
Contributor
Author
|
@hauke |
Contributor
Author
|
As part of my preliminary investigation, I did a sanity check to make sure I understood where things were going by writing Note that with this failure to parse the DNSSL block, that the final |
Noltari
approved these changes
Mar 16, 2026
From https://www.rfc-editor.org/rfc/rfc8106#section-5.2 regarding the DNSSL field: Because the size of this field MUST be a multiple of 8 octets, for the minimum multiple including the domain name representations, the remaining octets other than the encoding parts of the domain name representations MUST be padded with zeros. The current code leaves the trailing octets in uninitialized state, resulting in parsing errors on (at least) systemd RA clients. This commit restores the explicit zeroing of the trailing octets. Closes: openwrt/openwrt#22351 Fixes: 0a54ce0 ("odhcpd: rename iface->search -> iface->dns_search") Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com> Link: openwrt#386 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Member
|
Merged, thanks @efahl! |
Noltari
pushed a commit
to Noltari/odhcpd
that referenced
this pull request
Mar 16, 2026
From https://www.rfc-editor.org/rfc/rfc8106#section-5.2 regarding the DNSSL field: Because the size of this field MUST be a multiple of 8 octets, for the minimum multiple including the domain name representations, the remaining octets other than the encoding parts of the domain name representations MUST be padded with zeros. The current code leaves the trailing octets in uninitialized state, resulting in parsing errors on (at least) systemd RA clients. This commit restores the explicit zeroing of the trailing octets. (cherry picked from commit 160e5fa) Closes: openwrt/openwrt#22351 Fixes: 0a54ce0 ("odhcpd: rename iface->search -> iface->dns_search") Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com> Link: openwrt#386 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
From https://www.rfc-editor.org/rfc/rfc8106#section-5.2 regarding the DNSSL field:
Because the size of this field MUST be a multiple of
8 octets, for the minimum multiple including the domain
name representations, the remaining octets other than the
encoding parts of the domain name representations MUST be
padded with zeros.
The current code leaves the trailing octets in uninitialized state, resulting in parsing errors on (at least) systemd RA clients. This commit restores the explicit zeroing of the trailing octets.
Fixes: 0a54ce0
Fixes: openwrt/openwrt#22351
Tested on x86/64 snapshot: