Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.
This repository was archived by the owner on Apr 14, 2026. It is now read-only.

bug or feature? #25

@madestro

Description

@madestro

Otro posible Bug

Añadir que existe otro posible Bug al momento de enviar una consulta terminada en "."

Ya que si se envía la consulta con el nombre "test.cl." en vez de solo "test.cl", la función create_dns_query por alguna razón cambia el rtype original a 0 y por lo tanto en la consulta que le llega al Server, en la sección Question se ve un UNKNOWN(0).

Lo mismo pasa con la clase que se convierte en UNKNOWN(256)

El ejemplo concreto sería:

El Cliente envia:


let mut domain_name = DomainName::new();
domain_name.set_name(String::from("test.cl."));
let rrtype = "A";
let rclass = "IN";

match udp_client.query(domain_name, rrtype, rclass).await {
    Ok(response) => println!("Response for test.cl.: {:?}", response),
    Err(e) => eprintln!("Query failed for test.cl.: {}", e),
}

El Server printea:

DnsMessage { header: Header { id: 6577, qr: true, op_code: 0, aa: true, tc: false, rd: false, ra: false, ad: false, cd: false, z: false, rcode: NXDOMAIN, qdcount: 1, ancount: 0, nscount: 0, arcount: 0 }, question: Question { qname: DomainName { name: "test.cl" }, rrtype: UNKNOWN(0), rclass: UNKNOWN(256) }, answer: [], authority: [], additional: [] }

Esto no debería pasar según tento entendido

Originally posted by @konegoro in #24

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions