Skip to content

Commit

Permalink
fix: window DNS
Browse files Browse the repository at this point in the history
  • Loading branch information
XOR-op committed Sep 15, 2024
1 parent e4eabad commit 78ac081
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion boltconn/src/network/dns/dns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ impl<P: RuntimeProvider> GenericDns<P> {
resp.add_answer(ans);
Ok(resp.to_vec()?)
}
RecordType::AAAA => Ok(resp.to_vec()?),
RecordType::AAAA | RecordType::PTR => Ok(resp.to_vec()?),
_ => err,
}
}
Expand Down
4 changes: 2 additions & 2 deletions boltconn/src/platform/sys/windows_sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pub struct SystemDnsHandle {
}

impl SystemDnsHandle {
pub fn new(dns_addr: Ipv4Addr, _tun_name: &str, outbound_name: &str) -> io::Result<Self> {
pub fn new(dns_addr: Ipv4Addr, tun_name: &str, outbound_name: &str) -> io::Result<Self> {
// From https://github.com/dandyvica/resolver/blob/main/src/lib.rs
let mut list: Vec<DnsRecord> = Vec::new();

Expand Down Expand Up @@ -120,7 +120,7 @@ impl SystemDnsHandle {
let iface_index = (*p).Ipv6IfIndex;

// skip non-outbound interfaces
if !(iface_name == outbound_name) {
if iface_name != outbound_name && iface_name != tun_name {
p = (*p).Next;
continue;
}
Expand Down

0 comments on commit 78ac081

Please sign in to comment.