From 0c226bc1739dff59a4f81b1cd130f28a8b1106a3 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 22 Apr 2020 10:52:31 +0200 Subject: [PATCH] src/config/network/helper.rs: fix CIDR regex --- src/config/network/helper.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/network/helper.rs b/src/config/network/helper.rs index 2dc0e8cb..5aa5d362 100644 --- a/src/config/network/helper.rs +++ b/src/config/network/helper.rs @@ -58,10 +58,10 @@ pub fn parse_cidr(cidr: &str) -> Result<(String, u8, bool), Error> { lazy_static! { pub static ref CIDR_V4_REGEX: Regex = Regex::new( - concat!(r"^(", IPV4RE!(), r")(?:/(\d{1,2}))?$") + concat!(r"^(", IPV4RE!(), r")(?:/(\d{1,2}))$") ).unwrap(); pub static ref CIDR_V6_REGEX: Regex = Regex::new( - concat!(r"^(", IPV6RE!(), r")(?:/(\d{1,3}))?$") + concat!(r"^(", IPV6RE!(), r")(?:/(\d{1,3}))$") ).unwrap(); }