Skip to content

Commit 9c4d40c

Browse files
committed
Remove unused setMaxTTL function
1 parent ff6b8a9 commit 9c4d40c

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

dnscrypt-proxy/dnsutils.go

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -200,27 +200,6 @@ func getMinTTL(msg *dns.Msg, minTTL uint32, maxTTL uint32, cacheNegMinTTL uint32
200200
return time.Duration(ttl) * time.Second
201201
}
202202

203-
func setMaxTTL(msg *dns.Msg, ttl uint32) {
204-
for _, rr := range msg.Answer {
205-
if ttl < rr.Header().TTL {
206-
rr.Header().TTL = ttl
207-
}
208-
}
209-
for _, rr := range msg.Ns {
210-
if ttl < rr.Header().TTL {
211-
rr.Header().TTL = ttl
212-
}
213-
}
214-
for _, rr := range msg.Extra {
215-
if dns.RRToType(rr) == dns.TypeOPT {
216-
continue
217-
}
218-
if ttl < rr.Header().TTL {
219-
rr.Header().TTL = ttl
220-
}
221-
}
222-
}
223-
224203
func updateTTL(msg *dns.Msg, expiration time.Time) {
225204
until := time.Until(expiration)
226205
ttl := uint32(0)

0 commit comments

Comments
 (0)