aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeer <himbeer@disroot.org>2024-08-19 22:02:19 +0200
committerHimbeer <himbeer@disroot.org>2024-08-19 22:02:19 +0200
commit7a0aad65f07deefbf17052682e6908694d79e30b (patch)
treed2c1b95788cf1db4ed78f86eb1b636855717c45f
parentcfb91b3125e35d4d02c78dfa1fd30928d29adf1c (diff)
Fix local reverse queries panicking with EmptyLabel
Commit aee8706bc84d98e96f7a30f1c3dbc1411f4d06a6 appended dots to hosts file entries in the HashMap but failed to remove another string concatenation which caused an empty label to appear in the FQDN being reconstructed from a domainless hostname. An example for a faulty FQDN is somemachine..searchdomain.lan. Reverse lookups are now fully functional again.
-rw-r--r--src/main.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index ceec7bd..c48f813 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -360,7 +360,6 @@ fn handle_query(
} else if q.q_type == QType::PTR {
if let Some(entry) = file_entry(&hostname, hosts.clone()) {
let name = entry.0
- + "."
+ &domain
.as_ref()
.map(|domain| domain.to_utf8())