implement unknown RRs

RFC3597 - unknown rr are implemented. Currently Go dns
needs to now the type code, but must lack the actual implementation
of that type.
See IPSECKEY as an example.
This commit is contained in:
Miek Gieben 2011-02-21 15:57:15 +01:00
parent daaeaba69b
commit a90533a13f
3 changed files with 4 additions and 4 deletions

1
TODO
View File

@ -6,7 +6,6 @@ Todo:
* Test impl of nameserver, with a small zone, 1 KSK and online signing
* NSEC and nsec3 closest encloser helper functions
* Tsig generation for replies (request MAC)
* unknown records
* pack/Unpack smaller. EDNS 'n stuff can be folded in
Longer term:

5
msg.go
View File

@ -76,6 +76,7 @@ var Rr_str = map[uint16]string{
TypeLOC: "LOC",
TypeOPT: "OPT",
TypeDS: "DS",
TypeIPSECKEY: "IPSECKEY",
TypeSSHFP: "SSHFP",
TypeRRSIG: "RRSIG",
TypeNSEC: "NSEC",
@ -820,14 +821,14 @@ func reverse(m map[uint16]string) map[string]uint16 {
}
// Convert a MsgHdr to a string, mimic the way Dig displays headers:
//;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48404
//;; opcode: QUERY, status: NOERROR, id: 48404
//;; flags: qr aa rd ra;
func (h *MsgHdr) String() string {
if h == nil {
return "<nil> MsgHdr"
}
s := ";; ->>HEADER<<- opcode: " + opcode_str[h.Opcode]
s := ";; opcode: " + opcode_str[h.Opcode]
s += ", status: " + rcode_str[h.Rcode]
s += ", id: " + strconv.Itoa(int(h.Id)) + "\n"

View File

@ -56,7 +56,7 @@ const (
TypeNXT = 30
TypeDS = 43
TypeSSHFP = 44
TypeIPSECKEY = 45 // Not implemented
TypeIPSECKEY = 45 // No type implemented
TypeRRSIG = 46
TypeNSEC = 47
TypeDNSKEY = 48