NLnetLabs / domain

A DNS library for Rust.

Home Page:https://nlnetlabs.nl/projects/domain/about/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lookup example cannot resolve IPv6 address

pemensik opened this issue · comments

$  target/debug/examples/lookup example.org
Found answer for example.org
example.org has address 2606:2800:220:1:248:1893:25c8:1946
example.org has address 93.184.216.34
$  target/debug/examples/lookup 93.184.216.34
$  target/debug/examples/lookup 2606:2800:220:1:248:1893:25c8:1946
thread 'main' panicked at 'internal error: entered unreachable code', src/resolv/lookup/addr.rs:137:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Er, oops:

        7 => b'7',
        8 => b'8',
        10 => b'A',
        11 => b'B',

That said, looks like the function generating the domain name for the IPv6 reverse lookup is broken in more ways.

I were not able to find, why it should not work with IPv6 address. But I am a newbie in Rust, so it does not mean much. But I thought IPv6 is supposed to be working from the code.