Skip to content

Commit

Permalink
Don't crash on NXDOMAIN results from the pgeodns zone
Browse files Browse the repository at this point in the history
  • Loading branch information
abh committed Aug 28, 2012
1 parent c1ad24b commit 02ddd28
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ func setupPgeodnsZone(Zones Zones) {
Zone.Labels = make(labels)
Zone.Origin = zoneName
Zone.LenLabels = dns.LenLabels(Zone.Origin)
label := new(Label)
label.Records = make(map[uint16]Records)
label.Weight = make(map[uint16]int)
Zone.Labels[""] = label
setupSOA(Zone)
Zones[zoneName] = Zone
dns.HandleFunc(zoneName, setupServerFunc(Zone))
}
Expand Down

0 comments on commit 02ddd28

Please sign in to comment.