mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
dnsmasq: Update to 2.72
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
include Config
|
include Config
|
||||||
|
|
||||||
VER = 2.71
|
VER = 2.72
|
||||||
|
|
||||||
THISAPP = dnsmasq-$(VER)
|
THISAPP = dnsmasq-$(VER)
|
||||||
DL_FILE = $(THISAPP).tar.xz
|
DL_FILE = $(THISAPP).tar.xz
|
||||||
@@ -42,7 +42,7 @@ objects = $(DL_FILE)
|
|||||||
|
|
||||||
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||||
|
|
||||||
$(DL_FILE)_MD5 = 9e2e4d59c75e71ee3ca817ff0f9be69e
|
$(DL_FILE)_MD5 = 0256e0a71e27c8d8a5c89a0d18f3cfe2
|
||||||
|
|
||||||
install : $(TARGET)
|
install : $(TARGET)
|
||||||
|
|
||||||
@@ -72,9 +72,7 @@ $(subst %,%_MD5,$(objects)) :
|
|||||||
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||||
@$(PREBUILD)
|
@$(PREBUILD)
|
||||||
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
|
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
|
||||||
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/dnsmasq-2.71-use-nettle-with-minigmp.patch
|
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/dnsmasq-2.72rc2-Add-support-to-read-ISC-DHCP-lease-file.patch
|
||||||
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/dnsmasq-2.71-support-nettle-3.0.patch
|
|
||||||
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/dnsmasq-2.70-Add-support-to-read-ISC-DHCP-lease-file.patch
|
|
||||||
cd $(DIR_APP) && sed -i src/config.h \
|
cd $(DIR_APP) && sed -i src/config.h \
|
||||||
-e 's|/\* #define HAVE_IDN \*/|#define HAVE_IDN|g' \
|
-e 's|/\* #define HAVE_IDN \*/|#define HAVE_IDN|g' \
|
||||||
-e 's|/\* #define HAVE_DNSSEC \*/|#define HAVE_DNSSEC|g' \
|
-e 's|/\* #define HAVE_DNSSEC \*/|#define HAVE_DNSSEC|g' \
|
||||||
|
|||||||
@@ -1,65 +0,0 @@
|
|||||||
From cdb755c5f16a6768c3e8b1f345fe15fc9244228d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Simon Kelley <simon@thekelleys.org.uk>
|
|
||||||
Date: Wed, 18 Jun 2014 20:52:53 +0100
|
|
||||||
Subject: [PATCH] Fix FTBFS with Nettle-3.0.
|
|
||||||
|
|
||||||
---
|
|
||||||
CHANGELOG | 3 +++
|
|
||||||
src/dnssec.c | 18 ++++++++++++------
|
|
||||||
2 files changed, 15 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/dnssec.c b/src/dnssec.c
|
|
||||||
index 2ffb75d..69bfc29 100644
|
|
||||||
--- a/src/dnssec.c
|
|
||||||
+++ b/src/dnssec.c
|
|
||||||
@@ -28,6 +28,12 @@
|
|
||||||
#include <nettle/nettle-meta.h>
|
|
||||||
#include <nettle/bignum.h>
|
|
||||||
|
|
||||||
+/* Nettle-3.0 moved to a new API for DSA. We use a name that's defined in the new API
|
|
||||||
+ to detect Nettle-3, and invoke the backwards compatibility mode. */
|
|
||||||
+#ifdef dsa_params_init
|
|
||||||
+#include <nettle/dsa-compat.h>
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
|
|
||||||
#define SERIAL_UNDEF -100
|
|
||||||
#define SERIAL_EQ 0
|
|
||||||
@@ -121,8 +127,8 @@ static int hash_init(const struct nettle_hash *hash, void **ctxp, unsigned char
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int rsa_verify(struct blockdata *key_data, unsigned int key_len, unsigned char *sig, size_t sig_len,
|
|
||||||
- unsigned char *digest, int algo)
|
|
||||||
+static int dnsmasq_rsa_verify(struct blockdata *key_data, unsigned int key_len, unsigned char *sig, size_t sig_len,
|
|
||||||
+ unsigned char *digest, int algo)
|
|
||||||
{
|
|
||||||
unsigned char *p;
|
|
||||||
size_t exp_len;
|
|
||||||
@@ -173,8 +179,8 @@ static int rsa_verify(struct blockdata *key_data, unsigned int key_len, unsigned
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int dsa_verify(struct blockdata *key_data, unsigned int key_len, unsigned char *sig, size_t sig_len,
|
|
||||||
- unsigned char *digest, int algo)
|
|
||||||
+static int dnsmasq_dsa_verify(struct blockdata *key_data, unsigned int key_len, unsigned char *sig, size_t sig_len,
|
|
||||||
+ unsigned char *digest, int algo)
|
|
||||||
{
|
|
||||||
unsigned char *p;
|
|
||||||
unsigned int t;
|
|
||||||
@@ -293,10 +299,10 @@ static int verify(struct blockdata *key_data, unsigned int key_len, unsigned cha
|
|
||||||
switch (algo)
|
|
||||||
{
|
|
||||||
case 1: case 5: case 7: case 8: case 10:
|
|
||||||
- return rsa_verify(key_data, key_len, sig, sig_len, digest, algo);
|
|
||||||
+ return dnsmasq_rsa_verify(key_data, key_len, sig, sig_len, digest, algo);
|
|
||||||
|
|
||||||
case 3: case 6:
|
|
||||||
- return dsa_verify(key_data, key_len, sig, sig_len, digest, algo);
|
|
||||||
+ return dnsmasq_dsa_verify(key_data, key_len, sig, sig_len, digest, algo);
|
|
||||||
|
|
||||||
#ifndef NO_NETTLE_ECC
|
|
||||||
case 13: case 14:
|
|
||||||
--
|
|
||||||
1.7.10.4
|
|
||||||
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
From 063efb330a3f341c2548e2cf1f67f83e49cd6395 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Simon Kelley <simon@thekelleys.org.uk>
|
|
||||||
Date: Tue, 17 Jun 2014 19:49:31 +0100
|
|
||||||
Subject: [PATCH] Build config: add -DNO_GMP for use with nettle/mini-gmp
|
|
||||||
|
|
||||||
---
|
|
||||||
Makefile | 2 +-
|
|
||||||
bld/pkg-wrapper | 9 +++++++--
|
|
||||||
src/config.h | 7 +++++++
|
|
||||||
src/dnssec.c | 3 ++-
|
|
||||||
4 files changed, 17 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
|
||||||
index c58b50b..17eeb27 100644
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -61,7 +61,7 @@ lua_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CON
|
|
||||||
lua_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua5.1`
|
|
||||||
nettle_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --cflags nettle hogweed`
|
|
||||||
nettle_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --libs nettle hogweed`
|
|
||||||
-gmp_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --copy -lgmp`
|
|
||||||
+gmp_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC NO_GMP --copy -lgmp`
|
|
||||||
sunos_libs = `if uname | grep SunOS >/dev/null 2>&1; then echo -lsocket -lnsl -lposix4; fi`
|
|
||||||
version = -DVERSION='\"`$(top)/bld/get-version $(top)`\"'
|
|
||||||
|
|
||||||
diff --git a/bld/pkg-wrapper b/bld/pkg-wrapper
|
|
||||||
index 9f9332d..0ddb678 100755
|
|
||||||
--- a/bld/pkg-wrapper
|
|
||||||
+++ b/bld/pkg-wrapper
|
|
||||||
@@ -11,9 +11,14 @@ in=`cat`
|
|
||||||
|
|
||||||
if grep "^\#[[:space:]]*define[[:space:]]*$search" config.h >/dev/null 2>&1 || \
|
|
||||||
echo $in | grep $search >/dev/null 2>&1; then
|
|
||||||
-
|
|
||||||
+# Nasty, nasty, in --copy, arg 2 is another config to search for, use with NO_GMP
|
|
||||||
if [ $op = "--copy" ]; then
|
|
||||||
- pkg="$*"
|
|
||||||
+ if grep "^\#[[:space:]]*define[[:space:]]*$pkg" config.h >/dev/null 2>&1 || \
|
|
||||||
+ echo $in | grep $pkg >/dev/null 2>&1; then
|
|
||||||
+ pkg=""
|
|
||||||
+ else
|
|
||||||
+ pkg="$*"
|
|
||||||
+ fi
|
|
||||||
elif grep "^\#[[:space:]]*define[[:space:]]*${search}_STATIC" config.h >/dev/null 2>&1 || \
|
|
||||||
echo $in | grep ${search}_STATIC >/dev/null 2>&1; then
|
|
||||||
pkg=`$pkg --static $op $*`
|
|
||||||
diff --git a/src/config.h b/src/config.h
|
|
||||||
index 2155544..ee6d218 100644
|
|
||||||
--- a/src/config.h
|
|
||||||
+++ b/src/config.h
|
|
||||||
@@ -105,6 +105,8 @@ HAVE_AUTH
|
|
||||||
define this to include the facility to act as an authoritative DNS
|
|
||||||
server for one or more zones.
|
|
||||||
|
|
||||||
+HAVE_DNSSEC
|
|
||||||
+ include DNSSEC validator.
|
|
||||||
|
|
||||||
NO_IPV6
|
|
||||||
NO_TFTP
|
|
||||||
@@ -118,6 +120,11 @@ NO_AUTH
|
|
||||||
which are enabled by default in the distributed source tree. Building dnsmasq
|
|
||||||
with something like "make COPTS=-DNO_SCRIPT" will do the trick.
|
|
||||||
|
|
||||||
+NO_NETTLE_ECC
|
|
||||||
+ Don't include the ECDSA cypher in DNSSEC validation. Needed for older Nettle versions.
|
|
||||||
+NO_GMP
|
|
||||||
+ Don't use and link against libgmp, Useful if nettle is built with --enable-mini-gmp.
|
|
||||||
+
|
|
||||||
LEASEFILE
|
|
||||||
CONFFILE
|
|
||||||
RESOLVFILE
|
|
||||||
diff --git a/src/dnssec.c b/src/dnssec.c
|
|
||||||
index 44d626b..2ffb75d 100644
|
|
||||||
--- a/src/dnssec.c
|
|
||||||
+++ b/src/dnssec.c
|
|
||||||
@@ -26,7 +26,8 @@
|
|
||||||
# include <nettle/ecc-curve.h>
|
|
||||||
#endif
|
|
||||||
#include <nettle/nettle-meta.h>
|
|
||||||
-#include <gmp.h>
|
|
||||||
+#include <nettle/bignum.h>
|
|
||||||
+
|
|
||||||
|
|
||||||
#define SERIAL_UNDEF -100
|
|
||||||
#define SERIAL_EQ 0
|
|
||||||
--
|
|
||||||
1.7.10.4
|
|
||||||
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
diff --git a/Makefile b/Makefile
|
diff --git a/Makefile b/Makefile
|
||||||
index 292c8bd..5e0cdbe 100644
|
index 58a7975..616c6b7 100644
|
||||||
--- a/Makefile
|
--- a/Makefile
|
||||||
+++ b/Makefile
|
+++ b/Makefile
|
||||||
@@ -69,7 +69,7 @@ objs = cache.o rfc1035.o util.o option.o forward.o network.o \
|
@@ -69,7 +69,7 @@ objs = cache.o rfc1035.o util.o option.o forward.o network.o \
|
||||||
dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o \
|
dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o \
|
||||||
helper.o tftp.o log.o conntrack.o dhcp6.o rfc3315.o \
|
helper.o tftp.o log.o conntrack.o dhcp6.o rfc3315.o \
|
||||||
dhcp-common.o outpacket.o radv.o slaac.o auth.o ipset.o \
|
dhcp-common.o outpacket.o radv.o slaac.o auth.o ipset.o \
|
||||||
- domain.o dnssec.o blockdata.o
|
- domain.o dnssec.o blockdata.o tables.o loop.o
|
||||||
+ domain.o dnssec.o blockdata.o isc.o
|
+ domain.o dnssec.o blockdata.o tables.o loop.o isc.o
|
||||||
|
|
||||||
hdrs = dnsmasq.h config.h dhcp-protocol.h dhcp6-protocol.h \
|
hdrs = dnsmasq.h config.h dhcp-protocol.h dhcp6-protocol.h \
|
||||||
dns-protocol.h radv-protocol.h ip6addr.h
|
dns-protocol.h radv-protocol.h ip6addr.h
|
||||||
diff --git a/src/cache.c b/src/cache.c
|
diff --git a/src/cache.c b/src/cache.c
|
||||||
index 5cec918..1f5657f 100644
|
index 2c3a498..77a7046 100644
|
||||||
--- a/src/cache.c
|
--- a/src/cache.c
|
||||||
+++ b/src/cache.c
|
+++ b/src/cache.c
|
||||||
@@ -17,7 +17,7 @@
|
@@ -17,7 +17,7 @@
|
||||||
@@ -65,10 +65,10 @@ index 5cec918..1f5657f 100644
|
|||||||
cache_hash(crec);
|
cache_hash(crec);
|
||||||
|
|
||||||
diff --git a/src/dnsmasq.c b/src/dnsmasq.c
|
diff --git a/src/dnsmasq.c b/src/dnsmasq.c
|
||||||
index 1c96a0e..156ac9a 100644
|
index f4a89fc..a448ec4 100644
|
||||||
--- a/src/dnsmasq.c
|
--- a/src/dnsmasq.c
|
||||||
+++ b/src/dnsmasq.c
|
+++ b/src/dnsmasq.c
|
||||||
@@ -934,6 +934,11 @@ int main (int argc, char **argv)
|
@@ -940,6 +940,11 @@ int main (int argc, char **argv)
|
||||||
|
|
||||||
poll_resolv(0, daemon->last_resolv != 0, now);
|
poll_resolv(0, daemon->last_resolv != 0, now);
|
||||||
daemon->last_resolv = now;
|
daemon->last_resolv = now;
|
||||||
@@ -81,18 +81,24 @@ index 1c96a0e..156ac9a 100644
|
|||||||
|
|
||||||
if (FD_ISSET(piperead, &rset))
|
if (FD_ISSET(piperead, &rset))
|
||||||
diff --git a/src/dnsmasq.h b/src/dnsmasq.h
|
diff --git a/src/dnsmasq.h b/src/dnsmasq.h
|
||||||
index 3032546..a40b2a9 100644
|
index e74b15a..4a35168 100644
|
||||||
--- a/src/dnsmasq.h
|
--- a/src/dnsmasq.h
|
||||||
+++ b/src/dnsmasq.h
|
+++ b/src/dnsmasq.h
|
||||||
@@ -1447,3 +1447,8 @@ void slaac_add_addrs(struct dhcp_lease *lease, time_t now, int force);
|
@@ -1463,9 +1463,13 @@ time_t periodic_slaac(time_t now, struct dhcp_lease *leases);
|
||||||
time_t periodic_slaac(time_t now, struct dhcp_lease *leases);
|
|
||||||
void slaac_ping_reply(struct in6_addr *sender, unsigned char *packet, char *interface, struct dhcp_lease *leases);
|
void slaac_ping_reply(struct in6_addr *sender, unsigned char *packet, char *interface, struct dhcp_lease *leases);
|
||||||
#endif
|
#endif
|
||||||
+
|
|
||||||
+/* isc.c */
|
+/* isc.c */
|
||||||
+#ifdef HAVE_ISC_READER
|
+#ifdef HAVE_ISC_READER
|
||||||
+void load_dhcp(time_t now);
|
+void load_dhcp(time_t now);
|
||||||
+#endif
|
+#endif
|
||||||
|
+
|
||||||
|
/* loop.c */
|
||||||
|
#ifdef HAVE_LOOP
|
||||||
|
void loop_send_probes();
|
||||||
|
int detect_loop(char *query, int type);
|
||||||
|
#endif
|
||||||
|
-
|
||||||
diff --git a/src/isc.c b/src/isc.c
|
diff --git a/src/isc.c b/src/isc.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..5106442
|
index 0000000..5106442
|
||||||
@@ -351,10 +357,10 @@ index 0000000..5106442
|
|||||||
+
|
+
|
||||||
+#endif
|
+#endif
|
||||||
diff --git a/src/option.c b/src/option.c
|
diff --git a/src/option.c b/src/option.c
|
||||||
index daa728f..d16c982 100644
|
index 45d8875..29c9ee5 100644
|
||||||
--- a/src/option.c
|
--- a/src/option.c
|
||||||
+++ b/src/option.c
|
+++ b/src/option.c
|
||||||
@@ -1642,7 +1642,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
@@ -1669,7 +1669,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
||||||
ret_err(_("bad MX target"));
|
ret_err(_("bad MX target"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
Reference in New Issue
Block a user