Commit 1d450af
fix(resolver): match custom DNS PTR queries case insensitively (#2191)
reverseAddresses is keyed by the output of dns.ReverseAddr, which is
always lower case, but handleReverseDNS looked the question name up
verbatim. A PTR query that uses different case (upper case hex nibbles
in ip6.arpa, an upper case IN-ADDR.ARPA suffix, or 0x20 encoding) then
missed the mapping and fell through to the next resolver.
DNS names are case insensitive, and the forward path already normalizes
both the keys and the lookup via util.ExtractDomainOnly, so this only
brings the reverse path in line.
Signed-off-by: maximilize <max@maxmax.ch>
Co-authored-by: maximilize <max@maxmax.ch>
Co-authored-by: Dimitri Herzog <dimitri.herzog@gmail.com>1 parent 288ff55 commit 1d450af
2 files changed
Lines changed: 47 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
489 | 533 | | |
490 | 534 | | |
491 | 535 | | |
| |||
0 commit comments