nsec type list must be uint16

This commit is contained in:
Miek Gieben 2011-01-09 20:46:21 +01:00
parent 44999ab9e7
commit 15fedf72e7
3 changed files with 15 additions and 13 deletions

View File

@ -3,5 +3,4 @@
# small wrapper to easy installment # small wrapper to easy installment
make make
make -C dnssec install
make -C resolver install make -C resolver install

View File

@ -67,6 +67,7 @@ type tsig_generation_fmt struct {
// Generate the HMAC for msg. The TSIG RR is modified // Generate the HMAC for msg. The TSIG RR is modified
// to include the MAC and MACSize. Note the the msg Id must // to include the MAC and MACSize. Note the the msg Id must
// be set, otherwise the MAC is not correct // be set, otherwise the MAC is not correct
// secret is encoded in base64 in BIND9
func (rr *RR_TSIG) Generate(msg *Msg, secret string) bool { func (rr *RR_TSIG) Generate(msg *Msg, secret string) bool {
buf := make([]byte, 4096) // TODO(mg) bufsize! buf := make([]byte, 4096) // TODO(mg) bufsize!
tsig := new(tsig_generation_fmt) tsig := new(tsig_generation_fmt)

View File

@ -82,11 +82,11 @@ const (
RcodeNameError = 3 RcodeNameError = 3
RcodeNotImplemented = 4 RcodeNotImplemented = 4
RcodeRefused = 5 RcodeRefused = 5
RcodeYXDomain = 6 RcodeYXDomain = 6
RcodeYXRrset = 7 RcodeYXRrset = 7
RcodeNXRrset = 8 RcodeNXRrset = 8
RcodeNotAuth = 9 RcodeNotAuth = 9
RcodeNotZone = 10 RcodeNotZone = 10
// Tsig errors // Tsig errors
TsigBadSig = 16 TsigBadSig = 16
TsigBadKey = 17 TsigBadKey = 17
@ -411,8 +411,8 @@ func (rr *RR_RRSIG) String() string {
type RR_NSEC struct { type RR_NSEC struct {
Hdr RR_Header Hdr RR_Header
NextDomain string "domain-name" NextDomain string "domain-name"
TypeBitMap []int "NSEC" TypeBitMap []uint16 "NSEC"
} }
func (rr *RR_NSEC) Header() *RR_Header { func (rr *RR_NSEC) Header() *RR_Header {
@ -420,7 +420,9 @@ func (rr *RR_NSEC) Header() *RR_Header {
} }
func (rr *RR_NSEC) String() string { func (rr *RR_NSEC) String() string {
return rr.Hdr.String() + "NSEC BLAH" return rr.Hdr.String() +
" " + rr.NextDomain +
" " + "bitmap"
} }
type RR_DS struct { type RR_DS struct {
@ -471,8 +473,8 @@ type RR_NSEC3 struct {
SaltLength uint8 SaltLength uint8
Salt string "hex" Salt string "hex"
HashLength uint8 HashLength uint8
NextDomain string "domain-name" NextDomain string "domain-name"
TypeBitMap []int "NSEC3" // &{TypeSOA,TypeDS,etc} TypeBitMap []uint16 "NSEC"
} }
func (rr *RR_NSEC3) Header() *RR_Header { func (rr *RR_NSEC3) Header() *RR_Header {
@ -520,8 +522,8 @@ func (rr *RR_TKEY) Header() *RR_Header {
} }
func (rr *RR_TKEY) String() string { func (rr *RR_TKEY) String() string {
// It has no presentation format // It has no presentation format
return "" return ""
} }
// Translate the RRSIG's incep. and expir. time to the correct date. // Translate the RRSIG's incep. and expir. time to the correct date.