diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index bae7c0c03..1da6a7484 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq -PKG_UPSTREAM_VERSION:=2.81 +PKG_UPSTREAM_VERSION:=2.83 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION))) -PKG_RELEASE:=7 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq -PKG_HASH:=749ca903537c5197c26444ac24b0dce242cf42595fdfe6b9a5b9e4c7ad32f8fb +PKG_HASH:=ffc1f7e8b05e22d910b9a71d09f1128197292766dc7c54cb7018a1b2c3af4aea PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING diff --git a/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch b/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch index 8a4e58cee..bd11806ae 100644 --- a/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch +++ b/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch @@ -14,7 +14,7 @@ Signed-off-by: Kevin Darbyshire-Bryant --- a/src/dnsmasq.c +++ b/src/dnsmasq.c -@@ -94,10 +94,6 @@ int main (int argc, char **argv) +@@ -95,10 +95,6 @@ int main (int argc, char **argv) read_opts(argc, argv, compile_opts); @@ -27,7 +27,7 @@ Signed-off-by: Kevin Darbyshire-Bryant --- a/src/dnsmasq.h +++ b/src/dnsmasq.h -@@ -1110,7 +1110,7 @@ extern struct daemon { +@@ -1125,7 +1125,7 @@ extern struct daemon { int inotifyfd; #endif #if defined(HAVE_LINUX_NETWORK) @@ -36,7 +36,7 @@ Signed-off-by: Kevin Darbyshire-Bryant #elif defined(HAVE_BSD_NETWORK) int dhcp_raw_fd, dhcp_icmp_fd, routefd; #endif -@@ -1290,9 +1290,6 @@ int read_write(int fd, unsigned char *pa +@@ -1306,9 +1306,6 @@ int read_write(int fd, unsigned char *pa void close_fds(long max_fd, int spare1, int spare2, int spare3); int wildcard_match(const char* wildcard, const char* match); int wildcard_matchn(const char* wildcard, const char* match, int num); @@ -141,16 +141,16 @@ Signed-off-by: Kevin Darbyshire-Bryant my_syslog(LOG_ERR, _("failed to update ipset %s: %s"), setname, strerror(errno)); --- a/src/netlink.c +++ b/src/netlink.c -@@ -82,8 +82,7 @@ void netlink_init(void) - } +@@ -92,8 +92,7 @@ char *netlink_init(void) + iov.iov_len = 100; + iov.iov_base = safe_malloc(iov.iov_len); - if (daemon->netlinkfd == -1 || -- (daemon->kernel_version >= KERNEL_VERSION(2,6,30) && -- setsockopt(daemon->netlinkfd, SOL_NETLINK, NETLINK_NO_ENOBUFS, &opt, sizeof(opt)) == -1) || -+ (setsockopt(daemon->netlinkfd, SOL_NETLINK, NETLINK_NO_ENOBUFS, &opt, sizeof(opt)) == -1) || - getsockname(daemon->netlinkfd, (struct sockaddr *)&addr, &slen) == -1) - die(_("cannot create netlink socket: %s"), NULL, EC_MISC); +- if (daemon->kernel_version >= KERNEL_VERSION(2,6,30) && +- setsockopt(daemon->netlinkfd, SOL_NETLINK, NETLINK_NO_ENOBUFS, &opt, sizeof(opt)) == -1) ++ if (setsockopt(daemon->netlinkfd, SOL_NETLINK, NETLINK_NO_ENOBUFS, &opt, sizeof(opt)) == -1) + return _("warning: failed to set NETLINK_NO_ENOBUFS on netlink socket"); + return NULL; --- a/src/util.c +++ b/src/util.c @@ -786,22 +786,3 @@ int wildcard_matchn(const char* wildcard diff --git a/package/network/services/dnsmasq/patches/900-filter-aaaa.patch b/package/network/services/dnsmasq/patches/900-filter-aaaa.patch index 3d382c4c1..15c063e26 100644 --- a/package/network/services/dnsmasq/patches/900-filter-aaaa.patch +++ b/package/network/services/dnsmasq/patches/900-filter-aaaa.patch @@ -27,15 +27,15 @@ diff --git a/src/option.c b/src/option.c index 44b1dc5..f954d7f 100644 --- a/src/option.c +++ b/src/option.c -@@ -167,6 +167,7 @@ - #define LOPT_IGNORE_CLID 358 +@@ -168,6 +168,7 @@ struct myoption { #define LOPT_SINGLE_PORT 359 #define LOPT_SCRIPT_TIME 360 -+#define LOPT_FILTER_AAAA 361 + #define LOPT_PXE_VENDOR 361 ++#define LOPT_FILTER_AAAA 362 #ifdef HAVE_GETOPT_LONG static const struct option opts[] = -@@ -339,6 +340,7 @@ +@@ -341,6 +342,7 @@ static const struct myoption opts[] = { "dumpfile", 1, 0, LOPT_DUMPFILE }, { "dumpmask", 1, 0, LOPT_DUMPMASK }, { "dhcp-ignore-clid", 0, 0, LOPT_IGNORE_CLID }, @@ -43,7 +43,7 @@ index 44b1dc5..f954d7f 100644 { NULL, 0, 0, 0 } }; -@@ -518,6 +520,7 @@ +@@ -521,6 +523,7 @@ static struct { { 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_SCRIPT_TIME, OPT_LEASE_RENEW, NULL, gettext_noop("Call dhcp-script when lease expiry changes."), NULL }, @@ -51,29 +51,24 @@ index 44b1dc5..f954d7f 100644 { 0, 0, NULL, NULL, NULL } }; - diff --git a/src/rfc1035.c b/src/rfc1035.c index 6290f22..b67b169 100644 --- a/src/rfc1035.c +++ b/src/rfc1035.c -@@ -1953,9 +1953,18 @@ - if (!dryrun) - log_query(F_CONFIG | F_NEG, name, &addr, NULL); +@@ -1908,6 +1908,16 @@ size_t answer_request(struct dns_header *header, char *limit, size_t qlen, } -- } -+ } -+ -+ //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) -+ if (!ans) ++ /* 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; ++ } ++ + if (!ans) return 0; /* failed to answer a question */ } -