Improved IPv6 link local resolver error and add unit testing for parsing function #526
+156
−20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #512
Following the discussion on the issue #512, I wanted to improve the error messages around why a given line will fail to parse in
/etc/resolv.conf
. This PR:io.Reader
to enable easier unit-testing of the parsingPer
man resolvctl
, thedns
section specifies that nameservers may take the form: "That is, the acceptable full formats are "111.222.333.444:9953%ifname#example.com" for IPv4 and "[1111:2222::3333]:9953%ifname#example.com" for IPv6."We don't support domain names with nameservers in
/etc/resolv.conf
or per-interface nameservers.Testing
Link-Local IPv6 Address
Passing Domain Names with IP addresses
Base Case - Works