New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesntexist.example.org resolves on Verizon FIOS network #6676

Closed
gmarcais opened this Issue Sep 7, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@gmarcais
Contributor

gmarcais commented Sep 7, 2018

This is a rather strange problem. The unit tests use the address "doesnotexist.example.org." as a none existent address to check for resolution failure of the TCP socket (see spec/std/socket_spec.cr:505 for example). Unfortunately, this address does resolve on the FIOS network:

> dig @71.252.0.12 doesnotexist.example.org
; <<>> DiG 9.13.2 <<>> @71.252.0.12 doesnotexist.example.org
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33796
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;doesnotexist.example.org.	IN	A

;; ANSWER SECTION:
doesnotexist.example.org. 0	IN	A	92.242.140.21

;; Query time: 87 msec
;; SERVER: 71.252.0.12#53(71.252.0.12)
;; WHEN: Fri Sep 07 13:26:49 EDT 2018
;; MSG SIZE  rcvd: 69

(71.252.0.12 is the default Verizon FIOS DNS server). The Google public DNS server 8.8.8.8 on the other hand does not resolve the address. Hence, by default, unit tests fail on the Verizon network because the error reported is timeout, and not a failure of resolution.

That's rather unfortunate. Although this is not really a bug of Crystal, should we generate a random address string instead of a static one? Something like:

a = ('a'..'z').to_a
url = (0..16).map { a[rand(26)] }.join("")  + "." + (0..16).map { a[rand(26)] }.join("") + ".org"

This would have a very low probability of ever reaching a real host.

@RX14

This comment has been minimized.

Member

RX14 commented Sep 7, 2018

@gmarcais try resolving a random host, I'm going to reckon that it resolves too. It's a horrible anti-feature of certain unsavoury ISPs called nxdomain hijacking which never return an error from their DNS servers, instead redirecting you to a custom error page generated by your ISP.

So there's really nothing to fix here, please use google DNS if your ISP is shit.

@RX14 RX14 added the status:wontfix label Sep 7, 2018

@RX14 RX14 closed this Sep 7, 2018

@gmarcais

This comment has been minimized.

Contributor

gmarcais commented Sep 7, 2018

Well, I spoke too fast. Verizon DNS is just plain annoying. It resolves any URL!

> dig @71.252.0.12 iqusbnvnmdmtlqvsd.gspteoqinwdvawkne.org
; <<>> DiG 9.13.2 <<>> @71.252.0.12 iqusbnvnmdmtlqvsd.gspteoqinwdvawkne.org
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58395
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;iqusbnvnmdmtlqvsd.gspteoqinwdvawkne.org. IN A

;; ANSWER SECTION:
iqusbnvnmdmtlqvsd.gspteoqinwdvawkne.org. 0 IN A	92.242.140.21

;; Query time: 25 msec
;; SERVER: 71.252.0.12#53(71.252.0.12)
;; WHEN: Fri Sep 07 13:55:47 EDT 2018
;; MSG SIZE  rcvd: 84

Annoying. My ISP is shit indeed.

@RX14

This comment has been minimized.

Member

RX14 commented Sep 7, 2018

If you look up the AS of 92.242.140.21 you get AS45028 owned by http://www.barefruit.com/ which explains all the moneygrabbing reasons your ISP broke DNS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment