From 9d23d846f5071a869116cc11e2892641c48827f7 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Thu, 21 Mar 2013 21:20:51 +0000 Subject: [PATCH] remove ttl stuff --- unbound.go | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/unbound.go b/unbound.go index f31d219..6234ae1 100644 --- a/unbound.go +++ b/unbound.go @@ -111,21 +111,6 @@ func errorString(i int) string { return C.GoString(C.ub_strerror(C.int(i))) } -// unbound version from 1.4.20 (inclusive) and above fill in the Tll in the result -// check if we have such a version -func (u *Unbound) haveTtl() bool { - if u.version[0] < 1 { - return false - } - if u.version[1] < 4 { - return false - } - if u.version[2] < 20 { - return false - } - return true -} - // New wraps Unbound's ub_ctx_create. func New() *Unbound { u := new(Unbound) @@ -221,9 +206,7 @@ func (u *Unbound) Resolve(name string, rrtype, rrclass uint16) (*Result, error) r.Secure = res.secure == 1 r.Bogus = res.bogus == 1 r.WhyBogus = C.GoString(res.why_bogus) - if u.haveTtl() { - r.Ttl = uint32(res.ttl) - } + r.Ttl = 0 // Re-create the RRs var h dns.RR_Header