netutil

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package netutil holds small, dependency-free networking helpers shared across packages that have no other reason to depend on one another (e.g. the bundler and the conformance validators).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAnySourceCIDR

func IsAnySourceCIDR(cidr string) bool

IsAnySourceCIDR reports whether cidr parses to a /0 prefix (covers every address), e.g. 0.0.0.0/0 or ::/0, which leaves a LoadBalancer open to the entire internet despite a non-empty source-range list. Unparseable entries return false: an invalid CIDR cannot widen exposure because the cloud LB would reject it before the source-range list takes effect.

Limitation: this matches only a literal /0 prefix. It does not detect a union of narrower subnets that together cover the whole address space (e.g. 0.0.0.0/1 + 128.0.0.0/1) — a deliberate-evasion case nobody hits by accident, left as a documented limitation rather than expanded into range-union math.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL