Reverse zones: other views' addresses aren't missing PTRs
A reverse zone's missing PTR count covers only its own view's A and AAAA records. Addresses only other views' records use are counted apart (ptr_other_views, 'Other views' in zone show, a note on the zone page) and filled only when asked: fill-ptr --other-views, zone create --fill --other-views, or the New reverse zone dialog's checkbox. This keeps one view's host names out of another view's reverse zones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d18fe18ccd
commit
6cd3f6ef4e
16 files changed
+216
-48
No files matched your search
@@ -8,7 +8,8 @@ import (
|
||||
)
|
||||
|
||||
// zoneFillPTR: POST /zones/{zone}/fill-ptr adds the PTR records a reverse
|
||||
// zone lacks for its view's A and AAAA records (docs/reverse.md).
|
||||
// zone lacks for its view's A and AAAA records; ?other_views=1 also for
|
||||
// the addresses only other views' records use (docs/reverse.md).
|
||||
func (s *Server) zoneFillPTR(w http.ResponseWriter, r *http.Request, p *auth.Principal) error {
|
||||
st, err := s.state(r)
|
||||
if err != nil {
|
||||
@@ -18,7 +19,7 @@ func (s *Server) zoneFillPTR(w http.ResponseWriter, r *http.Request, p *auth.Pri
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return s.mutate(w, r, p, "", []engine.Request{engine.NewRequest(engine.OpZoneFillPTR, z.ID, engine.LinkInput{ZoneID: z.ID})}, nil)
|
||||
return s.mutate(w, r, p, "", []engine.Request{engine.NewRequest(engine.OpZoneFillPTR, z.ID, engine.FillPTRInput{ZoneID: z.ID, OtherViews: queryBool(r, "other_views")})}, nil)
|
||||
}
|
||||
|
||||
// reverseSuggestions: GET /reverse-zones/suggestions lists the reverse
|
||||
|
||||
Reference in new issue
Block a user