Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e22ffc6

Browse files
committedJul 15, 2024·
Fixed selector logic
1 parent 63ab021 commit e22ffc6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎mirrord/layer/src/socket/dns_selector.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use mirrord_config::feature::network::{
44
dns::{DnsConfig, DnsFilterConfig},
55
filter::AddressFilter,
66
};
7+
use tracing::Level;
78

89
use crate::detour::{Bypass, Detour};
910

@@ -19,6 +20,7 @@ pub struct DnsSelector {
1920

2021
impl DnsSelector {
2122
/// Bypasses queries that should be done locally.
23+
#[tracing::instrument(level = Level::DEBUG, ret)]
2224
pub fn check_query(&self, node: &str, port: u16) -> Detour<()> {
2325
let matched = self
2426
.filters
@@ -61,7 +63,7 @@ impl From<&DnsConfig> for DnsSelector {
6163
let (filters, filter_is_local) = match &value.filter {
6264
Some(DnsFilterConfig::Local(filters)) => (Some(filters.deref()), true),
6365
Some(DnsFilterConfig::Remote(filters)) => (Some(filters.deref()), false),
64-
None => (None, false),
66+
None => (None, true),
6567
};
6668

6769
let filters = filters

0 commit comments

Comments
 (0)
Please sign in to comment.