Repository navigation
hostsfile: add optional hostname checks and zone filtering - #700
Conversation
Why
|
semihalev
left a comment
There was a problem hiding this comment.
Reviewed e12b608; no actionable findings. Checked independent filter behavior, per-row DNS identity deduplication, primary/alias promotion, PTR admission, wildcard precedence and label boundaries, reload behavior, and compatibility with both settings disabled. go test -race ./middleware/hostsfile ./internal/dnsname ./config -count=1 and the documentation drift check passed. An additional temporary test exercised all non-wildcard byte values in escaped owner labels through A, CNAME and PTR import/query paths using independently packed/unpacked names. Platform CI and release builds are still running at the time of this review; this is not a claim that the complete CI run has passed. No source files changed.
|
Can you please fix the conflict issue? |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #700 +/- ##
==========================================
+ Coverage 88.70% 88.78% +0.08%
==========================================
Files 196 196
Lines 25508 25615 +107
==========================================
+ Hits 22627 22743 +116
+ Misses 2879 2870 -9
Partials 2 2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Add
hostsfilechecknamesandhostsfilezones, both disabled by default, to control which names a hosts file publishes. Name checking skips invalid ASCII hostnames with a warning; zone filtering includes each zone’s apex and descendants. Both apply before forward and reverse records are built and on reload.When either option is enabled, equivalent names are imported once per row. The first accepted normal name becomes primary, separate rows still aggregate addresses, and supported wildcards retain their row precedence. Defaults, documentation, and regression tests are updated.
Focused race tests, build, lint, allocation gates, and documentation drift checks pass. Full
make testrepeats one cache timing failure and three dnstap Unix-socket failures also reproduced on unchanged upstream.Related to discussion #684.