firewall: refresh 900-filter-aaaa.patch

Signed-off-by: Chuck <fanck0605@qq.com>
This commit is contained in:
Chuck 2020-05-29 20:34:46 +08:00
parent 0f9db42950
commit 929f3953dd

View File

@ -10,10 +10,10 @@ Subject: [PATCH] add filter-aaaa option
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/dnsmasq.h b/src/dnsmasq.h
index 1896a64..e10d6c4 100644
index f53e9a5..e9617a6 100644
--- a/src/dnsmasq.h
+++ b/src/dnsmasq.h
@@ -259,7 +259,8 @@
@@ -262,7 +262,8 @@ struct event_desc {
#define OPT_TFTP_APREF_MAC 56
#define OPT_RAPID_COMMIT 57
#define OPT_UBUS 58
@ -21,11 +21,13 @@ index 1896a64..e10d6c4 100644
+#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) )
/* extra flags for my_syslog, we use a couple of facilities since they are known
not to occupy the same bits as priorities, no matter how syslog.h is set up. */
diff --git a/src/option.c b/src/option.c
index d8c57d6..1cc65bf 100644
@@ -166,6 +166,7 @@
index 44b1dc5..f954d7f 100644
--- a/src/option.c
+++ b/src/option.c
@@ -166,6 +166,7 @@ struct myoption {
#define LOPT_UBUS 354
#define LOPT_NAME_MATCH 355
#define LOPT_CAA 356
@ -33,7 +35,7 @@ index d8c57d6..1cc65bf 100644
#ifdef HAVE_GETOPT_LONG
static const struct option opts[] =
@@ -337,6 +338,7 @@
@@ -337,6 +338,7 @@ static const struct myoption opts[] =
{ "dhcp-rapid-commit", 0, 0, LOPT_RAPID_COMMIT },
{ "dumpfile", 1, 0, LOPT_DUMPFILE },
{ "dumpmask", 1, 0, LOPT_DUMPMASK },
@ -41,19 +43,19 @@ index d8c57d6..1cc65bf 100644
{ NULL, 0, 0, 0 }
};
@@ -515,6 +517,7 @@
@@ -515,6 +517,7 @@ static struct {
{ LOPT_RAPID_COMMIT, OPT_RAPID_COMMIT, NULL, gettext_noop("Enables DHCPv4 Rapid Commit option."), NULL },
{ LOPT_DUMPFILE, ARG_ONE, "<path>", gettext_noop("Path to debug packet dump file"), NULL },
{ LOPT_DUMPMASK, ARG_ONE, "<hex>", 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
index 6290f22..b67b169 100644
--- a/src/rfc1035.c
+++ b/src/rfc1035.c
@@ -1878,6 +1878,15 @@
@@ -1881,6 +1881,15 @@ size_t answer_request(struct dns_header *header, char *limit, size_t qlen,
}
}
@ -69,5 +71,6 @@ index 24d08c1..1594962 100644
if (!ans)
return 0; /* failed to answer a question */
}
--
2.17.1
--