mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-06 15:51:41 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd372273bd | ||
|
|
b98d22c191 | ||
|
|
160f6507c3 | ||
|
|
613d6c5249 |
No files matched your search
@@ -17,6 +17,51 @@ version 2.69
|
|||||||
dnsmasq, [fe80::] with the link-local address.
|
dnsmasq, [fe80::] with the link-local address.
|
||||||
Thanks to Tsachi Kimeldorfer for championing this.
|
Thanks to Tsachi Kimeldorfer for championing this.
|
||||||
|
|
||||||
|
DNSSEC validation and caching. Dnsmasq needs to be
|
||||||
|
compiled with this enabled, with
|
||||||
|
|
||||||
|
make dnsmasq COPTS=-DHAVE_DNSSEC
|
||||||
|
|
||||||
|
this add dependencies on the nettle crypto library and the
|
||||||
|
gmp maths library. It's possible to have these linked
|
||||||
|
statically with
|
||||||
|
|
||||||
|
make dnsmasq COPTS='-DHAVE_DNSSEC -DHAVE_DNSSEC_STATIC'
|
||||||
|
|
||||||
|
which bloats the dnsmasq binary to over a megabyte, but
|
||||||
|
saves the size of the shared libraries which are five
|
||||||
|
times that size.
|
||||||
|
To enable, DNSSEC, you will need a set of
|
||||||
|
trust-anchors. Now that the TLDs are signed, this can be
|
||||||
|
the keys for the root zone, and for convenience they are
|
||||||
|
included in trust-anchors.conf in the dnsmasq
|
||||||
|
distribution. You should of course check that these are
|
||||||
|
legitimate and up-to-date. So, adding
|
||||||
|
|
||||||
|
conf-file=/path/to/trust-anchors.conf
|
||||||
|
dnssec
|
||||||
|
|
||||||
|
to your config is all thats needed to get things
|
||||||
|
working. The upstream nameservers have to be DNSSEC-capable
|
||||||
|
too, of course. Many ISP nameservers aren't, but the
|
||||||
|
Google public nameservers (8.8.8.8 and 8.8.4.4) are.
|
||||||
|
When DNSSEC is configured, dnsmasq validates any queries
|
||||||
|
for domains which are signed. Query results which are
|
||||||
|
bogus are replaced with SERVFAIL replies, and results
|
||||||
|
which are correctly signed have the AD bit set. In
|
||||||
|
addition, and just as importantly, dnsmasq supplies
|
||||||
|
correct DNSSEC information to clients which are doing
|
||||||
|
their own validation, and caches DNSKEY, DS and RRSIG
|
||||||
|
records, which significantly improve the performance of
|
||||||
|
downstream validators. Setting --log-queries will show
|
||||||
|
DNSSEC in action.
|
||||||
|
|
||||||
|
The development of DNSSEC in dnsmasq was started by
|
||||||
|
Giovanni Bajo, to whom huge thanks are owed. It has been
|
||||||
|
supported by Comcast, whose techfund grant has allowed for
|
||||||
|
an invaluable period of full-time work to get it to
|
||||||
|
a workable state.
|
||||||
|
|
||||||
|
|
||||||
version 2.68
|
version 2.68
|
||||||
Use random addresses for DHCPv6 temporary address
|
Use random addresses for DHCPv6 temporary address
|
||||||
|
|||||||
@@ -61,6 +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`
|
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_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`
|
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`
|
||||||
sunos_libs = `if uname | grep SunOS >/dev/null 2>&1; then echo -lsocket -lnsl -lposix4; fi`
|
sunos_libs = `if uname | grep SunOS >/dev/null 2>&1; then echo -lsocket -lnsl -lposix4; fi`
|
||||||
version = -DVERSION='\"`$(top)/bld/get-version $(top)`\"'
|
version = -DVERSION='\"`$(top)/bld/get-version $(top)`\"'
|
||||||
|
|
||||||
@@ -77,7 +78,7 @@ all : $(BUILDDIR)
|
|||||||
@cd $(BUILDDIR) && $(MAKE) \
|
@cd $(BUILDDIR) && $(MAKE) \
|
||||||
top="$(top)" \
|
top="$(top)" \
|
||||||
build_cflags="$(version) $(dbus_cflags) $(idn_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags)" \
|
build_cflags="$(version) $(dbus_cflags) $(idn_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags)" \
|
||||||
build_libs="$(dbus_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs)" \
|
build_libs="$(dbus_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs)" \
|
||||||
-f $(top)/Makefile dnsmasq
|
-f $(top)/Makefile dnsmasq
|
||||||
|
|
||||||
mostly_clean :
|
mostly_clean :
|
||||||
@@ -101,7 +102,7 @@ all-i18n : $(BUILDDIR)
|
|||||||
top="$(top)" \
|
top="$(top)" \
|
||||||
i18n=-DLOCALEDIR=\'\"$(LOCALEDIR)\"\' \
|
i18n=-DLOCALEDIR=\'\"$(LOCALEDIR)\"\' \
|
||||||
build_cflags="$(version) $(dbus_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags) `$(PKG_CONFIG) --cflags libidn`" \
|
build_cflags="$(version) $(dbus_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags) `$(PKG_CONFIG) --cflags libidn`" \
|
||||||
build_libs="$(dbus_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) `$(PKG_CONFIG) --libs libidn`" \
|
build_libs="$(dbus_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs) `$(PKG_CONFIG) --libs libidn`" \
|
||||||
-f $(top)/Makefile dnsmasq
|
-f $(top)/Makefile dnsmasq
|
||||||
for f in `cd $(PO); echo *.po`; do \
|
for f in `cd $(PO); echo *.po`; do \
|
||||||
cd $(top) && cd $(BUILDDIR) && $(MAKE) top="$(top)" -f $(top)/Makefile $${f%.po}.mo; \
|
cd $(top) && cd $(BUILDDIR) && $(MAKE) top="$(top)" -f $(top)/Makefile $${f%.po}.mo; \
|
||||||
|
|||||||
+16
-11
@@ -9,19 +9,24 @@ shift
|
|||||||
|
|
||||||
in=`cat`
|
in=`cat`
|
||||||
|
|
||||||
if grep "^\#[[:space:]]*define[[:space:]]*${search}_STATIC" config.h >/dev/null 2>&1 || \
|
if grep "^\#[[:space:]]*define[[:space:]]*$search" config.h >/dev/null 2>&1 || \
|
||||||
|
echo $in | grep $search >/dev/null 2>&1; then
|
||||||
|
|
||||||
|
if [ $op = "--copy" ]; then
|
||||||
|
pkg="$*"
|
||||||
|
else
|
||||||
|
pkg=`$pkg $op $*`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if grep "^\#[[:space:]]*define[[:space:]]*${search}_STATIC" config.h >/dev/null 2>&1 || \
|
||||||
echo $in | grep ${search}_STATIC >/dev/null 2>&1; then
|
echo $in | grep ${search}_STATIC >/dev/null 2>&1; then
|
||||||
if [ $op = "--libs" ]; then
|
if [ $op = "--libs" ] || [ $op = "--copy" ]; then
|
||||||
pkg=`$pkg --static $op $*`
|
|
||||||
echo "-Wl,-Bstatic $pkg -Wl,-Bdynamic"
|
echo "-Wl,-Bstatic $pkg -Wl,-Bdynamic"
|
||||||
exit 0
|
else
|
||||||
|
echo "$pkg"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "$pkg"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep "^\#[[:space:]]*define[[:space:]]*$search" config.h >/dev/null 2>&1 || \
|
|
||||||
echo $in | grep $search >/dev/null 2>&1; then
|
|
||||||
pkg=`$pkg $op $*`
|
|
||||||
echo "$pkg"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
From: Jesse Glick <jglick@cloudbees.com>
|
||||||
|
To: dnsmasq-discuss@lists.thekelleys.org.uk
|
||||||
|
Subject: Re: [Dnsmasq-discuss] Ability to delegate to one server but fall
|
||||||
|
back to another after NXDOMAIN?
|
||||||
|
|
||||||
|
|
||||||
|
On Wed, Jan 15, 2014 at 12:30 PM, Simon Kelley <simon@thekelleys.org.uk> wrote:
|
||||||
|
> > There's a (very old) patch in contrib/try-all-ns that would make a starting point
|
||||||
|
This does not apply against trunk, so I tried to rework it. The
|
||||||
|
following appears to do what I expect:
|
||||||
|
|
||||||
|
diff --git a/src/forward.c b/src/forward.c
|
||||||
|
index 8167229..76070b5 100644
|
||||||
|
--- a/src/forward.c
|
||||||
|
+++ b/src/forward.c
|
||||||
|
@@ -610,7 +610,11 @@ void reply_query(int fd, int family, time_t now)
|
||||||
|
|
||||||
|
if ((RCODE(header) == SERVFAIL || RCODE(header) == REFUSED) &&
|
||||||
|
!option_bool(OPT_ORDER) &&
|
||||||
|
- forward->forwardall == 0)
|
||||||
|
+ forward->forwardall == 0 ||
|
||||||
|
+ /* try each in turn */
|
||||||
|
+ RCODE(header) == NXDOMAIN &&
|
||||||
|
+ option_bool(OPT_ORDER) &&
|
||||||
|
+ server->next != NULL)
|
||||||
|
/* for broken servers, attempt to send to another one. */
|
||||||
|
{
|
||||||
|
unsigned char *pheader;
|
||||||
|
|
||||||
Vendored
+6
@@ -1,3 +1,9 @@
|
|||||||
|
dnsmasq (2.69-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New upstream.
|
||||||
|
|
||||||
|
-- Simon Kelley <simon@thekelleys.org.uk> Tue, 4 Feb 2014 16:28:12 +0000
|
||||||
|
|
||||||
dnsmasq (2.68-1) unstable; urgency=low
|
dnsmasq (2.68-1) unstable; urgency=low
|
||||||
|
|
||||||
* New upstream. (closes: #730553)
|
* New upstream. (closes: #730553)
|
||||||
|
|||||||
Vendored
+2
-1
@@ -1,7 +1,8 @@
|
|||||||
Source: dnsmasq
|
Source: dnsmasq
|
||||||
Section: net
|
Section: net
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Build-depends: gettext, libnetfilter-conntrack-dev [linux-any], libidn11-dev, libdbus-1-dev (>=0.61)
|
Build-depends: gettext, libnetfilter-conntrack-dev [linux-any],
|
||||||
|
libidn11-dev, libdbus-1-dev (>=0.61), libgmp-dev, nettle-dev (>=2.4-3)
|
||||||
Maintainer: Simon Kelley <simon@thekelleys.org.uk>
|
Maintainer: Simon Kelley <simon@thekelleys.org.uk>
|
||||||
Standards-Version: 3.9.3
|
Standards-Version: 3.9.3
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -77,7 +77,7 @@ ifneq (,$(filter uselua,$(DEB_BUILD_OPTIONS)))
|
|||||||
DEB_COPTS += -DHAVE_LUASCRIPT
|
DEB_COPTS += -DHAVE_LUASCRIPT
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter usednssec,$(DEB_BUILD_OPTIONS)))
|
ifeq (,$(filter nodnssec,$(DEB_BUILD_OPTIONS)))
|
||||||
DEB_COPTS += -DHAVE_DNSSEC
|
DEB_COPTS += -DHAVE_DNSSEC
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -505,7 +505,7 @@ static int validate_rrset(time_t now, struct dns_header *header, size_t plen, in
|
|||||||
j != 0; j--)
|
j != 0; j--)
|
||||||
{
|
{
|
||||||
unsigned char *pstart, *pdata;
|
unsigned char *pstart, *pdata;
|
||||||
int stype, sclass, ttl;
|
int stype, sclass;
|
||||||
|
|
||||||
pstart = p;
|
pstart = p;
|
||||||
|
|
||||||
@@ -514,7 +514,7 @@ static int validate_rrset(time_t now, struct dns_header *header, size_t plen, in
|
|||||||
|
|
||||||
GETSHORT(stype, p);
|
GETSHORT(stype, p);
|
||||||
GETSHORT(sclass, p);
|
GETSHORT(sclass, p);
|
||||||
GETLONG(ttl, p);
|
p += 4; /* TTL */
|
||||||
|
|
||||||
pdata = p;
|
pdata = p;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user