mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-08-19 04:26:45 +00:00
fix: using /32 in case of bare IPs
This commit is contained in:
@@ -79,6 +79,9 @@ func (r *handler) handleService(ctx context.Context, clt client.Client, decoder
|
||||
}
|
||||
|
||||
for _, allowed := range tnt.Spec.ExternalServiceIPs.Allowed {
|
||||
if !strings.Contains(string(allowed), "/") {
|
||||
allowed += "/32"
|
||||
}
|
||||
_, allowedIP, _ := net.ParseCIDR(string(allowed))
|
||||
for _, externalIP := range svc.Spec.ExternalIPs {
|
||||
IP := net.ParseIP(externalIP)
|
||||
|
||||
Reference in New Issue
Block a user