Reproduction
moshcode dns install --port abc
Actual behavior
The command exits successfully and prints resolver configuration containing invalid values such as:
The generated dnsmasq entries also end in #NaN. Passing --write can therefore persist unusable system resolver configuration. dns start accepts the same malformed resolver port, while malformed --parking-port values are only discovered after startup work begins.
Values such as 0, 1.5, 1e3, and ports above 65535 are accepted or converted as well.
Expected behavior
Both DNS port flags should accept only decimal integers from 1 through 65535 and return a controlled non-zero exit before fetching TLDs, writing configuration, or opening sockets.
Reproduction
Actual behavior
The command exits successfully and prints resolver configuration containing invalid values such as:
DNS=127.0.0.1:NaNThe generated dnsmasq entries also end in
#NaN. Passing--writecan therefore persist unusable system resolver configuration.dns startaccepts the same malformed resolver port, while malformed--parking-portvalues are only discovered after startup work begins.Values such as
0,1.5,1e3, and ports above 65535 are accepted or converted as well.Expected behavior
Both DNS port flags should accept only decimal integers from 1 through 65535 and return a controlled non-zero exit before fetching TLDs, writing configuration, or opening sockets.