diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-07-17 07:16:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-07-17 07:16:22 +0000 |
commit | 91d4f5165918fe2c359ef52afe624377906386c9 (patch) | |
tree | bc5eabe4dc54c564a9d3c58b49ff53675ed12225 /contrib/ecs-gen/dnsperf-ecs-gen.py | |
parent | Releasing debian version 2.5.2-1. (diff) | |
download | dnsperf-91d4f5165918fe2c359ef52afe624377906386c9.tar.xz dnsperf-91d4f5165918fe2c359ef52afe624377906386c9.zip |
Merging upstream version 2.6.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'contrib/ecs-gen/dnsperf-ecs-gen.py')
-rwxr-xr-x | contrib/ecs-gen/dnsperf-ecs-gen.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/ecs-gen/dnsperf-ecs-gen.py b/contrib/ecs-gen/dnsperf-ecs-gen.py new file mode 100755 index 0000000..9a637e2 --- /dev/null +++ b/contrib/ecs-gen/dnsperf-ecs-gen.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 + +import dns.edns +import sys + +if len(sys.argv) > 1: + opt = dns.edns.ECSOption.from_text(sys.argv[1]) + print("-e %d:%s" % (dns.edns.ECS, opt.to_wire().hex())) +else: + print("usage: dnsperf-ecs-gen.py <address/srclen[/scopelen]>") |