Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update embedded dnsmasq to v2.81 #652

Merged
merged 154 commits into from Apr 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
6d90dfa
Impove cache behaviour for TCP connections.
simonkelley Oct 18, 2018
79ae6a2
Ensure that AD bit is reset on answers from --address=/<domain>/<addr…
simonkelley Oct 22, 2018
de043f7
Remove ability to compile without IPv6 support.
simonkelley Oct 23, 2018
598d196
Don't forward *.bind/*.server queries upstream
themiron Oct 17, 2018
5f11a96
Fix logging in cf5984367bc6a949e3803a576512c5a7bc48ebab
simonkelley Oct 23, 2018
21dc776
Fix spurious AD flags in some DNS replies from local config.
simonkelley Oct 23, 2018
bd092cc
Fix build after y2038 changes in glib.
Jul 24, 2019
bcd50e9
Do not rely on dead code elimination, use array instead. Make options…
pemensik Oct 24, 2018
7a375d7
Revert 68f6312d4bae30b78daafcd6f51dc441b8685b1e
simonkelley Oct 31, 2018
9a43614
Remove the NO_FORK compile-time option, and support for uclinux.
simonkelley Nov 2, 2018
4af8a13
Free config file values on parsing errors.
pemensik Nov 2, 2018
efc1a81
Treat DS and DNSKEY queries being forwarded the same as those locally…
simonkelley Dec 16, 2018
7efe91c
Fix option parsing errors introduced in 59e470381f84f2fdf0640c7bc6782…
pemensik Dec 16, 2018
a512654
Manual application of patch: build failure on master with NO_DHCPv6
DL6ER Aug 31, 2019
7c94acc
Alter DHCP address selection after DECLINE in consec-addr mode. Avoid…
simonkelley Dec 31, 2018
a3c225e
Tidy all_addr union, merge log and rcode fields.
simonkelley Dec 31, 2018
1f03c40
Tidy address-union handling: move class into explicit argument.
simonkelley Dec 31, 2018
2eca74e
Futher address union tidying.
simonkelley Jan 1, 2019
e4ad1e3
Remove nested struct/union in cache records and all_addr.
simonkelley Jan 2, 2019
3d5811f
Implement necessary FTL changes due to the modified type and structur…
DL6ER Aug 31, 2019
c6f1c4b
File logic bug in cache-marshalling code. Introduced a couple of comm…
simonkelley Jan 3, 2019
6631fde
Cache SRV records.
simonkelley Jan 6, 2019
38810ef
Fix crash freeing negative SRV cache entries.
simonkelley Jan 9, 2019
8944e97
Check for not(DS or DNSKEY) in is_outdated_cname_pointer()
simonkelley Jan 9, 2019
daef506
Fix e7bfd556c079c8b5e7425aed44abc35925b24043 to actually work.
simonkelley Jan 9, 2019
ae47e13
Tidy cache_blockdata_free()
simonkelley Jan 10, 2019
0940127
Fix removal of DHCP_CLIENT_MAC options from DHCPv6 relay replies.
simonkelley Jan 10, 2019
2cec711
Fix entries in /etc/hosts disabling static leases.
ssiloti Jan 13, 2019
9e97a17
Fix missing braces in 8eac67c0a15b673c8d27002c248651b308093e4
ssiloti Jan 17, 2019
d51dfe0
Change read_leases() to skip invalid entries.
brianphaley Jan 17, 2019
16e85da
Fix line counting when reading /etc/hosts.
simonkelley Feb 27, 2019
5e695db
Fix bug added in 2.80 non-terminal code which returns NODATA instead …
Feb 27, 2019
5153c99
lease: prune lease as soon as expired
ffourcot Feb 11, 2019
fc76fbc
More /etc/hosts linecount fixing.
simonkelley Mar 1, 2019
367bce5
Small error-message tweak, for clarity.
simonkelley Mar 1, 2019
da33efb
Don't attempt to parse a sequence of hex digits without any colons as…
simonkelley Mar 4, 2019
eb94c22
Remove unclear gcc-ism in conditional expression.
simonkelley Mar 5, 2019
b7f8990
Support TCP fastopen on incoming and outgoing connections.
simonkelley Mar 10, 2019
0431174
Improve kernel-capability manipulation code under Linux.
simonkelley Mar 16, 2019
8a24cd0
Add --shared-network DHCP configuration.
simonkelley Mar 27, 2019
8b5934f
Fix cmsg(3) API usage on OpenBSD
jcourreges Mar 22, 2019
b84f421
Apply fix from c6cc455dd191fbea56ee14a0ef88a7d655a6fe9a in DHCP code.
simonkelley Mar 28, 2019
95f399b
Don't retry close() syscalls after an EINTR errors.
simonkelley Mar 29, 2019
849929a
Allow more then one --conf-file on the command line.
simonkelley Mar 29, 2019
49fa904
Improved UBus supported
jawi Mar 25, 2019
6b5c4dd
Fix wrong return code from explore_rrset() with some errors.
simonkelley Jul 15, 2019
bc56bff
Fix memory leak in helper.c
simonkelley Aug 14, 2019
b5b0c22
Fix build with libnettle 3.5
themiron Jun 26, 2019
d3a14ef
Always force AD bit to zero in authoritative DNS answers.
simonkelley Aug 20, 2019
c12ef83
Truncate stupidly large cache sizes.
simonkelley Aug 20, 2019
e788cc1
Compilation fix for MacOS.
simonkelley Aug 22, 2019
4836269
DNSSEC: Unsigned RRs in auth section proving that a DS doesn't exist …
simonkelley Aug 29, 2019
e145e7f
Merge branch 'development' into tweak/update-dnsmasq
DL6ER Sep 1, 2019
c2675ef
DNSSEC: implement RFC-4036 para 5.3.3. rules on TTL values.
simonkelley Sep 3, 2019
5eae2bc
DNSSEC: unsigned RRs in the auth section are not bogus.
simonkelley Sep 3, 2019
7434314
Merge branch 'development' into tweak/update-dnsmasq
DL6ER Sep 5, 2019
fcc8177
Fix botch in ae7a3b9d2e8705af203a1347c397718a24331747
simonkelley Sep 3, 2019
2396d66
Keep suitable capabilities if we may bind server sockets to interface…
simonkelley Sep 14, 2019
a9d289a
Fix 90d7c6b97dbae2c913e7bb7af9c6c0f874493092 CAP_NET_RAW, not CAP_NET…
simonkelley Sep 16, 2019
0d8d25f
Merge branch 'development' into tweak/update-dnsmasq
DL6ER Sep 27, 2019
dc01810
Fix crash when negative SRV response over TCP gets stored in LRU cach…
alinnastac Sep 30, 2019
f6aff05
Fix crash on REFUSED answers to DNSSEC queries.
simonkelley Oct 11, 2019
8cc3b75
Add missing dump_packet() for DNSSEC query retries.
simonkelley Oct 11, 2019
83b875f
Merge branch 'development' into tweak/update-dnsmasq
DL6ER Oct 12, 2019
5aaf8cb
Update to 04db1483d1a86823240d986e10cfdbf75e1b9954
simonkelley Oct 12, 2019
4edebc8
Check for REFUSED and SERVFAIL replies to DNSKEY queries.
simonkelley Oct 12, 2019
87dcd92
Add dhcp-ignore-clid configuration option
ffourcot Jun 20, 2019
ccb4c74
Fix too small control array in tftp code on BSD and SOLARIS
simonkelley Oct 12, 2019
11fd553
Merge branch 'development' into update/dnsmasq
DL6ER Oct 17, 2019
2bb7627
Add FTl debugging support for two new dnsmasq flags (F_SERVFAIL and F…
DL6ER Oct 17, 2019
6699910
fix ipv6 ipset bug in master
ldir-EDB0 Dec 12, 2018
0829869
Generalise CNAME handling.
simonkelley Oct 25, 2019
b659dd3
Fix bugs in caching CNAMEs with target to SRV records.
simonkelley Oct 25, 2019
f9acd58
Don't waste time caching zero-TTL DNS records.
simonkelley Oct 25, 2019
fbe0825
Don't silently discard all-zeroes adddresses in --host-record.
simonkelley Oct 25, 2019
13a44a9
DHCPv6 IAID should be of unsigned type. It is derived from strtoul() …
DL6ER Oct 20, 2019
0a99307
Generalise locally-configured CNAME handling.
simonkelley Oct 29, 2019
304c5dc
Extend non-terminal name handling to all locally configured RRs.
simonkelley Oct 29, 2019
5ae5903
Tidy up CNAME representaion.
simonkelley Oct 30, 2019
eb9545e
Fix out-of-date comment.
simonkelley Oct 30, 2019
2ac6552
Fix dhcp-name-match to function when name supplied in --dhcp-host.
simonkelley Oct 30, 2019
f1dd02e
Merge branch 'development' into update/dnsmasq
DL6ER Nov 12, 2019
138c6c2
Merge branch 'development' into update/dnsmasq
DL6ER Nov 26, 2019
d9da486
Fix spin-crash in new CNAME code (b59a5c2567aafac35734d9660d948061399…
simonkelley Nov 30, 2019
a0f56c6
New CNAME code shouldn't spin on CNAME loops.
simonkelley Nov 30, 2019
a673ff3
Fix bug which gave zero-length DHCPv6 packets if sendto() is interrup…
simonkelley Dec 3, 2019
61c4eb8
Spelling and format fixes.
scop Dec 5, 2019
757c976
Support DHCP option 150 (TFTP server address, RFC 5859).
scop Dec 5, 2019
73e6cb9
Fix dhcp-name-match to always match client-supplied name.
simonkelley Dec 5, 2019
d59b05f
Fix buffer overflow checking in parse_hex(). The inputs to parse_hex …
simonkelley Dec 12, 2019
60c0e10
Merge branch 'development' into update/dnsmasq
DL6ER Dec 16, 2019
99ff0c5
Merge branch 'development' into update/dnsmasq
DL6ER Dec 18, 2019
baa69a8
Fix crash in DHCP option parsing.
simonkelley Dec 12, 2019
44ef1bb
Avoid RA code trampling on DHCPv6 messages.
simonkelley Dec 20, 2019
cbd8a2c
Merge branch 'development' into update/dnsmasq
DL6ER Dec 31, 2019
1a3737e
Add --tftp-single-port option.
simonkelley Jan 5, 2020
469ed22
Update copyrights to 2020.
simonkelley Jan 5, 2020
97cb49f
Don't send RAs on interfaces without a link-local address.
simonkelley Jan 5, 2020
dc9b80f
Merge branch 'development' into update/dnsmasq
DL6ER Jan 5, 2020
bb8ae74
Check for SERV_NO_REBIND on unqualified domains
guns Dec 30, 2019
847379f
Tweaks to TFTP.
simonkelley Jan 6, 2020
8819498
Revert tftp block number overflow check. Wrapping block nos is fine.
simonkelley Jan 7, 2020
ebadc60
Remove experimental DHCPv6 prefix-class support.
simonkelley Jan 7, 2020
4ecc8e6
Enhance --conf-dir to load files in a deterministic order.
simonkelley Jan 10, 2020
66ba32b
Do not try to measure length of NULL pointer. This avoids a crash for…
DL6ER Jan 18, 2020
2829771
Fix the disease, not the symptom in e40d8bef3bbf2fe8e1287663b2c848170…
simonkelley Jan 26, 2020
df44363
Fix RA problems with two interfaces on same IPv6 subnet.
simonkelley Jan 27, 2020
4a67711
Fix infinite-loop router advert problems.
simonkelley Jan 27, 2020
61bd512
Support prefixed ranges of ipv6 addresses in dhcp-host.
simonkelley Feb 3, 2020
7592ad9
Extend 79aba0f10ad0157fb4f48afbbcb03f094caff97a for multiple IPv6 add…
simonkelley Feb 6, 2020
7e06e8b
Add tag filtering of dhcp-host directives.
simonkelley Feb 7, 2020
3ab876b
Fix problem with netlink socket and TCP DNS.
simonkelley Feb 9, 2020
dc17721
Fix bug with prefixed wildcard addresses in 137286e9baecf6a3ba97722ef…
simonkelley Feb 10, 2020
f519666
Restore ability to answer non-recursive requests
pemensik Apr 12, 2019
4a913c8
Remove obsolete Pi-hole modification.
DL6ER Feb 15, 2020
cf8b3f0
Use <poll.h> instead of <sys/poll.h>
DDoSolitary Apr 28, 2019
76c7085
dnssec: add hostname info to insecure DS warning
ldir-EDB0 May 11, 2019
053b1b4
Allow empty server spec in --rev-server, to match --server.
simonkelley Feb 11, 2020
793da42
Merge branch 'release/v5.0' into update/dnsmasq
DL6ER Feb 15, 2020
7bbac61
Remove DSA signature verification from DNSSEC, as specified in RFC 8624.
simonkelley Feb 26, 2020
310fc92
Add --script-on-renewal option.
simonkelley Feb 27, 2020
43542f2
Add support for ED448 DNSSEC signature verification.
simonkelley Feb 29, 2020
f02d039
Support ECC-GOST DNSSEC signature algorithm.
simonkelley Feb 29, 2020
db54d0a
Factor out closing all file descriptors for later optimisation.
simonkelley Mar 2, 2020
e26f786
Optimise closing file descriptors.
simonkelley Mar 2, 2020
948a5e0
Merge branch 'release/v5.0' into update/dnsmasq
DL6ER Mar 2, 2020
6a6b6eb
option.c: fix NO_DHCP6 build error
ldir-EDB0 Mar 2, 2020
06dea6d
Ignore routes in non-main tables
donaldsharp Mar 2, 2020
eda454f
Trivial formatting fix.
simonkelley Mar 2, 2020
3e8c114
Fix parameters to setsockopt() for TCP_FASTOPEN.
mandree Mar 5, 2020
6fd9e7d
Update decline address handling in DHCPv6 for new multi-address world.
simonkelley Mar 5, 2020
8b1b92b
Remove compiler warnings in IPv6 checksum code in dump.c
simonkelley Mar 5, 2020
83b12c8
Compiler warning.
simonkelley Mar 5, 2020
3c535bf
Fix compiler warning.
simonkelley Mar 5, 2020
11540ea
Commit cf8b3f0d22050acdf6c080f43c75a8cfcc5d4c37 by DDosSolarity broke…
DL6ER Mar 6, 2020
58afd08
Diverge error handling between *BSD and Linux.
brad0 Mar 8, 2020
3f80e24
suppress non linux network unused var warnings
ldir-EDB0 Mar 6, 2020
a688ea0
rfc3315: fix incorrect logical '&&' warning
ldir-EDB0 Mar 6, 2020
ee2a53c
Add DHCPv6 ntp-server (56) option handling.
themiron Mar 8, 2020
5db4c0d
Fix error in IPv6 prefix calculation.
pemensik Mar 8, 2020
5b67754
Set NETLINK_NO_ENOBUFS in netlink socket, to avoid POLLERR returns.
simonkelley Mar 10, 2020
f004390
Extend stop-dns-rebind to reject IPv6 LL and ULA addresses. We also r…
DL6ER Mar 17, 2020
1d35d4d
Handle old kernels that don't do NETLINK_NO_ENOBUFS.
simonkelley Mar 19, 2020
340a47b
Fixed resource leak on ubus_init failure.
oldium Mar 18, 2020
8f9cae0
Merge branch 'release/v5.0' into update/dnsmasq
DL6ER Mar 29, 2020
52d9255
Fix nameserver list in auth mode.
simonkelley Mar 28, 2020
6142ec5
Allow overriding of ubus service name.
oldium Mar 20, 2020
41b1296
Merge branch 'release/v5.0' into update/dnsmasq
DL6ER Apr 2, 2020
3b627c7
Fix rare problem allocating frec for DNSSEC.
simonkelley Apr 4, 2020
3cfa419
Tweak to DNSSEC logging.
simonkelley Apr 4, 2020
92c582e
Merge branch 'release/v5.0' into update/dnsmasq
DL6ER Apr 7, 2020
13edf13
src/dnsmasq/dnsmasq.c: Labeled a lonely #endif
stappersg Apr 6, 2020
b801c4a
Update dnsmasq version to pi-hole-v2.81
DL6ER Apr 12, 2020
7a78a1f
Merge branch 'release/v5.0' into update/dnsmasq
DL6ER Apr 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions Makefile
Expand Up @@ -11,7 +11,7 @@
IDIR = src
ODIR = build

DNSMASQ_VERSION = "pi-hole-2.80"
DNSMASQ_VERSION = "pi-hole-2.81"
DNSMASQ_OPTS = -DHAVE_DNSSEC -DHAVE_DNSSEC_STATIC
# Flags for compiling with libidn : -DHAVE_IDN
# Flags for compiling with libidn2: -DHAVE_LIBIDN2 -DIDN2_VERSION_NUMBER=0x02000003
Expand All @@ -25,7 +25,7 @@ FTL_OBJ = $(FTL_DB_OBJ) $(FTL_API_OBJ) main.o memory.o log.o daemon.o datastruct
DNSMASQ_DEPS = config.h dhcp-protocol.h dns-protocol.h radv-protocol.h dhcp6-protocol.h dnsmasq.h ip6addr.h metrics.h ../dnsmasq_interface.h
DNSMASQ_OBJ = arp.o dbus.o domain.o lease.o outpacket.o rrfilter.o auth.o dhcp6.o edns0.o log.o poll.o slaac.o blockdata.o dhcp.o forward.o \
loop.o radv.o tables.o bpf.o dhcp-common.o helper.o netlink.o rfc1035.o tftp.o cache.o dnsmasq.o inotify.o network.o rfc2131.o \
util.o conntrack.o dnssec.o ipset.o option.o rfc3315.o crypto.o dump.o ubus.o metrics.o
util.o conntrack.o dnssec.o ipset.o option.o rfc3315.o crypto.o dump.o ubus.o metrics.o

# Get git commit version and date
GIT_BRANCH := $(shell git branch | sed -n 's/^\* //p')
Expand Down Expand Up @@ -101,7 +101,8 @@ EXTRAWARN=-Werror -Waddress -Wlogical-op -Wmissing-field-initializers -Woverleng
-Wfloat-equal -Wbad-function-cast -Wwrite-strings -Wparentheses -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Winline $(EXTRAWARN_GCC8)

# -FILE_OFFSET_BITS=64: used by stat(). Avoids problems with files > 2 GB on 32bit machines
CCFLAGS=-std=gnu11 -pipe -I$(IDIR) $(WARN_FLAGS) -D_FILE_OFFSET_BITS=64 $(HARDENING_FLAGS) $(DEBUG_FLAGS) $(CFLAGS) $(SQLITE_FLAGS)
CCFLAGS=-std=gnu11 -pipe -I$(IDIR) $(WARN_FLAGS) -D_FILE_OFFSET_BITS=64 $(HARDENING_FLAGS) $(DEBUG_FLAGS) $(CFLAGS) $(SQLITE_FLAGS) -DHAVE_POLL_H
# We define HAVE_POLL_H as this is needed for the musl builds to succeed

# for FTL we need the pthread library
# for dnsmasq we need the nettle crypto library and the gmp maths library
Expand Down
33 changes: 10 additions & 23 deletions src/dnsmasq/arp.c
@@ -1,4 +1,4 @@
/* dnsmasq is Copyright (c) 2000-2018 Simon Kelley
/* dnsmasq is Copyright (c) 2000-2020 Simon Kelley

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -28,7 +28,7 @@ struct arp_record {
unsigned short hwlen, status;
int family;
unsigned char hwaddr[DHCP_CHADDR_MAX];
struct all_addr addr;
union all_addr addr;
struct arp_record *next;
};

Expand All @@ -44,11 +44,6 @@ static int filter_mac(int family, char *addrp, char *mac, size_t maclen, void *p
if (maclen > DHCP_CHADDR_MAX)
return 1;

#ifndef HAVE_IPV6
if (family != AF_INET)
return 1;
#endif

/* Look for existing entry */
for (arp = arps; arp; arp = arp->next)
{
Expand All @@ -57,16 +52,14 @@ static int filter_mac(int family, char *addrp, char *mac, size_t maclen, void *p

if (family == AF_INET)
{
if (arp->addr.addr.addr4.s_addr != ((struct in_addr *)addrp)->s_addr)
if (arp->addr.addr4.s_addr != ((struct in_addr *)addrp)->s_addr)
continue;
}
#ifdef HAVE_IPV6
else
{
if (!IN6_ARE_ADDR_EQUAL(&arp->addr.addr.addr6, (struct in6_addr *)addrp))
if (!IN6_ARE_ADDR_EQUAL(&arp->addr.addr6, (struct in6_addr *)addrp))
continue;
}
#endif

if (arp->status == ARP_EMPTY)
{
Expand Down Expand Up @@ -102,11 +95,9 @@ static int filter_mac(int family, char *addrp, char *mac, size_t maclen, void *p
arp->family = family;
memcpy(arp->hwaddr, mac, maclen);
if (family == AF_INET)
arp->addr.addr.addr4.s_addr = ((struct in_addr *)addrp)->s_addr;
#ifdef HAVE_IPV6
arp->addr.addr4.s_addr = ((struct in_addr *)addrp)->s_addr;
else
memcpy(&arp->addr.addr.addr6, addrp, IN6ADDRSZ);
#endif
memcpy(&arp->addr.addr6, addrp, IN6ADDRSZ);
}

return 1;
Expand All @@ -133,14 +124,12 @@ int find_mac(union mysockaddr *addr, unsigned char *mac, int lazy, time_t now)
continue;

if (arp->family == AF_INET &&
arp->addr.addr.addr4.s_addr != addr->in.sin_addr.s_addr)
arp->addr.addr4.s_addr != addr->in.sin_addr.s_addr)
continue;

#ifdef HAVE_IPV6
if (arp->family == AF_INET6 &&
!IN6_ARE_ADDR_EQUAL(&arp->addr.addr.addr6, &addr->in6.sin6_addr))
!IN6_ARE_ADDR_EQUAL(&arp->addr.addr6, &addr->in6.sin6_addr))
continue;
#endif

/* Only accept positive entries unless in lazy mode. */
if (arp->status != ARP_EMPTY || lazy || updated)
Expand Down Expand Up @@ -202,11 +191,9 @@ int find_mac(union mysockaddr *addr, unsigned char *mac, int lazy, time_t now)
arp->hwlen = 0;

if (addr->sa.sa_family == AF_INET)
arp->addr.addr.addr4.s_addr = addr->in.sin_addr.s_addr;
#ifdef HAVE_IPV6
arp->addr.addr4.s_addr = addr->in.sin_addr.s_addr;
else
memcpy(&arp->addr.addr.addr6, &addr->in6.sin6_addr, IN6ADDRSZ);
#endif
memcpy(&arp->addr.addr6, &addr->in6.sin6_addr, IN6ADDRSZ);
}

return 0;
Expand Down