GetDNSConfig() ignores -4 and -6 flags #26
Labels
No labels
Priority: High
Priority: Low
Priority: Medium
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: sam/awl#26
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
To reproduce:
awl -4
orawl -6
Approximately half of the time something like
dial udp4: address [IPv6]: no suitable address found
will happenWhat happens:
At
resp.Answers.Server = resolv.Servers[rand.Intn(len(resolv.Servers))]
, the program grabs a random IP address from /etc/resolv.conf
What should happen
resp.Answers.Server = resolv.Servers[rand.Intn(len(resolv.Servers))]
should be refactored to only return IPv4 addresses if
-4
is passed or IPv6 addresses if-6
is passed