Community maintained packages for ImmortalWrt.
Revisão | 45994b0692bec4174c60638a2fa44de79f9c0a24 (tree) |
---|---|
Hora | 2022-01-25 18:02:13 |
Autor | ImmortalWrt AutoUpdate Bot <github-bot@immo...> |
Commiter | Tianling Shen |
mosdns: Update to 3.1.0
Signed-off-by: ImmortalWrt AutoUpdate Bot <github-bot@immortalwrt.org>
(cherry picked from commit 97eaebf5169f043cc33acef7defd8d1174665907)
@@ -5,12 +5,12 @@ | ||
5 | 5 | include $(TOPDIR)/rules.mk |
6 | 6 | |
7 | 7 | PKG_NAME:=mosdns |
8 | -PKG_VERSION:=3.0.0 | |
8 | +PKG_VERSION:=3.1.0 | |
9 | 9 | PKG_RELEASE:=$(AUTORELEASE) |
10 | 10 | |
11 | 11 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
12 | 12 | PKG_SOURCE_URL:=https://codeload.github.com/IrineSistiana/mosdns/tar.gz/v$(PKG_VERSION)? |
13 | -PKG_HASH:=f9e0ff34e4ae0345f0887c47840128f850d7400c6d407242d3848a6462547e58 | |
13 | +PKG_HASH:=1eb30326b074bfe4731ca46497e1eecef5e2ac2d602a482fa552c50ddc972fe5 | |
14 | 14 | |
15 | 15 | PKG_LICENSE:=GPL-3.0 |
16 | 16 | PKG_LICENSE_FILE:=LICENSE |
@@ -1,30 +0,0 @@ | ||
1 | -From 0565ec359eb16b7cf10dcab9dd8e5be221ed9539 Mon Sep 17 00:00:00 2001 | |
2 | -From: IrineSistiana <49315432+IrineSistiana@users.noreply.github.com> | |
3 | -Date: Thu, 6 Jan 2022 16:50:46 +0800 | |
4 | -Subject: [PATCH] redis_cache: fixed cache could store a key with zero ttl | |
5 | - | |
6 | ---- | |
7 | - dispatcher/pkg/cache/redis_cache/redis_cache.go | 6 ++++-- | |
8 | - 1 file changed, 4 insertions(+), 2 deletions(-) | |
9 | - | |
10 | ---- a/dispatcher/pkg/cache/redis_cache/redis_cache.go | |
11 | -+++ b/dispatcher/pkg/cache/redis_cache/redis_cache.go | |
12 | -@@ -61,14 +61,16 @@ func (r *RedisCache) Get(ctx context.Con | |
13 | - } | |
14 | - | |
15 | - func (r *RedisCache) Store(ctx context.Context, key string, v []byte, storedTime, expirationTime time.Time) error { | |
16 | -- if time.Now().After(expirationTime) { | |
17 | -+ now := time.Now() | |
18 | -+ ttl := expirationTime.Sub(now) | |
19 | -+ if ttl <= 0 { // For redis, zero ttl means the key has no expiration time. | |
20 | - return nil | |
21 | - } | |
22 | - | |
23 | - data := packRedisData(storedTime, expirationTime, v) | |
24 | - defer pool.ReleaseBuf(data) | |
25 | - | |
26 | -- return r.client.Set(ctx, key, data, expirationTime.Sub(time.Now())).Err() | |
27 | -+ return r.client.Set(ctx, key, data, ttl).Err() | |
28 | - } | |
29 | - | |
30 | - // Close closes the redis client. |
@@ -1,27 +0,0 @@ | ||
1 | -From 653c7a03222d9135a6f9bfbeff3aaddc300762b4 Mon Sep 17 00:00:00 2001 | |
2 | -From: IrineSistiana <49315432+IrineSistiana@users.noreply.github.com> | |
3 | -Date: Thu, 6 Jan 2022 19:59:33 +0800 | |
4 | -Subject: [PATCH] fixed #240 | |
5 | - | |
6 | ---- | |
7 | - dispatcher/plugin/executable/forward/forward.go | 9 +++++++-- | |
8 | - 1 file changed, 7 insertions(+), 2 deletions(-) | |
9 | - | |
10 | ---- a/dispatcher/plugin/executable/forward/forward.go | |
11 | -+++ b/dispatcher/plugin/executable/forward/forward.go | |
12 | -@@ -158,8 +158,13 @@ func (f *forwardPlugin) Exec(ctx context | |
13 | - func (f *forwardPlugin) exec(ctx context.Context, qCtx *handler.Context) error { | |
14 | - var r *dns.Msg | |
15 | - var err error | |
16 | -- if f.fastIPHandler != nil { | |
17 | -- r, _, err = f.fastIPHandler.ExchangeFastest(qCtx.Q().Copy(), f.upstreams) | |
18 | -+ q := qCtx.Q() | |
19 | -+ if f.fastIPHandler != nil && len(q.Question) == 1 { | |
20 | -+ // Only call ExchangeFastest if the query has one question. | |
21 | -+ // ExchangeFastest will use the first question name as host name. | |
22 | -+ // It won't check questions range. So it will it panic if len(q.Question) == 0. | |
23 | -+ // Ref: https://github.com/IrineSistiana/mosdns/issues/240 | |
24 | -+ r, _, err = f.fastIPHandler.ExchangeFastest(q.Copy(), f.upstreams) | |
25 | - } else { | |
26 | - r, err = f.bu.ExchangeParallel(ctx, qCtx) | |
27 | - } |
@@ -1,27 +0,0 @@ | ||
1 | -From 189e1c810fcdda95fee732fb37ba73e08055989f Mon Sep 17 00:00:00 2001 | |
2 | -From: IrineSistiana <49315432+IrineSistiana@users.noreply.github.com> | |
3 | -Date: Thu, 6 Jan 2022 23:07:28 +0800 | |
4 | -Subject: [PATCH] fixed nil pointer in 653c7a03222d9135a6f9bfbeff3aaddc300762b4 | |
5 | - #240 | |
6 | - | |
7 | ---- | |
8 | - dispatcher/plugin/executable/forward/forward.go | 5 ++--- | |
9 | - 1 file changed, 2 insertions(+), 3 deletions(-) | |
10 | - | |
11 | ---- a/dispatcher/plugin/executable/forward/forward.go | |
12 | -+++ b/dispatcher/plugin/executable/forward/forward.go | |
13 | -@@ -116,12 +116,11 @@ func newForwarder(bp *handler.BP, args * | |
14 | - }) | |
15 | - } | |
16 | - | |
17 | -+ f.bu = bundled_upstream.NewBundledUpstream(bu, bp.L()) | |
18 | -+ | |
19 | - if args.FastestIP { | |
20 | - f.fastIPHandler = fastip.NewFastestAddr() | |
21 | -- } else { | |
22 | -- f.bu = bundled_upstream.NewBundledUpstream(bu, bp.L()) | |
23 | - } | |
24 | -- | |
25 | - return f, nil | |
26 | - } | |
27 | - |