hints: reverse lookup keep name ordering from host file
Resolve #204 (closed) hints: interpretation of hosts file with multiple entries If one line contains multiple names for the address, the first name should be the canonical one (i.e. used for reverse lookups). In the current implementation wins top level domain according to domain tree.
This change saves PTR records in separate tree. Names are
oredered according to order in host file.
Merge request reports
Activity
assigned to @vcunat
The only remaining problem I can see: if you re-define a name, the old one keeps preference. The user certainly can remove it explicitly before adding, but it would seem more natural to choose one of the following semantics:
- the last one wins,
- we return all the records (for A/AAAA – probably not for PTR),
- the function fails with an error.
Oh, right, I was slightly confused at that time. The only thing I'm considering now is whether to switch the PTR so that the last one wins; EDIT: and also whether the non-canonical items from hosts-like files should even get a (shadowed) PTR addition.
Edited by Vladimír Čunátadded 1 commit
- fbe88ccd - hints: change the handling of repeated hints (again)
added 55 commits
-
fbe88ccd...e7908bd5 - 53 commits from branch
master
- e7b07e35 - Merge branch 'master' into hints-name-order
- 1b27fe04 - update NEWS, docs
-
fbe88ccd...e7908bd5 - 53 commits from branch
changed milestone to %1.3.2
Another nitpick, when I'm rewriting parts of this – when reading a hosts-like file, if we encounter some garbage, we simply ignore it. I'll change that to actually throw an error instead (and consequently fail the process if this was due to a command given in the config file). I hope you don't mind that change.
added 1 commit
- 1c189d65 - hints: add (shadowed) PTR records for non-canonical names
added 1 commit
- ffdd55a9 - hints.add_hosts: error out if a bad entry is encountered
added 10 commits
-
ffdd55a9...da26b547 - 9 commits from branch
master
- 403660e4 - Merge branch 'master' into hints-name-order
-
ffdd55a9...da26b547 - 9 commits from branch
mentioned in commit 8d37a266