Repository navigation
Count a bare IPv6 endpoint as a full host - #594
Conversation
Signed-off-by: Arrobo, Gabriel <gabriel.arrobo@intel.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
IPv4-mapped IPv6 hosts remain undercounted, allowing configurations beyond the UPF shape limit.
Review effort: Balanced
Findings: 1
What changed in this PR
Corrects UPF rule-shape accounting so bare IPv6 endpoints count as full hosts rather than match-any addresses.
Changes:
- Selects host prefixes based on address family.
- Adds a shape-limit regression test and updates explanatory comments.
| File | Description |
|---|---|
| configapi/slice_operations_test.go | Tests bare IPv6 host accounting at the shape limit. |
| configapi/slice_helpers.go | Adds /128 handling for bare IPv6 endpoints. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: Arrobo, Gabriel <gabriel.arrobo@intel.com>
|
A note on how the UPF itself reads a bare IPv6 address, in case it matters for this change. Its case 1:
ipnet = ipNetFields[0] + "/32"
So the UPF installs a bare IPv6 address, including an IPv4-mapped one, as a match on any address, not a single host. Counting it as a host can merge it with an existing IPv4 The underlying oddity is arguably on the UPF side: a bare IPv6 endpoint silently matching every address is not what anyone writing it would expect. I'm happy to open a PR there so 🤖 Generated with Claude Code |

No description provided.