fix(NSC): clear IPVS firewall chain for all IP families when ipvsPermitAll is false#2023
Closed
Aprazor wants to merge 1 commit intocloudnativelabs:masterfrom
Closed
Conversation
…itAll is false On dual-stack nodes, setupIpvsFirewall loops over both IPv4 and IPv6 iptables handlers. When ipvsPermitAll is false, the function used 'return nil' after clearing the chain for the first family, which skipped the second family entirely. Change to 'continue' so both IP families have their chains cleared.
Collaborator
|
Hi @Aprazor — please see my comment on #2020 (#2020 (comment)) for feedback on how to consolidate your PRs. Thanks! |
Contributor
Author
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 type of PR is this?
bug
What this PR does / why we need it:
On dual-stack nodes,
setupIpvsFirewall()loops over both IPv4 and IPv6 iptables handlers. WhenipvsPermitAllis false, the function usedreturn nilafter clearing the chain for the first IP family, which skipped the second family entirely — leaving one family's firewall chain unconfigured.The fix changes
return niltocontinueso both IP families have their chains properly cleared.Which issue(s) this PR is related to:
None found.
Was AI used during the creation of this PR?
What, if any, amount of integration testing was done with this change in a Kubernetes environment?
Unit tests pass. No integration testing — the bug only manifests on dual-stack nodes with
ipvsPermitAll=false.Does this PR introduce a breaking change?
Anything else the reviewer should know that wasn't already covered?
This is a one-word change:
return nil→continue. The bug would cause asymmetric firewall behavior on dual-stack clusters where only one IP family's IPVS firewall chain gets cleared.