Skip to content

Commit 7f9fa25

Browse files
committed
fix(network): keep mediated DNS portable
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
1 parent 2d46f5b commit 7f9fa25

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • crates/openshell-supervisor-network/src

‎crates/openshell-supervisor-network/src/proxy.rs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ mod relay;
1010
use crate::identity::BinaryIdentityCache;
1111
use crate::l7::tls::ProxyTlsState;
1212
use crate::opa::{NetworkAction, OpaEngine, PolicyGenerationGuard};
13+
use crate::policy_dns::ResolvedEndpointStore;
1314
#[cfg(target_os = "linux")]
14-
use crate::policy_dns::{MappingLookupError, PolicyEndpointId, ResolvedEndpointStore};
15+
use crate::policy_dns::{MappingLookupError, PolicyEndpointId};
1516
use crate::policy_local::{POLICY_LOCAL_HOST, PolicyLocalContext};
1617
use crate::upstream_proxy::{self, UpstreamProxyConfig};
1718
use miette::{IntoDiagnostic, Result};
@@ -269,7 +270,7 @@ impl ProxyHandle {
269270
upstream_proxy_args: &upstream_proxy::UpstreamProxyArgs,
270271
backend_host_gateway: Option<IpAddr>,
271272
network_mediation_source: Option<Arc<dyn NetworkMediationSource>>,
272-
policy_dns_store: Option<Arc<crate::policy_dns::ResolvedEndpointStore>>,
273+
policy_dns_store: Option<Arc<ResolvedEndpointStore>>,
273274
) -> Result<Self> {
274275
// Use override bind_addr, fall back to policy http_addr, then default
275276
// to loopback:3128. The default allows the proxy to function when no
@@ -1863,7 +1864,7 @@ async fn handle_mediated_connection(
18631864
supplied_identity: Option<Result<ContractBinaryIdentity, ResolveError>>,
18641865
socket_addrs: Option<(SocketAddr, SocketAddr)>,
18651866
transparent_destination: Option<SocketAddr>,
1866-
policy_dns_store: Option<Arc<crate::policy_dns::ResolvedEndpointStore>>,
1867+
policy_dns_store: Option<Arc<ResolvedEndpointStore>>,
18671868
opa_engine: Arc<OpaEngine>,
18681869
identity_cache: Arc<BinaryIdentityCache>,
18691870
entrypoint_pid: Arc<AtomicU32>,

0 commit comments

Comments
 (0)