Skip to content
Permalink
Browse files

dnsmasq: update to 2.80-67-g5a91334

  • Loading branch information...
themiron committed Aug 27, 2019
1 parent e786dfa commit a660529b9f16ff3d164df56748840d14ede52170
@@ -38,6 +38,12 @@ version 2.81
the DHCP server in subnets where the server (or relay) doesn't
have an interface on the network in that subnet. Many thanks to
kamp.de for sponsoring this feature.

Fix broken contrib/lease_tools/dhcp_lease_time.c. A packet
validation check got borked in commit 2b38e382 and release 2.80.
Thanks to Tomasz Szajner for spotting this.

Fix compilation against nettle version 3.5 and later.


version 2.80
@@ -120,7 +120,7 @@ all-i18n : $(BUILDDIR)
top="$(top)" \
i18n=-DLOCALEDIR=\'\"$(LOCALEDIR)\"\' \
build_cflags="$(version) $(dbus_cflags) $(idn2_cflags) $(idn_cflags) $(ct_cflags) $(lua_cflags) $(crypto_cflags)" \
build_libs="$(dbus_libs) $(idn2_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(crypto_libs) $(gmp_libs)" \
build_libs="$(dbus_libs) $(idn2_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(crypto_libs) $(gmp_libs) $(ubus_libs)" \
-f $(top)/Makefile dnsmasq
for f in `cd $(PO); echo *.po`; do \
cd $(top) && cd $(BUILDDIR) && $(MAKE) top="$(top)" -f $(top)/Makefile $${f%.po}.mo; \
@@ -1 +1 @@
2.80-53-g343b7b4
2.80-67-g5a91334
@@ -83,7 +83,7 @@ static unsigned char *option_find1(unsigned char *p, unsigned char *end, int opt
if (p >= end - 2)
return NULL; /* malformed packet */
opt_len = option_len(p);
if (end - p >= (2 + opt_len))
if (end - p < (2 + opt_len))
return NULL; /* malformed packet */
if (*p == opt && opt_len >= minsize)
return p;
@@ -14,5 +14,5 @@ log-facility=/var/log/dnsmasq.log

in the dnsmasq configuration.

The script runs on debian (with ash installed) and on busybox.
The script runs on debian (with dash installed) and on busybox.

@@ -1,4 +1,4 @@
#!/bin/ash
#!/bin/dash
# $Id: reverse_replace.sh 18 2015-03-01 16:12:35Z jo $
#
# Usage e.g.: netstat -n -4 | reverse_replace.sh
@@ -836,6 +836,9 @@ size_t answer_auth(struct dns_header *header, char *limit, size_t qlen, time_t n
header->hb4 &= ~HB4_RA;
}

/* data is never DNSSEC signed. */
header->hb4 &= ~HB4_AD;

/* authoritative */
if (auth)
header->hb3 |= HB3_AA;
@@ -284,11 +284,16 @@ HAVE_SOCKADDR_SA_LEN
#define HAVE_BSD_NETWORK
#define HAVE_GETOPT_LONG
#define HAVE_SOCKADDR_SA_LEN
#define NO_IPSET
/* Define before sys/socket.h is included so we get socklen_t */
#define _BSD_SOCKLEN_T_
/* Select the RFC_3542 version of the IPv6 socket API.
Define before netinet6/in6.h is included. */
#define __APPLE_USE_RFC_3542
#define __APPLE_USE_RFC_3542
/* Required for Mojave. */
#ifndef SOL_TCP
# define SOL_TCP IPPROTO_TCP
#endif
#define NO_IPSET

#elif defined(__NetBSD__)
@@ -137,6 +137,7 @@ typedef unsigned long long u64;
#endif

#if defined(HAVE_LINUX_NETWORK)
#include <linux/sockios.h>
#include <linux/capability.h>
/* There doesn't seem to be a universally-available
userspace header for these. */
@@ -80,7 +80,8 @@ int create_helper(int event_fd, int err_fd, uid_t uid, gid_t gid, long max_fd)
pid_t pid;
int i, pipefd[2];
struct sigaction sigact;

unsigned char *alloc_buff = NULL;

/* create the pipe through which the main program sends us commands,
then fork our process. */
if (pipe(pipefd) == -1 || !fix_fd(pipefd[1]) || (pid = fork()) == -1)
@@ -186,11 +187,16 @@ int create_helper(int event_fd, int err_fd, uid_t uid, gid_t gid, long max_fd)
struct script_data data;
char *p, *action_str, *hostname = NULL, *domain = NULL;
unsigned char *buf = (unsigned char *)daemon->namebuff;
unsigned char *end, *extradata, *alloc_buff = NULL;
unsigned char *end, *extradata;
int is6, err = 0;
int pipeout[2];

free(alloc_buff);
/* Free rarely-allocated memory from previous iteration. */
if (alloc_buff)
{
free(alloc_buff);
alloc_buff = NULL;
}

/* we read zero bytes when pipe closed: this is our signal to exit */
if (!read_write(pipefd[0], (unsigned char *)&data, sizeof(data), 1))
@@ -2692,6 +2692,14 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma

if (size < 0)
size = 0;

/* Note that for very large cache sizes, the malloc()
will overflow. For the size of the cache record
at the time this was noted, the value of "very large"
was 46684428. Limit to an order of magnitude less than
that to be safe from changes to the cache record. */
if (size > 5000000)
size = 5000000;

daemon->cachesize = size;
}

0 comments on commit a660529

Please sign in to comment.
You can’t perform that action at this time.