mirror of
https://github.com/daeuniverse/dae.git
synced 2025-03-10 04:47:25 +07:00
optimize(dns): cache all qtype (not only a/aaaa) (#167)
This commit is contained in:
parent
56e6c1658f
commit
0d05e88e76
@ -10,7 +10,6 @@ import (
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/daeuniverse/dae/common"
|
||||
"io"
|
||||
"math"
|
||||
"net"
|
||||
@ -19,6 +18,8 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/daeuniverse/dae/common"
|
||||
|
||||
"github.com/daeuniverse/dae/common/consts"
|
||||
"github.com/daeuniverse/dae/common/netutils"
|
||||
"github.com/daeuniverse/dae/component/dns"
|
||||
@ -157,11 +158,6 @@ func (c *DnsController) LookupDnsRespCache_(msg *dnsmessage.Message) (resp []byt
|
||||
if msg.Response {
|
||||
return nil
|
||||
}
|
||||
switch q.Type {
|
||||
case dnsmessage.TypeA, dnsmessage.TypeAAAA:
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
cache := c.LookupDnsRespCache(q.Name.String(), q.Type)
|
||||
if cache != nil {
|
||||
cache.FillInto(msg)
|
||||
|
Loading…
Reference in New Issue
Block a user