Fix NSEC(3) with no bitmap
This commit is contained in:
parent
5ec63eab34
commit
6e6b67afd5
|
@ -16,8 +16,6 @@ things that need to be fixed.
|
|||
|
||||
## BUGS
|
||||
|
||||
* NSEC3 records with no bitmap (empty non-terminals) are not correctly verified
|
||||
* This means they are not correctly put in wirefmt also;
|
||||
* Not completely sure wildcard handling when verifying is correct;
|
||||
* Timeouts - they may be set way too short.
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ func TestDnskey(t *testing.T) {
|
|||
t.Fail()
|
||||
}
|
||||
// Coefficient looks fishy...
|
||||
// println(pubkey.(*RR_DNSKEY).PrivateKeyString(privkey))
|
||||
t.Logf("%s", pubkey.(*RR_DNSKEY).PrivateKeyString(privkey))
|
||||
}
|
||||
|
||||
|
||||
|
|
5
msg.go
5
msg.go
|
@ -420,6 +420,11 @@ func packStructValue(val reflect.Value, msg []byte, off int, compression map[str
|
|||
}
|
||||
case "NSEC": // NSEC/NSEC3
|
||||
// This is the uint16 type bitmap
|
||||
if val.Field(i).Len() == 0 {
|
||||
// Do absolutely nothing
|
||||
break
|
||||
}
|
||||
|
||||
lastwindow := uint16(0)
|
||||
length := uint16(0)
|
||||
if off+2 > len(msg) {
|
||||
|
|
Loading…
Reference in New Issue