[Bug 854705] Re: dig returns 0 regardless of result of query
Jeff Silverman
jeffsilverm at gmail.com
Fri Oct 23 04:56:34 UTC 2015
It turns out that the host command will do what you want.
jeffs at jeffs-desktop:~$ host www.g00gle.com 8.8.8.8
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases:
Host www.g00gle.com not found: 2(SERVFAIL)
jeffs at jeffs-desktop:~$ echo $?
1 <===================================================
jeffs at jeffs-desktop:~$ host www.google.com 8.8.8.8
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases:
www.google.com has address 216.58.216.164
www.google.com has IPv6 address 2607:f8b0:400a:805::1013
jeffs at jeffs-desktop:~$ echo $?
0
jeffs at jeffs-desktop:~$ host www.google.com 10.82.34.123
;; connection timed out; no servers could be reached
jeffs at jeffs-desktop:~$ echo $?
1
jeffs at jeffs-desktop:~$
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to bind9 in Ubuntu.
https://bugs.launchpad.net/bugs/854705
Title:
dig returns 0 regardless of result of query
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bind9/+bug/854705/+subscriptions
More information about the Ubuntu-server-bugs
mailing list