Merging upstream version 2.6.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 08:58:16 +01:00
parent a319d25425
commit cf2db3066a
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
7 changed files with 66 additions and 16 deletions

10
contrib/ecs-gen/README.md Normal file
View file

@ -0,0 +1,10 @@
# dnsperf-ecs-gen
Small python script to generate EDNS Client Subnet options for `dnsperf`.
Requires `dnspython` to be installed.
```
$ ./dnsperf-ecs-gen 192.168.0.1/24
-e 8:00011800c0a800
```

View file

@ -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]>")