Signed-off-by: Matthias Fischer <matthias.fischer(a)ipfire.org>
---
...for_TFTP_packet_headers_in_IPv6_correctly.patch | 35 ---------
src/patches/dnsmasq/002-Tidy_code.patch | 32 --------
..._hash-iterations_in_DNSSEC_NSEC3_checking.patch | 32 --------
.../004-Fix_memory_leak_in_inotify_code.patch | 37 ---------
src/patches/dnsmasq/005-Tidy.patch | 25 -------
src/patches/dnsmasq/006-Tidy_code.patch | 77 -------------------
src/patches/dnsmasq/007-NULL_pointer_check.patch | 25 -------
..._of_inet_pton_when_parsing_DHCPv4_options.patch | 54 --------------
...OPTION_NOMDEVICEID_if_MAC_address_unknown.patch | 72 ------------------
...x_init_of_per_server_EDNS_UDP_packet_size.patch | 87 ----------------------
.../011-Fix_typo_in_SDBM_hash_function.patch | 40 ----------
11 files changed, 516 deletions(-)
delete mode 100644 src/patches/dnsmasq/001-Account_for_TFTP_packet_headers_in_IPv6_correctly.patch
delete mode 100644 src/patches/dnsmasq/002-Tidy_code.patch
delete mode 100644 src/patches/dnsmasq/003-Bound_hash-iterations_in_DNSSEC_NSEC3_checking.patch
delete mode 100644 src/patches/dnsmasq/004-Fix_memory_leak_in_inotify_code.patch
delete mode 100644 src/patches/dnsmasq/005-Tidy.patch
delete mode 100644 src/patches/dnsmasq/006-Tidy_code.patch
delete mode 100644 src/patches/dnsmasq/007-NULL_pointer_check.patch
delete mode 100644 src/patches/dnsmasq/008-Check_return-code_of_inet_pton_when_parsing_DHCPv4_options.patch
delete mode 100644 src/patches/dnsmasq/009-Remove_pre-existing_EDNS0_OPTION_NOMDEVICEID_if_MAC_address_unknown.patch
delete mode 100644 src/patches/dnsmasq/010-Fix_init_of_per_server_EDNS_UDP_packet_size.patch
delete mode 100644 src/patches/dnsmasq/011-Fix_typo_in_SDBM_hash_function.patch
diff --git a/src/patches/dnsmasq/001-Account_for_TFTP_packet_headers_in_IPv6_correctly.patch b/src/patches/dnsmasq/001-Account_for_TFTP_packet_headers_in_IPv6_correctly.patch
deleted file mode 100644
index 18d0105..0000000
--- a/src/patches/dnsmasq/001-Account_for_TFTP_packet_headers_in_IPv6_correctly.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From d1377fa3c4f6093611dee8d610f6953eb8145d21 Mon Sep 17 00:00:00 2001
-From: Simon Kelley <simon(a)thekelleys.org.uk>
-Date: Fri, 4 Mar 2016 21:32:21 +0000
-Subject: [PATCH] Account for TFTP packet headers in IPv6 correctly.
-
----
- src/tftp.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/src/tftp.c b/src/tftp.c
-index dc4aa85..5e4a32a 100644
---- a/src/tftp.c
-+++ b/src/tftp.c
-@@ -346,14 +346,15 @@ void tftp_request(struct listener *listen, time_t now)
- {
- if ((opt = next(&p, end)) && !option_bool(OPT_TFTP_NOBLOCK))
- {
-+ /* 32 bytes for IP, UDP and TFTP headers, 52 bytes for IPv6 */
-+ int overhead = (listen->family == AF_INET) ? 32 : 52;
- transfer->blocksize = atoi(opt);
- if (transfer->blocksize < 1)
- transfer->blocksize = 1;
- if (transfer->blocksize > (unsigned)daemon->packet_buff_sz - 4)
- transfer->blocksize = (unsigned)daemon->packet_buff_sz - 4;
-- /* 32 bytes for IP, UDP and TFTP headers */
-- if (mtu != 0 && transfer->blocksize > (unsigned)mtu - 32)
-- transfer->blocksize = (unsigned)mtu - 32;
-+ if (mtu != 0 && transfer->blocksize > (unsigned)mtu - overhead)
-+ transfer->blocksize = (unsigned)mtu - overhead;
- transfer->opt_blocksize = 1;
- transfer->block = 0;
- }
---
-1.7.10.4
-
diff --git a/src/patches/dnsmasq/002-Tidy_code.patch b/src/patches/dnsmasq/002-Tidy_code.patch
deleted file mode 100644
index 58910b2..0000000
--- a/src/patches/dnsmasq/002-Tidy_code.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From b8ac4662093dde7969b200c71db5722347d02bad Mon Sep 17 00:00:00 2001
-From: Simon Kelley <simon(a)thekelleys.org.uk>
-Date: Thu, 10 Mar 2016 18:40:53 +0000
-Subject: [PATCH] Tidy code.
-
----
- src/network.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/network.c b/src/network.c
-index 91ac40a..5dce17c 100644
---- a/src/network.c
-+++ b/src/network.c
-@@ -532,13 +532,14 @@ static int iface_allowed_v4(struct in_addr local, int if_index, char *label,
- {
- union mysockaddr addr;
- int prefix, bit;
-+
-+ (void)broadcast; /* warning */
-
- memset(&addr, 0, sizeof(addr));
- #ifdef HAVE_SOCKADDR_SA_LEN
- addr.in.sin_len = sizeof(addr.in);
- #endif
- addr.in.sin_family = AF_INET;
-- addr.in.sin_addr = broadcast; /* warning */
- addr.in.sin_addr = local;
- addr.in.sin_port = htons(daemon->port);
-
---
-2.5.0
-
diff --git a/src/patches/dnsmasq/003-Bound_hash-iterations_in_DNSSEC_NSEC3_checking.patch b/src/patches/dnsmasq/003-Bound_hash-iterations_in_DNSSEC_NSEC3_checking.patch
deleted file mode 100644
index c722f86..0000000
--- a/src/patches/dnsmasq/003-Bound_hash-iterations_in_DNSSEC_NSEC3_checking.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 40205a053ed467cc92300923a7b66368988bb2fa Mon Sep 17 00:00:00 2001
-From: Simon Kelley <simon(a)thekelleys.org.uk>
-Date: Mon, 14 Mar 2016 21:24:00 +0000
-Subject: [PATCH] Bound hash-iterations in DNSSEC NSEC3 checking.
-
----
- src/dnssec.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/src/dnssec.c b/src/dnssec.c
-index ebb9c93..3500302 100644
---- a/src/dnssec.c
-+++ b/src/dnssec.c
-@@ -1697,7 +1697,15 @@ static int prove_non_existence_nsec3(struct dns_header *header, size_t plen, uns
- return 0;
-
- p++; /* flags */
-+
- GETSHORT (iterations, p);
-+ /* Upper-bound iterations, to avoid DoS.
-+ Strictly, there are lower bounds for small keys, but
-+ since we don't have key size info here, at least limit
-+ to the largest bound, for 4096-bit keys. RFC 5155 10.3 */
-+ if (iterations > 2500)
-+ return 0;
-+
- salt_len = *p++;
- salt = p;
- if (!CHECK_LEN(header, salt, plen, salt_len))
---
-2.5.0
-
diff --git a/src/patches/dnsmasq/004-Fix_memory_leak_in_inotify_code.patch b/src/patches/dnsmasq/004-Fix_memory_leak_in_inotify_code.patch
deleted file mode 100644
index 83e56e9..0000000
--- a/src/patches/dnsmasq/004-Fix_memory_leak_in_inotify_code.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From e1abeeeec26e0f1109051542a2ad964d786586aa Mon Sep 17 00:00:00 2001
-From: Simon Kelley <simon(a)thekelleys.org.uk>
-Date: Wed, 16 Mar 2016 17:22:27 +0000
-Subject: [PATCH] Fix memory leak in inotify code.
-
----
- src/inotify.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/src/inotify.c b/src/inotify.c
-index c0a6fdb..603ce9d 100644
---- a/src/inotify.c
-+++ b/src/inotify.c
-@@ -54,7 +54,10 @@ static char *my_readlink(char *path)
- {
- /* Not link or doesn't exist. */
- if (errno == EINVAL || errno == ENOENT)
-- return NULL;
-+ {
-+ free(buf);
-+ return NULL;
-+ }
- else
- die(_("cannot access path %s: %s"), path, EC_MISC);
- }
-@@ -200,6 +203,8 @@ void set_dynamic_inotify(int flag, int total_size, struct crec **rhash, int revh
- free(path);
- }
- }
-+
-+ closedir(dir_stream);
- }
- }
-
---
-1.7.10.4
-
diff --git a/src/patches/dnsmasq/005-Tidy.patch b/src/patches/dnsmasq/005-Tidy.patch
deleted file mode 100644
index 011ad4c..0000000
--- a/src/patches/dnsmasq/005-Tidy.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 4caa86dd7dc0860eeb7771f9ccc6130c6e8e0fe0 Mon Sep 17 00:00:00 2001
-From: Simon Kelley <simon(a)thekelleys.org.uk>
-Date: Wed, 16 Mar 2016 18:44:16 +0000
-Subject: [PATCH] Tidy.
-
----
- src/option.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/option.c b/src/option.c
-index bedad7b..df286ff 100644
---- a/src/option.c
-+++ b/src/option.c
-@@ -3799,7 +3799,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
- case LOPT_RR: /* dns-rr */
- {
- struct txt_record *new;
-- size_t len = len;
-+ size_t len = 0;
- char *data;
- int val;
-
---
-1.7.10.4
-
diff --git a/src/patches/dnsmasq/006-Tidy_code.patch b/src/patches/dnsmasq/006-Tidy_code.patch
deleted file mode 100644
index e165a64..0000000
--- a/src/patches/dnsmasq/006-Tidy_code.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 529b0302287cf14ce9a10737a285db206f86931d Mon Sep 17 00:00:00 2001
-From: Simon Kelley <simon(a)thekelleys.org.uk>
-Date: Wed, 16 Mar 2016 19:00:45 +0000
-Subject: [PATCH] Tidy code.
-
----
- src/network.c | 37 +++++++++++++++++++++----------------
- 1 file changed, 21 insertions(+), 16 deletions(-)
-
-diff --git a/src/network.c b/src/network.c
-index 5dce17c..95998cc 100644
---- a/src/network.c
-+++ b/src/network.c
-@@ -810,10 +810,11 @@ int tcp_interface(int fd, int af)
- int opt = 1;
- struct cmsghdr *cmptr;
- struct msghdr msg;
-+ socklen_t len;
-
-- /* use mshdr do that the CMSDG_* macros are available */
-+ /* use mshdr so that the CMSDG_* macros are available */
- msg.msg_control = daemon->packet;
-- msg.msg_controllen = daemon->packet_buff_sz;
-+ msg.msg_controllen = len = daemon->packet_buff_sz;
-
- /* we overwrote the buffer... */
- daemon->srv_save = NULL;
-@@ -821,18 +822,21 @@ int tcp_interface(int fd, int af)
- if (af == AF_INET)
- {
- if (setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &opt, sizeof(opt)) != -1 &&
-- getsockopt(fd, IPPROTO_IP, IP_PKTOPTIONS, msg.msg_control, (socklen_t *)&msg.msg_controllen) != -1)
-- for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr))
-- if (cmptr->cmsg_level == IPPROTO_IP && cmptr->cmsg_type == IP_PKTINFO)
-- {
-- union {
-- unsigned char *c;
-- struct in_pktinfo *p;
-- } p;
--
-- p.c = CMSG_DATA(cmptr);
-- if_index = p.p->ipi_ifindex;
-- }
-+ getsockopt(fd, IPPROTO_IP, IP_PKTOPTIONS, msg.msg_control, &len) != -1)
-+ {
-+ msg.msg_controllen = len;
-+ for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr))
-+ if (cmptr->cmsg_level == IPPROTO_IP && cmptr->cmsg_type == IP_PKTINFO)
-+ {
-+ union {
-+ unsigned char *c;
-+ struct in_pktinfo *p;
-+ } p;
-+
-+ p.c = CMSG_DATA(cmptr);
-+ if_index = p.p->ipi_ifindex;
-+ }
-+ }
- }
- #ifdef HAVE_IPV6
- else
-@@ -850,9 +854,10 @@ int tcp_interface(int fd, int af)
- #endif
-
- if (set_ipv6pktinfo(fd) &&
-- getsockopt(fd, IPPROTO_IPV6, PKTOPTIONS, msg.msg_control, (socklen_t *)&msg.msg_controllen) != -1)
-+ getsockopt(fd, IPPROTO_IPV6, PKTOPTIONS, msg.msg_control, &len) != -1)
- {
-- for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr))
-+ msg.msg_controllen = len;
-+ for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr))
- if (cmptr->cmsg_level == IPPROTO_IPV6 && cmptr->cmsg_type == daemon->v6pktinfo)
- {
- union {
---
-1.7.10.4
-
diff --git a/src/patches/dnsmasq/007-NULL_pointer_check.patch b/src/patches/dnsmasq/007-NULL_pointer_check.patch
deleted file mode 100644
index def74ae..0000000
--- a/src/patches/dnsmasq/007-NULL_pointer_check.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From a7b27e84fa1bad183482f06f54ed2376db256e3a Mon Sep 17 00:00:00 2001
-From: Simon Kelley <simon(a)thekelleys.org.uk>
-Date: Wed, 16 Mar 2016 19:11:52 +0000
-Subject: [PATCH] NULL pointer check.
-
----
- src/dnssec.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/dnssec.c b/src/dnssec.c
-index 3500302..3c77c7d 100644
---- a/src/dnssec.c
-+++ b/src/dnssec.c
-@@ -1791,7 +1791,7 @@ static int prove_non_existence_nsec3(struct dns_header *header, size_t plen, uns
- }
- while ((closest_encloser = strchr(closest_encloser, '.')));
-
-- if (!closest_encloser)
-+ if (!closest_encloser || !next_closest)
- return 0;
-
- /* Look for NSEC3 that proves the non-existence of the next-closest encloser */
---
-1.7.10.4
-
diff --git a/src/patches/dnsmasq/008-Check_return-code_of_inet_pton_when_parsing_DHCPv4_options.patch b/src/patches/dnsmasq/008-Check_return-code_of_inet_pton_when_parsing_DHCPv4_options.patch
deleted file mode 100644
index c1a6113..0000000
--- a/src/patches/dnsmasq/008-Check_return-code_of_inet_pton_when_parsing_DHCPv4_options.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From a2bc254bed53a7d9e6d6d64285ca17bc5091a17f Mon Sep 17 00:00:00 2001
-From: Simon Kelley <simon(a)thekelleys.org.uk>
-Date: Thu, 21 Apr 2016 22:34:22 +0100
-Subject: [PATCH] Check return-code of inet_pton when parsing DHCPv4 options.
-
----
- CHANGELOG | 5 +++++
- src/option.c | 7 ++++---
- 2 files changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/CHANGELOG b/CHANGELOG
-index 9218b8c..fced746 100644
---- a/CHANGELOG
-+++ b/CHANGELOG
-@@ -56,6 +56,11 @@ version 2.76
- Add --tftp-mtu option. Thanks to Patrick McLean for the
- initial patch.
-
-+ Check return-code of inet_pton() when parsing dhcp-option.
-+ Bad addresses could fail to generate errors and result in
-+ garbage dhcp-options being sent. Thanks to Marc Branchaud
-+ for spotting this.
-+
-
- version 2.75
- Fix reversion on 2.74 which caused 100% CPU use when a
-diff --git a/src/option.c b/src/option.c
-index df286ff..df390b1 100644
---- a/src/option.c
-+++ b/src/option.c
-@@ -1199,7 +1199,8 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags)
- cp = comma;
- comma = split(cp);
- slash = split_chr(cp, '/');
-- inet_pton(AF_INET, cp, &in);
-+ if (!inet_pton(AF_INET, cp, &in))
-+ ret_err(_("bad IPv4 address"));
- if (!slash)
- {
- memcpy(op, &in, INADDRSZ);
-@@ -3658,8 +3659,8 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
- (!(inet_pton(AF_INET, a[1], &new->out) > 0)))
- option = '?';
-
-- if (k == 3)
-- inet_pton(AF_INET, a[2], &new->mask);
-+ if (k == 3 && !inet_pton(AF_INET, a[2], &new->mask))
-+ option = '?';
-
- if (dash &&
- (!(inet_pton(AF_INET, dash, &new->end) > 0) ||
---
-2.5.5
-
diff --git a/src/patches/dnsmasq/009-Remove_pre-existing_EDNS0_OPTION_NOMDEVICEID_if_MAC_address_unknown.patch b/src/patches/dnsmasq/009-Remove_pre-existing_EDNS0_OPTION_NOMDEVICEID_if_MAC_address_unknown.patch
deleted file mode 100644
index ad6db0c..0000000
--- a/src/patches/dnsmasq/009-Remove_pre-existing_EDNS0_OPTION_NOMDEVICEID_if_MAC_address_unknown.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 87985855ad2df78d169ce9715d8b8baa5da49de8 Mon Sep 17 00:00:00 2001
-From: Simon Kelley <simon(a)thekelleys.org.uk>
-Date: Mon, 25 Apr 2016 15:33:30 +0100
-Subject: [PATCH] Remove pre-existing EDNS0_OPTION_NOMDEVICEID if MAC address
- unknown.
-
----
- src/edns0.c | 13 ++++++++-----
- 1 file changed, 8 insertions(+), 5 deletions(-)
-
-diff --git a/src/edns0.c b/src/edns0.c
-index 9f66766..c7a101e 100644
---- a/src/edns0.c
-+++ b/src/edns0.c
-@@ -95,6 +95,8 @@ unsigned char *find_pseudoheader(struct dns_header *header, size_t plen, size_t
- return ret;
- }
-
-+
-+/* replace == 2 ->delete existing option only. */
- size_t add_pseudoheader(struct dns_header *header, size_t plen, unsigned char *limit,
- unsigned short udp_sz, int optno, unsigned char *opt, size_t optlen, int set_do, int replace)
- {
-@@ -151,7 +153,7 @@ size_t add_pseudoheader(struct dns_header *header, size_t plen, unsigned char *l
-
- if (code == optno)
- {
-- if (!replace)
-+ if (replace == 0)
- return plen;
-
- /* delete option if we're to replace it. */
-@@ -213,7 +215,7 @@ size_t add_pseudoheader(struct dns_header *header, size_t plen, unsigned char *l
- return plen; /* Too big */
-
- /* Add new option */
-- if (optno != 0)
-+ if (optno != 0 && replace != 2)
- {
- PUTSHORT(optno, p);
- PUTSHORT(optlen, p);
-@@ -244,12 +246,14 @@ static void encoder(unsigned char *in, char *out)
-
- static size_t add_dns_client(struct dns_header *header, size_t plen, unsigned char *limit, union mysockaddr *l3, time_t now)
- {
-- int maclen;
-+ int maclen, replace = 2; /* can't get mac address, just delete any incoming. */
- unsigned char mac[DHCP_CHADDR_MAX];
- char encode[18]; /* handle 6 byte MACs */
-
- if ((maclen = find_mac(l3, mac, 1, now)) == 6)
- {
-+ replace = 1;
-+
- if (option_bool(OPT_MAC_HEX))
- print_mac(encode, mac, maclen);
- else
-@@ -258,10 +262,9 @@ static size_t add_dns_client(struct dns_header *header, size_t plen, unsigned ch
- encoder(mac+3, encode+4);
- encode[8] = 0;
- }
-- plen = add_pseudoheader(header, plen, limit, PACKETSZ, EDNS0_OPTION_NOMDEVICEID, (unsigned char *)encode, strlen(encode), 0, 1);
- }
-
-- return plen;
-+ return add_pseudoheader(header, plen, limit, PACKETSZ, EDNS0_OPTION_NOMDEVICEID, (unsigned char *)encode, strlen(encode), 0, replace);
- }
-
-
---
-1.7.10.4
-
diff --git a/src/patches/dnsmasq/010-Fix_init_of_per_server_EDNS_UDP_packet_size.patch b/src/patches/dnsmasq/010-Fix_init_of_per_server_EDNS_UDP_packet_size.patch
deleted file mode 100644
index d249149..0000000
--- a/src/patches/dnsmasq/010-Fix_init_of_per_server_EDNS_UDP_packet_size.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 14ffa0770b546d6d7939a23add7122383f08fde5 Mon Sep 17 00:00:00 2001
-From: Simon Kelley <simon(a)thekelleys.org.uk>
-Date: Mon, 25 Apr 2016 16:36:44 +0100
-Subject: [PATCH] Fix init of per server EDNS UDP packet size.
-
----
- CHANGELOG | 4 ++++
- src/network.c | 5 ++++-
- src/option.c | 22 +++++++++-------------
- 3 files changed, 17 insertions(+), 14 deletions(-)
-
-diff --git a/CHANGELOG b/CHANGELOG
-index fced746..aa53fba 100644
---- a/CHANGELOG
-+++ b/CHANGELOG
-@@ -61,6 +61,10 @@ version 2.76
- garbage dhcp-options being sent. Thanks to Marc Branchaud
- for spotting this.
-
-+ Fix wrong value for EDNS UDP packet size when using
-+ --servers-file to define upstream DNS servers. Thanks to
-+ Scott Bonar for the bug report.
-+
-
- version 2.75
- Fix reversion on 2.74 which caused 100% CPU use when a
-diff --git a/src/network.c b/src/network.c
-index 95998cc..da8a7f4 100644
---- a/src/network.c
-+++ b/src/network.c
-@@ -1409,7 +1409,6 @@ void add_update_server(int flags,
- serv->domain = domain_str;
- serv->next = next;
- serv->queries = serv->failed_queries = 0;
-- serv->edns_pktsz = daemon->edns_pktsz;
- #ifdef HAVE_LOOP
- serv->uid = rand32();
- #endif
-@@ -1447,6 +1446,10 @@ void check_servers(void)
- {
- if (!(serv->flags & (SERV_LITERAL_ADDRESS | SERV_NO_ADDR | SERV_USE_RESOLV | SERV_NO_REBIND)))
- {
-+ /* Init edns_pktsz for newly created server records. */
-+ if (serv->edns_pktsz == 0)
-+ serv->edns_pktsz = daemon->edns_pktsz;
-+
- #ifdef HAVE_DNSSEC
- if (option_bool(OPT_DNSSEC_VALID))
- {
-diff --git a/src/option.c b/src/option.c
-index df390b1..c66f401 100644
---- a/src/option.c
-+++ b/src/option.c
-@@ -4612,21 +4612,17 @@ void read_opts(int argc, char **argv, char *compile_opts)
- {
- struct server *tmp;
- for (tmp = daemon->servers; tmp; tmp = tmp->next)
-- {
-- tmp->edns_pktsz = daemon->edns_pktsz;
--
-- if (!(tmp->flags & SERV_HAS_SOURCE))
-- {
-- if (tmp->source_addr.sa.sa_family == AF_INET)
-- tmp->source_addr.in.sin_port = htons(daemon->query_port);
-+ if (!(tmp->flags & SERV_HAS_SOURCE))
-+ {
-+ if (tmp->source_addr.sa.sa_family == AF_INET)
-+ tmp->source_addr.in.sin_port = htons(daemon->query_port);
- #ifdef HAVE_IPV6
-- else if (tmp->source_addr.sa.sa_family == AF_INET6)
-- tmp->source_addr.in6.sin6_port = htons(daemon->query_port);
-+ else if (tmp->source_addr.sa.sa_family == AF_INET6)
-+ tmp->source_addr.in6.sin6_port = htons(daemon->query_port);
- #endif
-- }
-- }
-- }
--
-+ }
-+ }
-+
- if (daemon->host_records)
- {
- struct host_record *hr;
---
-1.7.10.4
-
diff --git a/src/patches/dnsmasq/011-Fix_typo_in_SDBM_hash_function.patch b/src/patches/dnsmasq/011-Fix_typo_in_SDBM_hash_function.patch
deleted file mode 100644
index c8c570d..0000000
--- a/src/patches/dnsmasq/011-Fix_typo_in_SDBM_hash_function.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From d6b749af91f1f0decfbb8018d6711092e539394a Mon Sep 17 00:00:00 2001
-From: Simon Kelley <simon(a)thekelleys.org.uk>
-Date: Mon, 25 Apr 2016 17:05:15 +0100
-Subject: [PATCH] Fix typo in SDBM hash function.
-
-Thanks to Luis Carvalho for spotting the error.
----
- src/dhcp.c | 2 +-
- src/dhcp6.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/dhcp.c b/src/dhcp.c
-index c11675d..00145bc 100644
---- a/src/dhcp.c
-+++ b/src/dhcp.c
-@@ -651,7 +651,7 @@ int address_allocate(struct dhcp_context *context,
- /* hash hwaddr: use the SDBM hashing algorithm. Seems to give good
- dispersal even with similarly-valued "strings". */
- for (j = 0, i = 0; i < hw_len; i++)
-- j += hwaddr[i] + (j << 6) + (j << 16) - j;
-+ j = hwaddr[i] + (j << 6) + (j << 16) - j;
-
- for (pass = 0; pass <= 1; pass++)
- for (c = context; c; c = c->current)
-diff --git a/src/dhcp6.c b/src/dhcp6.c
-index 93a359e..56eb0da 100644
---- a/src/dhcp6.c
-+++ b/src/dhcp6.c
-@@ -420,7 +420,7 @@ struct dhcp_context *address6_allocate(struct dhcp_context *context, unsigned c
- j = rand64();
- else
- for (j = iaid, i = 0; i < clid_len; i++)
-- j += clid[i] + (j << 6) + (j << 16) - j;
-+ j = clid[i] + (j << 6) + (j << 16) - j;
-
- for (pass = 0; pass <= plain_range ? 1 : 0; pass++)
- for (c = context; c; c = c->current)
---
-1.7.10.4
-
--
2.8.2