mirror of
https://github.com/miekg/dns.git
synced 2025-10-10 17:31:01 +02:00
Fix tests and tsig in the process
This commit is contained in:
parent
19470ba22d
commit
10a349423c
@ -61,7 +61,7 @@ func TestClientTsigAXFR(t *testing.T) {
|
|||||||
c.Net = "tcp"
|
c.Net = "tcp"
|
||||||
|
|
||||||
if a, err := c.XfrReceive(m, "85.223.71.124:53"); err != nil {
|
if a, err := c.XfrReceive(m, "85.223.71.124:53"); err != nil {
|
||||||
t.Log("Failed to setup axfr" + err.Error())
|
t.Log("Failed to setup axfr: " + err.Error())
|
||||||
t.Fail()
|
t.Fail()
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
|
2
tsig.go
2
tsig.go
@ -194,7 +194,7 @@ func TsigGenerate(m *Msg, secret, requestMAC string, timersOnly bool) ([]byte, s
|
|||||||
t.OrigId = m.Id
|
t.OrigId = m.Id
|
||||||
|
|
||||||
tbuf := make([]byte, t.Len())
|
tbuf := make([]byte, t.Len())
|
||||||
if off, err := PackRR(t, tbuf, 0, nil, false); err != nil {
|
if off, err := PackRR(t, tbuf, 0, nil, false); err == nil {
|
||||||
tbuf = tbuf[:off] // reset to actual size used
|
tbuf = tbuf[:off] // reset to actual size used
|
||||||
} else {
|
} else {
|
||||||
return nil, "", err
|
return nil, "", err
|
||||||
|
1
zone.go
1
zone.go
@ -109,6 +109,7 @@ func NewZoneData(s string) *ZoneData {
|
|||||||
// we preserve the nsec ordering of the zone (this idea was stolen from NSD).
|
// we preserve the nsec ordering of the zone (this idea was stolen from NSD).
|
||||||
// Each label is also lowercased.
|
// Each label is also lowercased.
|
||||||
func toRadixName(d string) string {
|
func toRadixName(d string) string {
|
||||||
|
// FIXME(mg): make *much* faster
|
||||||
if d == "." {
|
if d == "." {
|
||||||
return "."
|
return "."
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user