dog icon indicating copy to clipboard operation
dog copied to clipboard

Error [network]: invalid port value -- no matter what

Open ghost opened this issue 5 years ago • 4 comments

  • The version of dog being used (dog --version)
C:\WINDOWS\system32>dog --version --color=never
dog ● command-line DNS client
v0.1.0
https://dns.lookup.dog/
  • The command-line arguments you are using

dog --color=never example.net

  • Your operating system and hardware platform

Windows 10 Version 1909 (OS Build 18363.1139)


With DOG_DEBUG=1:

C:\WINDOWS\system32>dog --color=never example.net
[38;5;243m[[0m[36mINFO[0m dog[38;5;243m][0m Running with options -> Options {
    requests: RequestGenerator {
        inputs: Inputs {
            domains: [
                Labels {
                    segments: [
                        (
                            7,
                            "example",
                        ),
                        (
                            3,
                            "net",
                        ),
                    ],
                },
            ],
            types: [
                1,
            ],
            classes: [
                IN,
            ],
            resolvers: [
                SystemDefault,
            ],
            transport_types: [
                Automatic,
            ],
        },
        txid_generator: Random,
        edns: SendAndHide,
        protocol_tweaks: ProtocolTweaks {
            set_authoritative_flag: false,
            set_authentic_flag: false,
            set_checking_disabled_flag: false,
            udp_payload_size: None,
        },
    },
    measure_time: false,
    format: Text(
        Never,
        TextFormat {
            format_durations: true,
        },
    ),
}
[38;5;243m[[0m[34mDEBUG[0m dog::resolve[38;5;243m][0m Found network adapter "{8BDFCD10-EE2C-4414-ABB3-2DDDE46042E4}"
[38;5;243m[[0m[34mDEBUG[0m dog::resolve[38;5;243m][0m Found nameserver V6(2a00:1028:c000:ba6:828c:97ff:fed7:8b82)
[38;5;243m[[0m[36mINFO[0m dns_transport::udp[38;5;243m][0m Opening UDP socket
Error [network]: invalid port value

C:\WINDOWS\system32>

ghost avatar Nov 09 '20 17:11 ghost

My inkling is that it's finding an IPv6 nameserver address, but is treating it like a host:port value, complaining that the port isn't formatted correctly. (I didn't test the IPV6-and-Windows combination of things)

Could you please check whether passing in an IPv4 nameserver explicitly, such as dog --color=never example.net @8.8.8.8, makes the problem go away?

ogham avatar Nov 09 '20 18:11 ogham

@ogham yup, that one works

ghost avatar Nov 09 '20 18:11 ghost

Hello, I just compiled/installed 0.2.0-pre with the PR #62 merged and it still does not work.

BTW the workaround with specifying @8.8.8.8 does not seem to work either:

PS C:\Users\roberto\Src\rs\dog> dog --query example.net @8.8.8.8
ParserError:
Line |
   1 |  dog --query example.net @8.8.8.8
     |                             ~
     | Missing property name after reference operator.

keltia avatar Apr 07 '21 08:04 keltia

 | Missing property name after reference operator.

This error occurs because you are using @ in Powershell, it has a special meaning. That syntax works if you surround the nameserver argument with quotes:

dog --query example.net "@8.8.8.8"

But I can also confirm that compiling from the current master doesn't solve the issue on my system, I do have an IPv6 DNS configured (within my local network), running Windows 10.

chk1 avatar Oct 06 '21 16:10 chk1