Use defaulTTL, more Go like
This commit is contained in:
parent
8637ca2219
commit
4029c4153c
|
@ -48,7 +48,7 @@ func (dns *Msg) SetIxfr(z string, serial uint32) {
|
||||||
dns.Question = make([]Question, 1)
|
dns.Question = make([]Question, 1)
|
||||||
dns.Ns = make([]RR, 1)
|
dns.Ns = make([]RR, 1)
|
||||||
s := new(RR_SOA)
|
s := new(RR_SOA)
|
||||||
s.Hdr = RR_Header{z, TypeSOA, ClassINET, DefaultTtl, 0}
|
s.Hdr = RR_Header{z, TypeSOA, ClassINET, DefaultTTL, 0}
|
||||||
s.Serial = serial
|
s.Serial = serial
|
||||||
|
|
||||||
dns.Question[0] = Question{z, TypeIXFR, ClassINET}
|
dns.Question[0] = Question{z, TypeIXFR, ClassINET}
|
||||||
|
|
2
dns.go
2
dns.go
|
@ -52,7 +52,7 @@ const (
|
||||||
Year68 = 2 << (32 - 1) // For RFC1982 (Serial Arithmetic) calculations in 32 bits.
|
Year68 = 2 << (32 - 1) // For RFC1982 (Serial Arithmetic) calculations in 32 bits.
|
||||||
DefaultMsgSize = 4096 // A standard default for larger than 512 packets.
|
DefaultMsgSize = 4096 // A standard default for larger than 512 packets.
|
||||||
MaxMsgSize = 65536 // Largest possible DNS packet.
|
MaxMsgSize = 65536 // Largest possible DNS packet.
|
||||||
DefaultTtl = 3600 // Default Ttl.
|
DefaultTTL = 3600 // Default Ttl.
|
||||||
)
|
)
|
||||||
|
|
||||||
// Error represents a DNS error
|
// Error represents a DNS error
|
||||||
|
|
Loading…
Reference in New Issue