From fcc42bbfc22092f3148e8c29f685e8dc82c60711 Mon Sep 17 00:00:00 2001 From: joalopez1206 Date: Tue, 24 Sep 2024 16:04:48 -0300 Subject: [PATCH] Refactor client.rs: commented code and update expected IP address --- src/client.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/client.rs b/src/client.rs index 012354a9..b59614ae 100644 --- a/src/client.rs +++ b/src/client.rs @@ -111,7 +111,8 @@ impl Client { Ok(response_message) => { match DnsMessage::from_bytes(&response_message) { Ok(dns_message) => { - let additional = dns_message.get_additional(); + // TODO: Verify functionality of this fragment + /*let additional = dns_message.get_additional(); let lenght = additional.len(); let a_r = additional.get(lenght - 1); match a_r { @@ -128,7 +129,7 @@ impl Client { } }, None => {}, - } + }*/ dns_message}, Err(_) => return Err(ClientError::FormatError("The name server was unable to interpret the query."))?, } @@ -218,7 +219,7 @@ mod client_test { // Err(error) => panic!("Error in the response: {:?}", error), // }; - let expected_ip: [u8; 4] = [93, 184, 216, 34]; + let expected_ip: [u8; 4] = [93, 184, 215, 14]; let answers = response.get_answer(); for answer in answers { let a_rdata = answer.get_rdata();