pdns
pdns copied to clipboard
Improve error message when invalid values for `local-address` are provided in recursor config file
Short description
Improve error message when invalid values for local-address
are provided in recursor config file. The recursor used to depend on parseService
subroutines to parse addresses. This subroutine didn't do much except "scan until colon or EOF is reached".
This PR replaces the use of parseService
with ComboAddress
which offers better parsing and error reporting for address values.
This PR also cleans up and modernizes getHostname
.
Checklist
I have:
- [X] read the CONTRIBUTING.md document
- [X] compiled this code
- [X] tested this code
- [ ] included documentation (including possible behaviour changes)
- [ ] documented the code
- [ ] added or modified regression test(s)
- [ ] added or modified unit test(s)