fix(plugin): check trunk id instead of minID in bounds validation#530
fix(plugin): check trunk id instead of minID in bounds validation#530filanov wants to merge 1 commit into
Conversation
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Hi @filanov. Thanks for your PR. I'm waiting for a k8snetworkplumbingwg member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
There was a problem hiding this comment.
Code Review
This pull request fixes a bug in SplitVlanIds by replacing an incorrect check on minID with a check on the actual trunk id, and adds a corresponding test case. The review feedback correctly points out that the boundary check is off because the maximum valid VLAN ID is 4095; therefore, the validation should reject 4096 (using id >= 4096 instead of id > 4096). Additionally, the test case should be updated to use 4096 to properly verify this boundary condition.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: filanov, ykulazhenkov The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
The condition was comparing minID against 4096 instead of the actual id value, allowing out-of-range individual trunk IDs to slip through undetected. Signed-off-by: Michael Filanov <mfilanov@nvidia.com>
434fa1b to
0271222
Compare
|
@phoracek can you please take a look at this PR? |
The condition was comparing minID against 4096 instead of the actual id value, allowing out-of-range individual trunk IDs to slip through undetected.
What this PR does / why we need it:
Special notes for your reviewer:
Release note: