Repository navigation
fix(e2e): accept explicit UDP matcher for DHCP rule - #9881
Open
Ben Brady (benjamin-brady) wants to merge 1 commit into
Open
Ben Brady (benjamin-brady) wants to merge 1 commit into
Ben Brady (benjamin-brady) wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b04f7409-4d1d-4525-9497-b2b5fef387c3
Contributor
Windows Unit Test Results 3 files 18 suites 49s ⏱️ Results for commit ce5adbb. |
Contributor
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The narrowly scoped matcher change has focused regression tests and no unresolved substantive issues.
No open issues 🎉
What changed in this PR
Fixes the E2E eBPF iptables compatibility validator to accept both equivalent DHCP rule spellings without changing node provisioning behavior.
Changes:
- Allows the optional explicit
-m udpmatcher while requiring an exact DHCP INPUT UDP/68 ACCEPT rule. - Adds regression tests for both accepted spellings and incorrect ports, targets, and protocols.
| File | Description |
|---|---|
| e2e/scenario/validators_test.go | Adds positive and negative DHCP rule matching tests. |
| e2e/scenario/validation.go | Updates the DHCP pattern to accept the optional UDP matcher. |
Review effort: Balanced
Contributor
This branch has not been deployed
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.
What this PR does / why we need it:
The eBPF iptables compatibility validator already accepts the DHCP INPUT UDP/68 ACCEPT rule when rendered without an explicit protocol matcher, but rejects the equivalent
-m udpspelling emitted byiptables-save. Accept both exact spellings while continuing to reject other ports, targets, and protocols.Validation:
go -C e2e test ./scenario -run '^TestIPTablesDHCPRulePattern$' -count=1— passed (the test failed before the fix on the explicit-m udpspelling).go -C e2e test ./scenario -count=1— passed.git diff --check— passed.Which issue(s) this PR fixes:
N/A (no linked issue).