Skip to content

Commit aeee069

Browse files
dmitry-markingithub-actions[bot]
authored andcommitted
network/litep2p: Switch to system DNS resolver (#9321)
Switch to system DNS resolver instead of 8.8.8.8 that litep2p uses by default. This enables full administrator control of what upstream DNS servers to use, including resolution of local names using custom DNS servers. Fixes #9298. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent d6752bb commit aeee069

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

prdoc/pr_9321.prdoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
title: 'network/litep2p: Switch to system DNS resolver'
2+
doc:
3+
- audience: Node Dev
4+
description: |-
5+
Switch to system DNS resolver instead of 8.8.8.8 that litep2p uses by default. This enables full administrator control of what upstream DNS servers to use, including resolution of local names using custom DNS servers.
6+
7+
Fixes https://github.com/paritytech/polkadot-sdk/issues/9298.
8+
crates:
9+
- name: sc-network
10+
bump: patch

substrate/client/network/src/litep2p/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,9 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkBackend<B, H> for Litep2pNetworkBac
517517
Some(crate::MAX_CONNECTIONS_ESTABLISHED_INCOMING as usize),
518518
))
519519
.with_keep_alive_timeout(network_config.idle_connection_timeout)
520+
// Use system DNS resolver to enable intranet domain resolution and administrator
521+
// control over DNS lookup.
522+
.with_system_resolver()
520523
.with_executor(executor);
521524

522525
if let Some(config) = maybe_mdns_config {

0 commit comments

Comments
 (0)