Check for more invalid cidr syntax

This commit is contained in:
William Wernert
2021-11-18 15:18:12 -05:00
parent a0425a48e6
commit 4149236cda

View File

@@ -392,6 +392,8 @@ has_uppercase() {
valid_cidr() {
# Verify there is a backslash in the string
echo "$1" | grep -qP "^[^/]+/[^/]+$" || return 1
valid_ip4_cidr_mask "$1" && return 0 || return 1
local cidr="$1"
local ip