From 4d2e355011a18362f036246460e0c6f32e63a3f9 Mon Sep 17 00:00:00 2001 From: Celeste Date: Wed, 13 Apr 2022 11:37:00 +0100 Subject: [PATCH] actually fix that bug --- Cargo.toml | 2 +- src/dns.rs | 2 +- src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7285fef..0ce94e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "packeteer" description = "An attempt at a Rust library that can be used to assist in programmatically analysing, serving and handling received protocol packets." -version = "0.4.2" +version = "0.4.3" edition = "2021" authors = ["Celeste "] license = "MPL-2.0" diff --git a/src/dns.rs b/src/dns.rs index b9a4647..f82d806 100644 --- a/src/dns.rs +++ b/src/dns.rs @@ -163,7 +163,7 @@ pub fn construct(packet: Vec) -> DnsPacket { i = i + 1; v = v - 1; } - if zrtype == RecordType::TXT { + if fromtype(zrtype) == 16 { data.remove(0 as usize); } let ans = DnsAnswer { name: 0xc00c, rtype: zrtype, class: class, ttl: ttl, data: data }; diff --git a/src/lib.rs b/src/lib.rs index 9e5a881..3e79593 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -17,7 +17,7 @@ //! An example of request generation using the http1 module: //! //! ```no_run -//! use packeteer::http1::* +//! use packeteer::http1::*; //! //! fn main() { //! // generate_request(method, host, location, body)