diff options
author | 2019-10-04 09:44:58 +0100 | |
---|---|---|
committer | 2019-10-04 09:44:58 +0100 | |
commit | 03ea2ae955823612da2e3b2ebf21da7ab8eea1bd (patch) | |
tree | 8b140512f8000f4d2042ad43a3dd5e8e301a3328 /plugin/pkg/edns/edns.go | |
parent | f8551df27284b93e9f95e064ec65a9df60f4a528 (diff) | |
download | coredns-03ea2ae955823612da2e3b2ebf21da7ab8eea1bd.tar.gz coredns-03ea2ae955823612da2e3b2ebf21da7ab8eea1bd.tar.zst coredns-03ea2ae955823612da2e3b2ebf21da7ab8eea1bd.zip |
Make request.Request smaller (#3351)
* Make request.Request smaller
This makes the request struct smaller and removes the pointer to the do
boolean (tri-bool) as size == 0 will indicate if we have cached it.
Family can be a int8 because it only carries 3 values, Size itself is
just a uint16 under the covers.
This is a more comprehensive fix than #3292
Closes #3292
Signed-off-by: Miek Gieben <miek@miek.nl>
* cache: fix test
this now needs a valid response writter
Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'plugin/pkg/edns/edns.go')
-rw-r--r-- | plugin/pkg/edns/edns.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/pkg/edns/edns.go b/plugin/pkg/edns/edns.go index 68fb03865..31f57ea9b 100644 --- a/plugin/pkg/edns/edns.go +++ b/plugin/pkg/edns/edns.go @@ -63,7 +63,7 @@ func Version(req *dns.Msg) (*dns.Msg, error) { } // Size returns a normalized size based on proto. -func Size(proto string, size int) int { +func Size(proto string, size uint16) uint16 { if proto == "tcp" { return dns.MaxMsgSize } |