Skip to main content

parse_net

Function parse_net 

Source
pub fn parse_net(entry: &str) -> Result<IpNet>
Expand description

Parses one allow-list entry as a network.

Accepts both CIDR notation (192.168.1.0/24, fd00::/8) and a bare address (203.0.113.7), the latter becoming a host route — writing a /32 for a single machine is noise an operator should not have to remember.