src/config/network/helper.rs: fix CIDR regex
This commit is contained in:
parent
76cf5208cf
commit
0c226bc173
|
@ -58,10 +58,10 @@ pub fn parse_cidr(cidr: &str) -> Result<(String, u8, bool), Error> {
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
pub static ref CIDR_V4_REGEX: Regex = Regex::new(
|
pub static ref CIDR_V4_REGEX: Regex = Regex::new(
|
||||||
concat!(r"^(", IPV4RE!(), r")(?:/(\d{1,2}))?$")
|
concat!(r"^(", IPV4RE!(), r")(?:/(\d{1,2}))$")
|
||||||
).unwrap();
|
).unwrap();
|
||||||
pub static ref CIDR_V6_REGEX: Regex = Regex::new(
|
pub static ref CIDR_V6_REGEX: Regex = Regex::new(
|
||||||
concat!(r"^(", IPV6RE!(), r")(?:/(\d{1,3}))?$")
|
concat!(r"^(", IPV6RE!(), r")(?:/(\d{1,3}))$")
|
||||||
).unwrap();
|
).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue