dnsmasq: bump to 2.82
authorKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Mon, 29 Jun 2020 15:26:42 +0000 (16:26 +0100)
committerKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Mon, 20 Jul 2020 09:38:35 +0000 (10:38 +0100)
This fixes a nasty problem introduced in 2.81 which causes random
crashes on systems where there's significant DNS activity over TCP. It
also fixes DNSSEC validation problems with zero-TTL DNSKEY and DS
records.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
package/network/services/dnsmasq/Makefile
package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch

index ff55d8c545d732c3b03246831f9ca1517a02e8e1..22ecd12f0769638f0068c3076da7e5322404aa24 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnsmasq
-PKG_UPSTREAM_VERSION:=2.81
+PKG_UPSTREAM_VERSION:=2.82
 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION)))
 PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz
 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
-PKG_HASH:=749ca903537c5197c26444ac24b0dce242cf42595fdfe6b9a5b9e4c7ad32f8fb
+PKG_HASH:=84523646f3116bb5e1151efb66e645030f6e6a8256f29aab444777a343ebc132
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
index 8a4e58cee7f06fee4c9d46f8f50ab38bf211f7b5..aaa5a769090b98ddf613bc0dd94316430e6f4c2a 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
 
 --- 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 <ldir@darbyshire-bryant.me.uk>
  
 --- a/src/dnsmasq.h
 +++ b/src/dnsmasq.h
-@@ -1110,7 +1110,7 @@ extern struct daemon {
+@@ -1112,7 +1112,7 @@ extern struct daemon {
    int inotifyfd;
  #endif
  #if defined(HAVE_LINUX_NETWORK)
@@ -36,7 +36,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
  #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
+@@ -1292,9 +1292,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 <ldir@darbyshire-bryant.me.uk>
       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