remove it again

This commit is contained in:
Miek Gieben 2011-03-13 18:01:01 +01:00
parent 80e97d6439
commit 26a19ac0fb
3 changed files with 2 additions and 28 deletions

View File

@ -19,7 +19,6 @@ GOFILES=\
config.go\
server.go \
nsec3.go \
new.go \
# y.go\
include $(GOROOT)/src/Make.pkg

View File

@ -89,8 +89,8 @@ Flags:
m.MsgHdr.RecursionDesired = *rd
m.Question = make([]dns.Question, 1)
if *dnssec || *nsid {
opt := dns.New(dns.TypeOPT)
opt.(*dns.RR_OPT).SetDo()
opt := new(dns.TypeOPT)
opt.SetDo()
if *nsid {
opt.(*dns.RR_OPT).SetNsid("")
}

25
new.go
View File

@ -1,25 +0,0 @@
package dns
func New(i int) RR {
var rr RR
mk, known := rr_mk[i]
if !known {
rr = new(RR_RFC3597)
} else {
rr = mk()
}
rr.Header().Ttl = DefaultTtl
rr.Header().Class = ClassINET
rr.Header().Rrtype = uint16(i)
switch t := rr.(type) {
case *RR_TSIG:
t.Hdr = RR_Header{Ttl: 0, Class: ClassANY, Rrtype: uint16(i)}
t.Fudge = 300
case *RR_OPT:
t.Hdr = RR_Header{Name: "", Ttl: 0, Class: 0, Rrtype: uint16(i)}
t.SetVersion(0)
t.SetUDPSize(DefaultMsgSize)
}
return rr
}