diff --git a/tests/service/mod.rs b/tests/service/mod.rs index 800e325..0a7283d 100644 --- a/tests/service/mod.rs +++ b/tests/service/mod.rs @@ -177,11 +177,14 @@ impl Service { let socket_addr = SocketAddr::new(listen_ip.clone(), 53); listen_ips.push(socket_addr); let cidr = IpNetwork::from_str(&cidr.clone()).unwrap(); + let cidr = IpNetwork::new(cidr.network(), cidr.prefix()).unwrap(); + if !ipmap.contains_key(&listen_ip) { ipmap.insert(listen_ip, cidr.network()); } if !authority_map.contains_key(&cidr) { + let cidr = IpNetwork::new(cidr.network(), cidr.prefix()).unwrap(); let ptr_authority = RecordAuthority::new( cidr.to_ptr_soa_name().unwrap(), cidr.to_ptr_soa_name().unwrap(), @@ -195,6 +198,7 @@ impl Service { if let Some(v6assign) = tn.network.config.clone().unwrap().v6_assign_mode { if v6assign.rfc4193.unwrap_or(false) { let cidr = tn.network.clone().rfc4193().unwrap(); + let cidr = IpNetwork::new(cidr.network(), cidr.prefix()).unwrap(); if !authority_map.contains_key(&cidr) { let ptr_authority = RecordAuthority::new( cidr.to_ptr_soa_name().unwrap(),