Skip to content

Commit f5572f3

Browse files
authored
GH-524: Disable entry_dns (#526)
1 parent 91f3b8c commit f5572f3

File tree

2 files changed

+29
-20
lines changed

2 files changed

+29
-20
lines changed

node/src/server_initializer.rs

+25-20
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use time::OffsetDateTime;
2828
use tokio::prelude::{Async, Future};
2929

3030
pub struct ServerInitializerReal {
31+
#[allow(dead_code)]
3132
dns_socket_server: Box<dyn ConfiguredByPrivilege<Item = (), Error = ()>>,
3233
bootstrapper: Box<dyn ConfiguredByPrivilege<Item = (), Error = ()>>,
3334
privilege_dropper: Box<dyn PrivilegeDropper>,
@@ -42,12 +43,13 @@ impl ServerInitializer for ServerInitializerReal {
4243
let data_directory = value_m!(multi_config, "data-directory", String)
4344
.expect("ServerInitializer: Data directory not present in Multi Config");
4445

46+
// TODO: GH-525: This card should bring back the commented out code for dns_socket_server
4547
let result: RunModeResult = Ok(())
46-
.combine_results(
47-
self.dns_socket_server
48-
.as_mut()
49-
.initialize_as_privileged(&multi_config),
50-
)
48+
// .combine_results(
49+
// self.dns_socket_server
50+
// .as_mut()
51+
// .initialize_as_privileged(&multi_config),
52+
// )
5153
.combine_results(
5254
self.bootstrapper
5355
.as_mut()
@@ -60,11 +62,11 @@ impl ServerInitializer for ServerInitializerReal {
6062
self.privilege_dropper.drop_privileges(&real_user);
6163

6264
result
63-
.combine_results(
64-
self.dns_socket_server
65-
.as_mut()
66-
.initialize_as_unprivileged(&multi_config, streams),
67-
)
65+
// .combine_results(
66+
// self.dns_socket_server
67+
// .as_mut()
68+
// .initialize_as_unprivileged(&multi_config, streams),
69+
// )
6870
.combine_results(
6971
self.bootstrapper
7072
.as_mut()
@@ -79,11 +81,12 @@ impl Future for ServerInitializerReal {
7981
type Error = ();
8082

8183
fn poll(&mut self) -> Result<Async<<Self as Future>::Item>, <Self as Future>::Error> {
82-
try_ready!(self
83-
.dns_socket_server
84-
.as_mut()
85-
.join(self.bootstrapper.as_mut())
86-
.poll());
84+
// try_ready!(self
85+
// .dns_socket_server
86+
// .as_mut()
87+
// .join(self.bootstrapper.as_mut())
88+
// .poll());
89+
try_ready!(self.bootstrapper.as_mut().poll());
8790
Ok(Async::Ready(()))
8891
}
8992
}
@@ -726,7 +729,8 @@ pub mod tests {
726729
}
727730

728731
#[test]
729-
#[should_panic(expected = "EntryDnsServerMock was instructed to panic")]
732+
// TODO: GH-525: It should panic
733+
// #[should_panic(expected = "EntryDnsServerMock was instructed to panic")]
730734
fn server_initializer_dns_socket_server_panics() {
731735
let bootstrapper = CrashTestDummy::new(CrashPoint::None, BootstrapperConfig::new());
732736
let privilege_dropper = PrivilegeDropperMock::new();
@@ -840,8 +844,8 @@ pub mod tests {
840844
[
841845
bootstrapper_init_privileged_params_arc,
842846
bootstrapper_init_unprivileged_params_arc,
843-
dns_socket_server_privileged_params_arc,
844-
dns_socket_server_unprivileged_params_arc,
847+
// dns_socket_server_privileged_params_arc, // TODO: GH-525: Fix me
848+
// dns_socket_server_unprivileged_params_arc,
845849
]
846850
.iter()
847851
.for_each(|arc_params| {
@@ -889,12 +893,13 @@ pub mod tests {
889893

890894
let result = subject.go(&mut holder.streams(), &args);
891895

896+
// TODO: GH-525: Fix me
892897
assert_eq!(
893898
result,
894899
Err(ConfiguratorError::new(vec![
895-
ParamError::new("dns-iap", "dns-iap-reason"),
900+
// ParamError::new("dns-iap", "dns-iap-reason"),
896901
ParamError::new("boot-iap", "boot-iap-reason"),
897-
ParamError::new("dns-iau", "dns-iau-reason"),
902+
// ParamError::new("dns-iau", "dns-iau-reason"),
898903
ParamError::new("boot-iau", "boot-iau-reason")
899904
]))
900905
);

node/tests/dns_round_trip_test.rs

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ use trust_dns::op::{OpCode, ResponseCode};
99
use trust_dns::rr::{DNSClass, RecordType};
1010

1111
#[test]
12+
// TODO This ignore should be lifted by GH-525
13+
#[ignore]
1214
#[serial(port53)]
1315
fn handles_two_consecutive_ipv4_dns_requests_integration() {
1416
let _node = utils::MASQNode::start_standard(
@@ -25,6 +27,8 @@ fn handles_two_consecutive_ipv4_dns_requests_integration() {
2527
}
2628

2729
#[test]
30+
// TODO This ignore should be lifted by GH-525
31+
#[ignore]
2832
#[serial(port53)]
2933
fn handles_consecutive_heterogeneous_dns_requests_integration() {
3034
let _node = utils::MASQNode::start_standard(

0 commit comments

Comments
 (0)