forked from ooni/2022-04-websteps-illustrated
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use non-connected socket for UDP resolver
This diff modifies the UDP resolver inside netxlite to use a non-connected socket. We are doing this because we would like to see a better error than "connection_refused" when there's some ICMP error telling us (probably) that the target port is unreachable. While working on this topic, ensure there's not a lot of code duplication by doing the following: 1. factoring out code to ParseUDPAddr that was used both by internal/netxlite/quic.go and internal/dnsping; 2. ensuring we use the same UDP resolver engine to implement both the UDP resolver and the dnsping. While there, discover that we were not validating the query ID of received replies 🤦 and ensure now we do that. While there, recognize that we could use a better name for all the structs implementing a given kind of DNS transport. While there, recognize that we should definitely skip the dnsping entries that failed when building the URLAddress lists.
- Loading branch information
1 parent
4269e82
commit c2f7cca
Showing
14 changed files
with
358 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.