Remove NewUpdate, we already have the simpler SetUpdate
This commit is contained in:
parent
530d66a85b
commit
88a2d13a8f
|
@ -55,7 +55,9 @@ func (dns *Msg) SetRcodeFormatError(request *Msg) {
|
|||
// sets the ZONE section to: z, TypeSOA, classINET.
|
||||
func (dns *Msg) SetUpdate(z string) {
|
||||
dns.MsgHdr.Id = Id()
|
||||
dns.MsgHdr.Response = false
|
||||
dns.MsgHdr.Opcode = OpcodeUpdate
|
||||
dns.Compress = false // BIND9 cannot handle compression
|
||||
dns.Question = make([]Question, 1)
|
||||
dns.Question[0] = Question{z, TypeSOA, ClassINET}
|
||||
}
|
||||
|
|
12
update.go
12
update.go
|
@ -35,18 +35,6 @@
|
|||
//
|
||||
package dns
|
||||
|
||||
// NewUpdate creates a new DNS update packet. This returns a normal
|
||||
// dns *Msg, but sets some options.
|
||||
func NewUpdate(zone string, class uint16) *Msg {
|
||||
u := new(Msg)
|
||||
u.MsgHdr.Response = false
|
||||
u.MsgHdr.Opcode = OpcodeUpdate
|
||||
u.Compress = false // Seems BIND9 at least cannot handle compressed update pkgs
|
||||
u.Question = make([]Question, 1)
|
||||
u.Question[0] = Question{zone, TypeSOA, class}
|
||||
return u
|
||||
}
|
||||
|
||||
// The table from RFC 2136 supplemented with the Go DNS function.
|
||||
//
|
||||
// 3.2.4 - Table Of Metavalues Used In Prerequisite Section
|
||||
|
|
Loading…
Reference in New Issue