Skip to content

Commit

Permalink
ANY
Browse files Browse the repository at this point in the history
- Issue #145: `dns`: Re-add type `ANY`
  • Loading branch information
jelu committed Mar 22, 2021
1 parent 7597a68 commit 924e6ea
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/gen-qtype.c.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@
const perf_qtype_t qtype_table[] = {""")

for k, v in qtype.items():
if k == "*" or k == "Unassigned" or k == "Reserved":
if k == "Unassigned" or k == "Reserved":
continue
if k == "*":
k = "ANY"
print(" { \"%s\", %d }," % (k, v))

print(""" { 0, 0 }
Expand Down
1 change: 1 addition & 0 deletions src/qtype.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ const perf_qtype_t qtype_table[] = {
{ "AXFR", 252 },
{ "MAILB", 253 },
{ "MAILA", 254 },
{ "ANY", 255 },
{ "URI", 256 },
{ "CAA", 257 },
{ "AVC", 258 },
Expand Down
1 change: 1 addition & 0 deletions src/test/datafile5
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ google.com TYPE1
google.com TYPE28
google.com TYPE99999999
google.com TYPE99999999 ignored
google.com ANY
2 changes: 1 addition & 1 deletion src/test/test2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ grep -q "Queries sent: *2" test2.out
# TYPE test
../dnsperf -s $ip -d "$srcdir/datafile5" -n 1 -W >test2.out
cat test2.out
grep -q "Queries sent: *3" test2.out
grep -q "Queries sent: *4" test2.out
grep -q "Warning: invalid qtype: TYPE99999999" test2.out

done # for ip
Expand Down

0 comments on commit 924e6ea

Please sign in to comment.