Skip to content

Commit

Permalink
fix rfc4193 related integration test failures
Browse files Browse the repository at this point in the history
re issue #209

they would fail _sometimes_
so far so good with this change

this change inserts
fd23:3cca:ac27:8e85:c199:9300::/88

instead of
fd23:3cca:ac27:8e85:c199:93e7:50c5:1646/88

into the reverse ptr authority

actually, maybe to_ptr_soa_name should do this

The real app init() does a similar thing, so
we'll need to address that too. Not sure if this the
correct fix yet.
  • Loading branch information
laduke committed Mar 14, 2023
1 parent edcc1db commit 264a8b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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(),
Expand Down

0 comments on commit 264a8b6

Please sign in to comment.