Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve rfc4193 related integration test failures #222

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ impl Launcher {
let cidr = IpNetwork::from_str(&cidr.clone())?;
ipmap.entry(listen_ip).or_insert_with(|| cidr.network());

let cidr = IpNetwork::new(cidr.network(), cidr.prefix()).unwrap();

if let Entry::Vacant(e) = authority_map.entry(cidr) {
tracing::debug!("{}", cidr.to_ptr_soa_name()?);
let ptr_authority =
Expand Down
4 changes: 4 additions & 0 deletions src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ mod tests {
IpNetwork::from_str("1.2.3.4/32").unwrap(),
LowerName::from_str("4.3.2.1.in-addr.arpa").unwrap(),
),
(
IpNetwork::from_str("fd0c:ccb7:52f7:13c4:7c99:9312:1234:5678/88").unwrap(),
LowerName::from_str("3.9.9.9.c.7.4.c.3.1.7.f.2.5.7.b.c.c.c.0.d.f.ip6.arpa").unwrap(),
)
] {
assert_eq!(item.0.to_ptr_soa_name().unwrap(), item.1);
}
Expand Down
1 change: 1 addition & 0 deletions tests/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ impl Service {
ipmap.insert(listen_ip, cidr.network());
}

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(),
Expand Down
Loading