CC: | "Tomas Hozza" <thozza@redhat.com> |
Subject: | [PATCH] Make nslookup lookup both A and AAAA records by default |
Date: | Thu, 20 Aug 2015 11:15:05 -0400 (EDT) |
To: | bind-suggest@isc.org |
From: | "Jakub Luzny" <jluzny@redhat.com> |
Hello,
I'm sending a patch that changes the default behavior of nslookup. Currently, nslookup fetches only A records by default. As the IPv6 transition moves ahead, I think it's unreasonable to expect the user to manually specify that he wants an AAAA query.
Changes:
1) Modified nslookup's default behavior to host-like behavior. After receiving reply to A query, it sends an AAAA query. This is only default behavior, it's disabled when user specifies type on command line or in interactive mode.
2) Modified the format of printing an AAAA response to be the same like for a A response.
Original:
> star.c10r.facebook.com has AAAA address 2a03:2880:f01c:2:face:b00c:0:1
Patched:
> Name: star.c10r.facebook.com
> Address: 2a03:2880:f01c:2:face:b00c:0:1
3) Disabled "Authoritative answers can be found from:" output for AAAA query, as it was already disabled for A query and I don't see any reason for different behavior
Example outputs:
1)
Original:
$ nslookup www.facebook.com
Server: 10.38.5.26
Address: 10.38.5.26#53
Non-authoritative answer:
www.facebook.com canonical name = star.c10r.facebook.com.
Name: star.c10r.facebook.com
Address: 31.13.93.3
Patched:
$ ./nslookup www.facebook.com
Server: 10.38.5.26
Address: 10.38.5.26#53
Non-authoritative answer:
www.facebook.com canonical name = star.c10r.facebook.com.
Name: star.c10r.facebook.com
Address: 31.13.93.3
Name: star.c10r.facebook.com
Address: 2a03:2880:f01c:2:face:b00c:0:1
2)
Original:
$ nslookup v6.vvv.facebook.com
Server: 10.38.5.26
Address: 10.38.5.26#53
Non-authoritative answer:
*** Can't find v6.vvv.facebook.com: No answer
Patched:
$ ./nslookup v6.vvv.facebook.com
Server: 10.38.5.26
Address: 10.38.5.26#53
Non-authoritative answer:
Name: v6.vvv.facebook.com
Address: 2a03:2880:20:8f08:face:b00c:0:1
3)
Original:
$ nslookup -type=aaaa www.facebook.com
Server: 10.38.5.26
Address: 10.38.5.26#53
Non-authoritative answer:
www.facebook.com canonical name = star.c10r.facebook.com.
star.c10r.facebook.com has AAAA address 2a03:2880:f01c:2:face:b00c:0:1
Authoritative answers can be found from:
Patched:
$ ./nslookup -type=aaaa www.facebook.com
Server: 10.38.5.26
Address: 10.38.5.26#53
Non-authoritative answer:
www.facebook.com canonical name = star.c10r.facebook.com.
Name: star.c10r.facebook.com
Address: 2a03:2880:f01c:2:face:b00c:0:1
Jakub Luzny
Message body is not shown because sender requested not to inline it.