dnsmasq: latest pre-2.81 patches

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
v19.07.3_mercusys_ac12_duma
Kevin Darbyshire-Bryant 5 years ago
parent 40bb2ae211
commit 352db3e62a

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dnsmasq PKG_NAME:=dnsmasq
PKG_VERSION:=2.80 PKG_VERSION:=2.80
PKG_RELEASE:=6 PKG_RELEASE:=7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq

@ -1,7 +1,7 @@
From a799ca0c6314ad73a97bc6c89382d2712a9c0b0e Mon Sep 17 00:00:00 2001 From a799ca0c6314ad73a97bc6c89382d2712a9c0b0e Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Thu, 18 Oct 2018 19:35:29 +0100 Date: Thu, 18 Oct 2018 19:35:29 +0100
Subject: [PATCH 01/30] Impove cache behaviour for TCP connections. Subject: [PATCH 01/32] Impove cache behaviour for TCP connections.
For ease of implementaion, dnsmasq has always forked a new process to For ease of implementaion, dnsmasq has always forked a new process to
handle each incoming TCP connection. A side-effect of this is that any handle each incoming TCP connection. A side-effect of this is that any

@ -1,7 +1,7 @@
From a220545c4277cba534be5ef4638b5076fc7d2cf4 Mon Sep 17 00:00:00 2001 From a220545c4277cba534be5ef4638b5076fc7d2cf4 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Mon, 22 Oct 2018 18:21:48 +0100 Date: Mon, 22 Oct 2018 18:21:48 +0100
Subject: [PATCH 02/30] Ensure that AD bit is reset on answers from Subject: [PATCH 02/32] Ensure that AD bit is reset on answers from
--address=/<domain>/<address>. --address=/<domain>/<address>.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>

@ -1,7 +1,7 @@
From ee8750451b49d27b180517a4e35b636be0fae575 Mon Sep 17 00:00:00 2001 From ee8750451b49d27b180517a4e35b636be0fae575 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Tue, 23 Oct 2018 22:10:17 +0100 Date: Tue, 23 Oct 2018 22:10:17 +0100
Subject: [PATCH 03/30] Remove ability to compile without IPv6 support. Subject: [PATCH 03/32] Remove ability to compile without IPv6 support.
This was the source of a large number of #ifdefs, originally This was the source of a large number of #ifdefs, originally
included for use with old embedded libc versions. I'm included for use with old embedded libc versions. I'm

