From c06a96ef1316b76c0b080f221fec7cf435fd0752 Mon Sep 17 00:00:00 2001 From: sbwml Date: Mon, 18 Sep 2023 02:21:46 +0800 Subject: [PATCH] mosdns: update from upstream --- mosdns/patches/210-fixed-712.patch | 46 ++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 mosdns/patches/210-fixed-712.patch diff --git a/mosdns/patches/210-fixed-712.patch b/mosdns/patches/210-fixed-712.patch new file mode 100644 index 0000000..9c05938 --- /dev/null +++ b/mosdns/patches/210-fixed-712.patch @@ -0,0 +1,46 @@ +From 208abee452a28674e521bc317fb901c4e7c2a7a9 Mon Sep 17 00:00:00 2001 +From: Irine Sistiana <49315432+IrineSistiana@users.noreply.github.com> +Date: Sun, 17 Sep 2023 19:52:38 +0800 +Subject: [PATCH] fixed #712 + +--- + plugin/executable/nftset/nftset_linux.go | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/plugin/executable/nftset/nftset_linux.go b/plugin/executable/nftset/nftset_linux.go +index 5d6b0ec..0fc1c8e 100644 +--- a/plugin/executable/nftset/nftset_linux.go ++++ b/plugin/executable/nftset/nftset_linux.go +@@ -24,12 +24,13 @@ package nftset + import ( + "context" + "fmt" ++ "net/netip" ++ + "github.com/IrineSistiana/mosdns/v5/pkg/nftset_utils" + "github.com/IrineSistiana/mosdns/v5/pkg/query_context" + "github.com/IrineSistiana/mosdns/v5/pkg/utils" + "github.com/google/nftables" + "github.com/miekg/dns" +- "net/netip" + ) + + type nftSetPlugin struct { +@@ -138,8 +139,12 @@ func (p *nftSetPlugin) addElems(r *dns.Msg) error { + } + + func (p *nftSetPlugin) Close() error { +- _ = p.v6Handler.Close() +- _ = p.v4Handler.Close() ++ if p.v4Handler != nil { ++ _ = p.v4Handler.Close() ++ } ++ if p.v6Handler != nil { ++ _ = p.v6Handler.Close() ++ } + return nil + } + +-- +2.34.8 +