Commit a84e31f
committed
Add resolver fallback to the null resolver (getaddrinfo)
This enables a best-effort, two-step resolution when a resolver is
configured:
- if the DNS resolver returns any domain, that record is used with its
corresponding TTL
- otherwise, the module tries resolving the name with the default, NULL
resolver, which is just a wrapper over getaddrinfo
* if the resolution succeeds, this was likely a domain in /etc/hosts
or an IP literal, which was not known by the DNS server. The
associated record has no TTL value and uses the default director
TTL.
* if the resolution fails, this was likely a bad domain. No records
are stored and a new request is made after the default director TTL,
as was done previously.1 parent 2d51da7 commit a84e31f
File tree
3 files changed
+75
-30
lines changed- src
- tests/resolver
3 files changed
+75
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
| 778 | + | |
778 | 779 | | |
779 | 780 | | |
780 | 781 | | |
| |||
783 | 784 | | |
784 | 785 | | |
785 | 786 | | |
| 787 | + | |
786 | 788 | | |
787 | 789 | | |
788 | 790 | | |
789 | 791 | | |
790 | 792 | | |
791 | 793 | | |
792 | | - | |
793 | | - | |
794 | | - | |
| 794 | + | |
| 795 | + | |
795 | 796 | | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
802 | 807 | | |
803 | | - | |
804 | | - | |
805 | 808 | | |
806 | | - | |
| 809 | + | |
807 | 810 | | |
808 | | - | |
809 | | - | |
| 811 | + | |
| 812 | + | |
810 | 813 | | |
811 | | - | |
812 | | - | |
813 | | - | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
814 | 817 | | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
826 | 831 | | |
827 | | - | |
828 | | - | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
829 | 844 | | |
830 | 845 | | |
831 | 846 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
309 | 312 | | |
310 | 313 | | |
311 | 314 | | |
| |||
0 commit comments