From 61c917429976f35c99afc214e1b7f08a51fedb73 Mon Sep 17 00:00:00 2001 From: Espen Braastad Date: Thu, 24 Oct 2024 22:00:24 +0200 Subject: [PATCH] Updating maxminddb-golang from 1.13.0 to 1.13.1 --- go.mod | 2 +- go.sum | 4 ++-- vendor/github.com/oschwald/maxminddb-golang/traverse.go | 7 +++++++ vendor/modules.txt | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index a528fa2..0162f52 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/gorilla/mux v1.8.1 github.com/lib/pq v1.10.9 github.com/minio/minio-go/v7 v7.0.75 - github.com/oschwald/maxminddb-golang v1.13.0 + github.com/oschwald/maxminddb-golang v1.13.1 github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e ) diff --git a/go.sum b/go.sum index fc4e2ee..f000241 100644 --- a/go.sum +++ b/go.sum @@ -27,8 +27,8 @@ github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= github.com/minio/minio-go/v7 v7.0.75 h1:0uLrB6u6teY2Jt+cJUVi9cTvDRuBKWSRzSAcznRkwlE= github.com/minio/minio-go/v7 v7.0.75/go.mod h1:qydcVzV8Hqtj1VtEocfxbmVFa2siu6HGa+LDEPogjD8= -github.com/oschwald/maxminddb-golang v1.13.0 h1:R8xBorY71s84yO06NgTmQvqvTvlS/bnYZrrWX1MElnU= -github.com/oschwald/maxminddb-golang v1.13.0/go.mod h1:BU0z8BfFVhi1LQaonTwwGQlsHUEu9pWNdMfmq4ztm0o= +github.com/oschwald/maxminddb-golang v1.13.1 h1:G3wwjdN9JmIK2o/ermkHM+98oX5fS+k5MbwsmL4MRQE= +github.com/oschwald/maxminddb-golang v1.13.1/go.mod h1:K4pgV9N/GcK694KSTmVSDTODk4IsCNThNdTmnaBZ/F8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= diff --git a/vendor/github.com/oschwald/maxminddb-golang/traverse.go b/vendor/github.com/oschwald/maxminddb-golang/traverse.go index 657e2c4..90073e2 100644 --- a/vendor/github.com/oschwald/maxminddb-golang/traverse.go +++ b/vendor/github.com/oschwald/maxminddb-golang/traverse.go @@ -95,6 +95,13 @@ func (r *Reader) NetworksWithin(network *net.IPNet, options ...NetworksOption) * } pointer, bit := r.traverseTree(ip, 0, uint(prefixLength)) + + // We could skip this when bit >= prefixLength if we assume that the network + // passed in is in canonical form. However, given that this may not be the + // case, it is safest to always take the mask. If this is hot code at some + // point, we could eliminate the allocation of the net.IPMask by zeroing + // out the bits in ip directly. + ip = ip.Mask(net.CIDRMask(bit, len(ip)*8)) networks.nodes = []netNode{ { ip: ip, diff --git a/vendor/modules.txt b/vendor/modules.txt index 9273a19..d1a09b4 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -62,7 +62,7 @@ github.com/minio/minio-go/v7/pkg/set github.com/minio/minio-go/v7/pkg/signer github.com/minio/minio-go/v7/pkg/sse github.com/minio/minio-go/v7/pkg/tags -# github.com/oschwald/maxminddb-golang v1.13.0 +# github.com/oschwald/maxminddb-golang v1.13.1 ## explicit; go 1.21 github.com/oschwald/maxminddb-golang # github.com/rs/xid v1.5.0