Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dnsviz/dnsviz.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasey Deccio <casey@deccio.net>2016-09-27 22:19:25 +0300
committerCasey Deccio <casey@deccio.net>2016-09-27 22:19:25 +0300
commit8d963533ceec68d1fd839b30f9cb56cba5272fbb (patch)
tree5cb757c96a781180ceed5470aa131ec0a594afd9
parent4acafb004aa2fc6c5b9c496ae05b88b2936620ec (diff)
Allow use of NSID EDNS option in queries
-rw-r--r--dnsviz/commands/probe.py15
-rw-r--r--doc/man/dnsviz-probe.13
2 files changed, 15 insertions, 3 deletions
diff --git a/dnsviz/commands/probe.py b/dnsviz/commands/probe.py
index c2cc225..71ae0eb 100644
--- a/dnsviz/commands/probe.py
+++ b/dnsviz/commands/probe.py
@@ -616,6 +616,10 @@ def _get_ecs_option(s):
return dns.edns.GenericOption(8, wire)
+def _get_nsid_option():
+
+ return dns.edns.GenericOption(dns.edns.NSID, b'')
+
def usage(err=None):
if err is not None:
err += '\n\n'
@@ -644,6 +648,7 @@ Options:
- specify delegation information for a domain
-D <domain>:"<ds>"[,"<ds>"...]
- specify DS records for a domain
+ -n - use the NSID EDNS option
-e <subnet>[:<prefix>]
- use the EDNS client subnet option with subnet/prefix
-E - include EDNS compatibility diagnostics
@@ -662,7 +667,7 @@ def main(argv):
try:
try:
- opts, args = getopt.getopt(argv[1:], 'f:d:l:c:r:t:64b:u:kmpo:a:R:x:N:D:e:EAs:Fh')
+ opts, args = getopt.getopt(argv[1:], 'f:d:l:c:r:t:64b:u:kmpo:a:R:x:N:D:ne:EAs:Fh')
except getopt.GetoptError as e:
usage(str(e))
sys.exit(1)
@@ -1071,8 +1076,12 @@ def main(argv):
flush = '-F' in opts
- if '-e' in opts:
- CustomQueryMixin.edns_options = [_get_ecs_option(opts['-e'])]
+ if '-n' in opts or '-e' in opts:
+ CustomQueryMixin.edns_options = []
+ if '-e' in opts:
+ CustomQueryMixin.edns_options.append(_get_ecs_option(opts['-e']))
+ if '-n' in opts:
+ CustomQueryMixin.edns_options.append(_get_nsid_option())
query_class_mixin = CustomQueryMixin
else:
query_class_mixin = None
diff --git a/doc/man/dnsviz-probe.1 b/doc/man/dnsviz-probe.1
index c1d83c7..8105a22 100644
--- a/doc/man/dnsviz-probe.1
+++ b/doc/man/dnsviz-probe.1
@@ -266,6 +266,9 @@ dnsviz probe -D example.com:dsset-example.com.
This option must be used in conjunction with the \fB-N\fR option.
.RE
.TP
+.B -n
+Use the NSID EDNS option with every DNS query issued.
+.TP
.B -e \fIsubnet\fR[\fB:\fR\fIprefix\fR]
Use the EDNS Client Subnet option with every DNS query issued, using the
specified \fIsubnet\fR and \fIprefix\fR as values. If \fIprefix\fR is not