From 3df1338d803ae1f42e8cdbda859af4d1cfa9fe30 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Thu, 20 Feb 2020 12:17:39 +0800 Subject: [PATCH] dnsmasq: delete duplicate patch --- .../dnsmasq/patches/900-filter-aaaa.patch | 73 ------------------- .../patches/996-dnsmasq-filter-aaaa.patch | 4 +- 2 files changed, 2 insertions(+), 75 deletions(-) delete mode 100644 package/network/services/dnsmasq/patches/900-filter-aaaa.patch diff --git a/package/network/services/dnsmasq/patches/900-filter-aaaa.patch b/package/network/services/dnsmasq/patches/900-filter-aaaa.patch deleted file mode 100644 index 72ddaf4ef2..0000000000 --- a/package/network/services/dnsmasq/patches/900-filter-aaaa.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 966471712184cfb3b067f2ae8dad9d8e2a896cae Mon Sep 17 00:00:00 2001 -From: Bearice Ren -Date: Tue, 20 Sep 2016 11:52:08 +0800 -Subject: [PATCH] add filter-aaaa option - ---- - src/dnsmasq.h | 3 ++- - src/option.c | 3 +++ - src/rfc1035.c | 9 +++++++++ - 3 files changed, 14 insertions(+), 1 deletion(-) - -diff --git a/src/dnsmasq.h b/src/dnsmasq.h -index 1896a64..e10d6c4 100644 ---- a/src/dnsmasq.h -+++ b/src/dnsmasq.h -@@ -259,7 +259,8 @@ - #define OPT_TFTP_APREF_MAC 56 - #define OPT_RAPID_COMMIT 57 - #define OPT_UBUS 58 --#define OPT_LAST 59 -+#define OPT_FILTER_AAAA 59 -+#define OPT_LAST 60 - - #define OPTION_BITS (sizeof(unsigned int)*8) - #define OPTION_SIZE ( (OPT_LAST/OPTION_BITS)+((OPT_LAST%OPTION_BITS)!=0) ) -diff --git a/src/option.c b/src/option.c -index d8c57d6..1cc65bf 100644 -@@ -166,6 +166,7 @@ - #define LOPT_UBUS 354 - #define LOPT_NAME_MATCH 355 - #define LOPT_CAA 356 -+#define LOPT_FILTER_AAAA 357 - - #ifdef HAVE_GETOPT_LONG - static const struct option opts[] = -@@ -337,6 +338,7 @@ - { "dhcp-rapid-commit", 0, 0, LOPT_RAPID_COMMIT }, - { "dumpfile", 1, 0, LOPT_DUMPFILE }, - { "dumpmask", 1, 0, LOPT_DUMPMASK }, -+ { "filter-aaaa", 0, 0, LOPT_FILTER_AAAA }, - { NULL, 0, 0, 0 } - }; - -@@ -515,6 +517,7 @@ - { LOPT_RAPID_COMMIT, OPT_RAPID_COMMIT, NULL, gettext_noop("Enables DHCPv4 Rapid Commit option."), NULL }, - { LOPT_DUMPFILE, ARG_ONE, "", gettext_noop("Path to debug packet dump file"), NULL }, - { LOPT_DUMPMASK, ARG_ONE, "", gettext_noop("Mask which packets to dump"), NULL }, -+ { LOPT_FILTER_AAAA, OPT_FILTER_AAAA, NULL, gettext_noop("Filter all AAAA requests."), NULL }, - { 0, 0, NULL, NULL, NULL } - }; - -diff --git a/src/rfc1035.c b/src/rfc1035.c -index 24d08c1..1594962 100644 ---- a/src/rfc1035.c -+++ b/src/rfc1035.c -@@ -1878,6 +1878,15 @@ - } - } - -+ //patch to filter aaaa forwards -+ if (qtype == T_AAAA && option_bool(OPT_FILTER_AAAA) ){ -+ //return a null reply -+ ans = 1; -+ if (!dryrun) log_query(F_CONFIG | F_IPV6 | F_NEG, name, &addr, NULL); -+ break; -+ } -+ //end of patch -+ - if (!ans) - return 0; /* failed to answer a question */ - } - --- \ No newline at end of file diff --git a/package/network/services/dnsmasq/patches/996-dnsmasq-filter-aaaa.patch b/package/network/services/dnsmasq/patches/996-dnsmasq-filter-aaaa.patch index 8d6a1777cb..4a6dd6cf3c 100644 --- a/package/network/services/dnsmasq/patches/996-dnsmasq-filter-aaaa.patch +++ b/package/network/services/dnsmasq/patches/996-dnsmasq-filter-aaaa.patch @@ -39,7 +39,7 @@ index d8c57d6..1cc65bf 100644 { "dhcp-rapid-commit", 0, 0, LOPT_RAPID_COMMIT }, { "dumpfile", 1, 0, LOPT_DUMPFILE }, { "dumpmask", 1, 0, LOPT_DUMPMASK }, -+ { "filter-aaaa", 0, 0, LOPT_FILTER_AAAA }, ++ { "filter-aaaa", 0, 0, LOPT_FILTER_AAAA }, { NULL, 0, 0, 0 } }; @@ -71,4 +71,4 @@ index 24d08c1..1594962 100644 if (!ans) return 0; /* failed to answer a question */ } --- \ No newline at end of file +--