@ -1,7 +1,7 @@
From cf5984367bc6a949e3803a576512c5a7bc48ebab Mon Sep 17 00:00:00 2001 From cf5984367bc6a949e3803a576512c5a7bc48ebab Mon Sep 17 00:00:00 2001
From: Vladislav Grishenko <themiron@mail.ru> From: Vladislav Grishenko <themiron@mail.ru>
Date: Thu, 18 Oct 2018 04:55:21 +0500 Date: Thu, 18 Oct 2018 04:55:21 +0500
Subject: [PATCH 04/30] Don't forward *.bind/*.server queries upstream Subject: [PATCH 04/32] Don't forward *.bind/*.server queries upstream
Chaos .bind and .server (RFC4892) zones are local, therefore Chaos .bind and .server (RFC4892) zones are local, therefore
don't forward queries upstream to avoid mixing with supported don't forward queries upstream to avoid mixing with supported

@ -1,7 +1,7 @@
From cbb5b17ad8e03e08ade62376a4f6a2066e55960d Mon Sep 17 00:00:00 2001 From cbb5b17ad8e03e08ade62376a4f6a2066e55960d Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Tue, 23 Oct 2018 23:45:57 +0100 Date: Tue, 23 Oct 2018 23:45:57 +0100
Subject: [PATCH 05/30] Fix logging in cf5984367bc6a949e3803a576512c5a7bc48ebab Subject: [PATCH 05/32] Fix logging in cf5984367bc6a949e3803a576512c5a7bc48ebab
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
--- ---

@ -1,7 +1,7 @@
From 6f7812d97bc8f87004c0a5069c6c94c64af78106 Mon Sep 17 00:00:00 2001 From 6f7812d97bc8f87004c0a5069c6c94c64af78106 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Tue, 23 Oct 2018 23:54:44 +0100 Date: Tue, 23 Oct 2018 23:54:44 +0100
Subject: [PATCH 06/30] Fix spurious AD flags in some DNS replies from local Subject: [PATCH 06/32] Fix spurious AD flags in some DNS replies from local
config. config.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>

@ -1,7 +1,7 @@
From 24b87607c1353e94689e8a2190571ab3f3b36f31 Mon Sep 17 00:00:00 2001 From 24b87607c1353e94689e8a2190571ab3f3b36f31 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com> From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
Date: Wed, 24 Oct 2018 22:30:18 +0100 Date: Wed, 24 Oct 2018 22:30:18 +0100
Subject: [PATCH 07/30] Do not rely on dead code elimination, use array Subject: [PATCH 07/32] Do not rely on dead code elimination, use array
instead. Make options bits derived from size and count. Use size of option instead. Make options bits derived from size and count. Use size of option
bits and last supported bit in computation. No new change would be required bits and last supported bit in computation. No new change would be required
when new options are added. Just change OPT_LAST constant. when new options are added. Just change OPT_LAST constant.

@ -1,7 +1,7 @@
From 3a5a84cdd1488bad118eeac72d09a60299bca744 Mon Sep 17 00:00:00 2001 From 3a5a84cdd1488bad118eeac72d09a60299bca744 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Wed, 31 Oct 2018 21:30:13 +0000 Date: Wed, 31 Oct 2018 21:30:13 +0000
Subject: [PATCH 08/30] Fix Makefile lines generating UBUS linker config. Subject: [PATCH 08/32] Fix Makefile lines generating UBUS linker config.
If arg2 of pkg-wrapper is "--copy", then arg1 is NOT the name of If arg2 of pkg-wrapper is "--copy", then arg1 is NOT the name of
the package manager (--copy doesn't invoke it) it's a secondary the package manager (--copy doesn't invoke it) it's a secondary

@ -1,7 +1,7 @@
From 122392e0b352507cabb9e982208d35d2e56902e0 Mon Sep 17 00:00:00 2001 From 122392e0b352507cabb9e982208d35d2e56902e0 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Wed, 31 Oct 2018 22:24:02 +0000 Date: Wed, 31 Oct 2018 22:24:02 +0000
Subject: [PATCH 09/30] Revert 68f6312d4bae30b78daafcd6f51dc441b8685b1e Subject: [PATCH 09/32] Revert 68f6312d4bae30b78daafcd6f51dc441b8685b1e
The above is intended to increase robustness, but actually does the The above is intended to increase robustness, but actually does the
opposite. The problem is that by ignoring SERVFAIL messages and hoping opposite. The problem is that by ignoring SERVFAIL messages and hoping

@ -1,7 +1,7 @@
From 48d12f14c9c0fc8cf943b52774c3892517dd72d4 Mon Sep 17 00:00:00 2001 From 48d12f14c9c0fc8cf943b52774c3892517dd72d4 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Fri, 2 Nov 2018 21:55:04 +0000 Date: Fri, 2 Nov 2018 21:55:04 +0000
Subject: [PATCH 10/30] Remove the NO_FORK compile-time option, and support for Subject: [PATCH 10/32] Remove the NO_FORK compile-time option, and support for
uclinux. uclinux.
In an era where everything has an MMU, this looks like In an era where everything has an MMU, this looks like

@ -1,7 +1,7 @@
From 59e470381f84f2fdf0640c7bc67827f3f0c64784 Mon Sep 17 00:00:00 2001 From 59e470381f84f2fdf0640c7bc67827f3f0c64784 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com> From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
Date: Fri, 2 Nov 2018 22:39:39 +0000 Date: Fri, 2 Nov 2018 22:39:39 +0000
Subject: [PATCH 11/30] Free config file values on parsing errors. Subject: [PATCH 11/32] Free config file values on parsing errors.
This time I have a little bit more controversal patches. But I think This time I have a little bit more controversal patches. But I think
still useful. They fixes memory leaks that might occur in some cases. still useful. They fixes memory leaks that might occur in some cases.

@ -1,7 +1,7 @@
From 07e25da5bf26d46aad4f1d2eb19b260789182004 Mon Sep 17 00:00:00 2001 From 07e25da5bf26d46aad4f1d2eb19b260789182004 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Sun, 16 Dec 2018 18:21:58 +0000 Date: Sun, 16 Dec 2018 18:21:58 +0000
Subject: [PATCH 13/30] Treat DS and DNSKEY queries being forwarded the same as Subject: [PATCH 13/32] Treat DS and DNSKEY queries being forwarded the same as
those locally originated. those locally originated.
The queries will not be forwarded to a server for a domain, unless The queries will not be forwarded to a server for a domain, unless

@ -1,7 +1,7 @@
From 137e9f878fafb38369eab7d9dfe84e4228ff5f89 Mon Sep 17 00:00:00 2001 From 137e9f878fafb38369eab7d9dfe84e4228ff5f89 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com> From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
Date: Sun, 16 Dec 2018 21:25:29 +0000 Date: Sun, 16 Dec 2018 21:25:29 +0000
Subject: [PATCH 14/30] Fix option parsing errors introduced in Subject: [PATCH 14/32] Fix option parsing errors introduced in
59e470381f84f2fdf0640c7bc67827f3f0c64784 59e470381f84f2fdf0640c7bc67827f3f0c64784
Thanks to Kevin Darbyshire-Bryant for spotting this. Thanks to Kevin Darbyshire-Bryant for spotting this.

@ -1,7 +1,7 @@
From 3becf468bad699bfdcb2d18d553bc72d4c79e23c Mon Sep 17 00:00:00 2001 From 3becf468bad699bfdcb2d18d553bc72d4c79e23c Mon Sep 17 00:00:00 2001
From: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk> From: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
Date: Wed, 12 Dec 2018 12:00:19 +0000 Date: Wed, 12 Dec 2018 12:00:19 +0000
Subject: [PATCH 15/30] fix ipv6 ipset bug in master Subject: [PATCH 15/32] fix ipv6 ipset bug in master
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit

@ -1,7 +1,7 @@
From b683cf37f9f3dd3dc5d95d621ee75850d559b2e4 Mon Sep 17 00:00:00 2001 From b683cf37f9f3dd3dc5d95d621ee75850d559b2e4 Mon Sep 17 00:00:00 2001
From: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk> From: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
Date: Mon, 10 Dec 2018 10:34:35 +0000 Date: Mon, 10 Dec 2018 10:34:35 +0000
Subject: [PATCH 16/30] build failure on master with NO_DHCPv6 and fix.... Subject: [PATCH 16/32] build failure on master with NO_DHCPv6 and fix....
Hi Simon, Hi Simon,

@ -1,7 +1,7 @@
From e7bfd556c079c8b5e7425aed44abc35925b24043 Mon Sep 17 00:00:00 2001 From e7bfd556c079c8b5e7425aed44abc35925b24043 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Mon, 31 Dec 2018 20:51:15 +0000 Date: Mon, 31 Dec 2018 20:51:15 +0000
Subject: [PATCH 17/30] Alter DHCP address selection after DECLINE in Subject: [PATCH 17/32] Alter DHCP address selection after DECLINE in
consec-addr mode. Avoid offering the same address after a recieving a DECLINE consec-addr mode. Avoid offering the same address after a recieving a DECLINE
message to stop an infinite protocol loop. This has long been done in default message to stop an infinite protocol loop. This has long been done in default
address allocation mode: this adds similar behaviour when allocaing addresses address allocation mode: this adds similar behaviour when allocaing addresses

@ -1,7 +1,7 @@
From bde46476ee06c96e821653dfdb8fa11fe7326998 Mon Sep 17 00:00:00 2001 From bde46476ee06c96e821653dfdb8fa11fe7326998 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Mon, 31 Dec 2018 23:28:24 +0000 Date: Mon, 31 Dec 2018 23:28:24 +0000
Subject: [PATCH 18/30] Tidy all_addr union, merge log and rcode fields. Subject: [PATCH 18/32] Tidy all_addr union, merge log and rcode fields.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
--- ---

@ -1,7 +1,7 @@
From 65a01b71bb433c9466e4c78a73a8d8ed218ed4e8 Mon Sep 17 00:00:00 2001 From 65a01b71bb433c9466e4c78a73a8d8ed218ed4e8 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Mon, 31 Dec 2018 23:56:33 +0000 Date: Mon, 31 Dec 2018 23:56:33 +0000
Subject: [PATCH 19/30] Tidy address-union handling: move class into explicit Subject: [PATCH 19/32] Tidy address-union handling: move class into explicit
argument. argument.
This moves the class argument to cache-insert into an argument, This moves the class argument to cache-insert into an argument,

@ -1,7 +1,7 @@
From ab194ed7ca433e4e2e8b2ec338bfa4e6aa886a4b Mon Sep 17 00:00:00 2001 From ab194ed7ca433e4e2e8b2ec338bfa4e6aa886a4b Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Tue, 1 Jan 2019 01:35:30 +0000 Date: Tue, 1 Jan 2019 01:35:30 +0000
Subject: [PATCH 20/30] Futher address union tidying. Subject: [PATCH 20/32] Futher address union tidying.
Pass DNSKEY and DS data into cache_insert via the address argument, Pass DNSKEY and DS data into cache_insert via the address argument,
now these data types are included in struct all_addr. now these data types are included in struct all_addr.

@ -1,7 +1,7 @@
From cc921df9ceac79acf9f1c477d015a3d88275422d Mon Sep 17 00:00:00 2001 From cc921df9ceac79acf9f1c477d015a3d88275422d Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Wed, 2 Jan 2019 22:48:59 +0000 Date: Wed, 2 Jan 2019 22:48:59 +0000
Subject: [PATCH 21/30] Remove nested struct/union in cache records and Subject: [PATCH 21/32] Remove nested struct/union in cache records and
all_addr. all_addr.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>

@ -1,7 +1,7 @@
From 2c594732eb7391e7cfa817598e33e61cab71131f Mon Sep 17 00:00:00 2001 From 2c594732eb7391e7cfa817598e33e61cab71131f Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Thu, 3 Jan 2019 13:42:03 +0000 Date: Thu, 3 Jan 2019 13:42:03 +0000
Subject: [PATCH 22/30] File logic bug in cache-marshalling code. Introduced a Subject: [PATCH 22/32] File logic bug in cache-marshalling code. Introduced a
couple of commits back. couple of commits back.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>

@ -1,7 +1,7 @@
From 2daca52b80afdc92e7c976629a2bf8182335a626 Mon Sep 17 00:00:00 2001 From 2daca52b80afdc92e7c976629a2bf8182335a626 Mon Sep 17 00:00:00 2001
From: Christian Weiske <cweiske@cweiske.de> From: Christian Weiske <cweiske@cweiske.de>
Date: Thu, 3 Jan 2019 20:10:14 +0000 Date: Thu, 3 Jan 2019 20:10:14 +0000
Subject: [PATCH 23/30] Fix typo in ra-param man page section. Subject: [PATCH 23/32] Fix typo in ra-param man page section.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
--- ---

@ -1,7 +1,7 @@
From 5b99eae59d59a8e34a7e512059b98bbd803312f2 Mon Sep 17 00:00:00 2001 From 5b99eae59d59a8e34a7e512059b98bbd803312f2 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Sun, 6 Jan 2019 23:09:50 +0000 Date: Sun, 6 Jan 2019 23:09:50 +0000
Subject: [PATCH 24/30] Cache SRV records. Subject: [PATCH 24/32] Cache SRV records.
Inpsired by a patch from Jeremy Allison, but completely re-rolled Inpsired by a patch from Jeremy Allison, but completely re-rolled
by srk. All bugs are mine. by srk. All bugs are mine.

@ -1,7 +1,7 @@
From a90f09db4cc635941a32b973b57e58c662569625 Mon Sep 17 00:00:00 2001 From a90f09db4cc635941a32b973b57e58c662569625 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Wed, 9 Jan 2019 15:08:16 +0000 Date: Wed, 9 Jan 2019 15:08:16 +0000
Subject: [PATCH 25/30] Fix crash freeing negative SRV cache entries. Subject: [PATCH 25/32] Fix crash freeing negative SRV cache entries.
Thanks to Daniel for finding this one. Thanks to Daniel for finding this one.

@ -1,7 +1,7 @@
From 2896e2485e44c04e73a0b7c9f7cbc9c8515d0800 Mon Sep 17 00:00:00 2001 From 2896e2485e44c04e73a0b7c9f7cbc9c8515d0800 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Wed, 9 Jan 2019 15:12:34 +0000 Date: Wed, 9 Jan 2019 15:12:34 +0000
Subject: [PATCH 26/30] Check for not(DS or DNSKEY) in Subject: [PATCH 26/32] Check for not(DS or DNSKEY) in
is_outdated_cname_pointer() is_outdated_cname_pointer()
Previous check was _for_ IPV4, IPv6 CNAME, and I missed adding SRV. Previous check was _for_ IPV4, IPv6 CNAME, and I missed adding SRV.

@ -1,7 +1,7 @@
From 9c0d445ef4abffa2b9342ad65e85ef425c1f83bb Mon Sep 17 00:00:00 2001 From 9c0d445ef4abffa2b9342ad65e85ef425c1f83bb Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Wed, 9 Jan 2019 17:57:56 +0000 Date: Wed, 9 Jan 2019 17:57:56 +0000
Subject: [PATCH 27/30] Fix e7bfd556c079c8b5e7425aed44abc35925b24043 to Subject: [PATCH 27/32] Fix e7bfd556c079c8b5e7425aed44abc35925b24043 to
actually work. actually work.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>

@ -1,7 +1,7 @@
From 4bf62f616b82fad7a7f91195b0204dd64d79a35c Mon Sep 17 00:00:00 2001 From 4bf62f616b82fad7a7f91195b0204dd64d79a35c Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Thu, 10 Jan 2019 21:54:22 +0000 Date: Thu, 10 Jan 2019 21:54:22 +0000
Subject: [PATCH 28/30] Tidy cache_blockdata_free() Subject: [PATCH 28/32] Tidy cache_blockdata_free()
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
--- ---

@ -1,7 +1,7 @@
From f8c77edbdffb8ada7753ea9fa104f0f6da70cfe3 Mon Sep 17 00:00:00 2001 From f8c77edbdffb8ada7753ea9fa104f0f6da70cfe3 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk> From: Simon Kelley <simon@thekelleys.org.uk>
Date: Thu, 10 Jan 2019 21:58:18 +0000 Date: Thu, 10 Jan 2019 21:58:18 +0000
Subject: [PATCH 29/30] Fix removal of DHCP_CLIENT_MAC options from DHCPv6 Subject: [PATCH 29/32] Fix removal of DHCP_CLIENT_MAC options from DHCPv6
relay replies. relay replies.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>

@ -1,7 +1,7 @@
From 18eac67c0a15b673c8d27002c248651b308093e4 Mon Sep 17 00:00:00 2001 From 18eac67c0a15b673c8d27002c248651b308093e4 Mon Sep 17 00:00:00 2001
From: Steven Siloti <ssiloti@gmail.com> From: Steven Siloti <ssiloti@gmail.com>
Date: Sun, 13 Jan 2019 22:56:36 +0000 Date: Sun, 13 Jan 2019 22:56:36 +0000
Subject: [PATCH 30/30] Fix entries in /etc/hosts disabling static leases. Subject: [PATCH 30/32] Fix entries in /etc/hosts disabling static leases.
It is possible for a config entry to have one address family specified by a It is possible for a config entry to have one address family specified by a
dhcp-host directive and the other added from /etc/hosts. This is especially dhcp-host directive and the other added from /etc/hosts. This is especially

@ -1,7 +1,8 @@
From f52bb5be437ab33d7cd10f0ff1cdf0bb86857cf7 Mon Sep 17 00:00:00 2001 From d2d49907435433001ab00698a3e9ca2a7b5b3236 Mon Sep 17 00:00:00 2001
From: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> From: Steven Siloti <ssiloti@gmail.com>
Date: Wed, 16 Jan 2019 09:48:07 +0000 Date: Thu, 17 Jan 2019 22:52:13 +0000
Subject: [PATCH 31/31] fix previous commit Subject: [PATCH 31/32] Fix missing braces in
8eac67c0a15b673c8d27002c248651b308093e4
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
--- ---

@ -0,0 +1,61 @@
From 28cfe36e1eee9d2c234e0256ad459956b415a3bb Mon Sep 17 00:00:00 2001
From: Brian Haley <haleyb.dev@gmail.com>
Date: Thu, 17 Jan 2019 23:21:23 +0000
Subject: [PATCH 32/32] Change read_leases() to skip invalid entries.
There's no reason to stop reading the existing lease file
when dnsmasq is started and an invalid entry is found, it
can just be ignored. This was fallout from an Openstack
bug where the file was being written incorrectly with []
around IPv6 addresses.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
---
src/lease.c | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
--- a/src/lease.c
+++ b/src/lease.c
@@ -60,8 +60,13 @@ static int read_leases(time_t now, FILE
if (fscanf(leasestream, " %64s %255s %764s",
daemon->namebuff, daemon->dhcp_buff, daemon->packet) != 3)
- return 0;
-
+ {
+ my_syslog(MS_DHCP | LOG_WARNING, _("ignoring invalid line in lease database: %s %s %s %s ..."),
+ daemon->dhcp_buff3, daemon->dhcp_buff2,
+ daemon->namebuff, daemon->dhcp_buff);
+ continue;
+ }
+
if (inet_pton(AF_INET, daemon->namebuff, &addr.addr4))
{
if ((lease = lease4_allocate(addr.addr4)))
@@ -92,7 +97,12 @@ static int read_leases(time_t now, FILE
}
#endif
else
- return 0;
+ {
+ my_syslog(MS_DHCP | LOG_WARNING, _("ignoring invalid line in lease database, bad address: %s"),
+ daemon->namebuff);
+ continue;
+ }
+
if (!lease)
die (_("too many stored leases"), NULL, EC_MISC);
@@ -172,10 +182,8 @@ void lease_init(time_t now)
if (leasestream)
{
if (!read_leases(now, leasestream))
- my_syslog(MS_DHCP | LOG_ERR, _("failed to parse lease database, invalid line: %s %s %s %s ..."),
- daemon->dhcp_buff3, daemon->dhcp_buff2,
- daemon->namebuff, daemon->dhcp_buff);
-
+ my_syslog(MS_DHCP | LOG_ERR, _("failed to parse lease database cleanly"));
+
if (ferror(leasestream))
die(_("failed to read lease file %s: %s"), daemon->lease_file, EC_FILE);
}
Loading…
Cancel
Save