Skip to content

Add IPv6 support for SecurityPolicy/NetworkPolicy#1394

Open
wenqiq wants to merge 1 commit intovmware-tanzu:mainfrom
wenqiq:topic/wenqi/securityPolicy-ipv6
Open

Add IPv6 support for SecurityPolicy/NetworkPolicy#1394
wenqiq wants to merge 1 commit intovmware-tanzu:mainfrom
wenqiq:topic/wenqi/securityPolicy-ipv6

Conversation

@wenqiq
Copy link
Contributor

@wenqiq wenqiq commented Mar 18, 2026

Add IPv6 support for SecurityPolicy and NetworkPolicy ipBlocks

Refactor IP arithmetic utilities in pkg/util/ip.go to use math/big
instead of uint32, enabling dual-stack (IPv4/IPv6) support for CIDR
range calculations including the except/exclusion logic. The previous
implementation was hardcoded to 32-bit IPv4 addresses, causing failures
when processing IPv6 CIDRs.

@codecov-commenter
Copy link

codecov-commenter commented Mar 18, 2026

Codecov Report

❌ Patch coverage is 89.47368% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.81%. Comparing base (c3a71ec) to head (44036e2).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/util/ip.go 89.47% 2 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1394      +/-   ##
==========================================
+ Coverage   76.75%   76.81%   +0.05%     
==========================================
  Files         151      151              
  Lines       21308    21329      +21     
==========================================
+ Hits        16356    16383      +27     
+ Misses       3783     3773      -10     
- Partials     1169     1173       +4     
Flag Coverage Δ
unit-tests 76.81% <89.47%> (+0.05%) ⬆️
Files with missing lines Coverage Δ
pkg/util/ip.go 84.89% <89.47%> (-1.29%) ⬇️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Wenqi Qiu <wenqi.qiu@broadcom.com>
@wenqiq wenqiq force-pushed the topic/wenqi/securityPolicy-ipv6 branch from 03550cd to 44036e2 Compare March 19, 2026 08:28
@wenqiq wenqiq changed the title [WIP]Add IPv6 support for SecurityPolicy/NetworkPolicy Add IPv6 support for SecurityPolicy/NetworkPolicy Mar 19, 2026
@wenqiq wenqiq marked this pull request as ready for review March 19, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants