[PR #2673] [MERGED] Parse unknown opcodes #3228

Closed
opened 2026-03-16 11:32:15 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/2673
Author: @divergentdave
Created: 12/13/2024
Status: Merged
Merged: 12/16/2024
Merged by: @djc

Base: mainHead: david/unknown-opcode


📝 Commits (2)

  • 8c081e2 proto: allow parsing unknown opcodes
  • fe3427a conformance: add a variant of RFC 8906 8.1.4 test

📊 Changes

4 files changed (+77 additions, -20 deletions)

View changed files

📝 conformance/packages/conformance-tests/src/name_server/rfc8906/basic.rs (+27 -1)
📝 conformance/packages/conformance-tests/src/resolver/dns/rfc8906/basic.rs (+31 -1)
📝 crates/proto/src/op/header.rs (+1 -1)
📝 crates/proto/src/op/op_code.rs (+18 -17)

📄 Description

This adds an Unknown variant to the OpCode enum, so that all opcodes can be parsed and represented. Previously, a NOTIMP return code could only be returned for NOTIFY, STATUS, and (conditionally) UPDATE, while all reserved opcodes would get no response, due to a decoding error in the header. Eliminating that decoding error allows returning NOTIMP in some cases. This is thus a partial fix for #2572. The RFC 8906 tests are still failing, due to an unrelated decoding error later on, but I added two more test variants that only exercise the unknown opcode code path.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/2673 **Author:** [@divergentdave](https://github.com/divergentdave) **Created:** 12/13/2024 **Status:** ✅ Merged **Merged:** 12/16/2024 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `david/unknown-opcode` --- ### 📝 Commits (2) - [`8c081e2`](https://github.com/hickory-dns/hickory-dns/commit/8c081e28f8dc476255ba89052031b066a6f6216c) proto: allow parsing unknown opcodes - [`fe3427a`](https://github.com/hickory-dns/hickory-dns/commit/fe3427a37b1fc06110e7515e5a7b94ce64fd301c) conformance: add a variant of RFC 8906 8.1.4 test ### 📊 Changes **4 files changed** (+77 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `conformance/packages/conformance-tests/src/name_server/rfc8906/basic.rs` (+27 -1) 📝 `conformance/packages/conformance-tests/src/resolver/dns/rfc8906/basic.rs` (+31 -1) 📝 `crates/proto/src/op/header.rs` (+1 -1) 📝 `crates/proto/src/op/op_code.rs` (+18 -17) </details> ### 📄 Description This adds an `Unknown` variant to the `OpCode` enum, so that all opcodes can be parsed and represented. Previously, a `NOTIMP` return code could only be returned for `NOTIFY`, `STATUS`, and (conditionally) `UPDATE`, while all reserved opcodes would get no response, due to a decoding error in the header. Eliminating that decoding error allows returning `NOTIMP` in some cases. This is thus a partial fix for #2572. The RFC 8906 tests are still failing, due to an unrelated decoding error later on, but I added two more test variants that only exercise the unknown opcode code path. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:32:15 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#3228
No description provided.