mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-08 16:11:30 +00:00
Compare commits
6
Commits
v2.87test2
...
v2.87test3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed4e7defd7 | ||
|
|
267ab619c4 | ||
|
|
0140454ba2 | ||
|
|
2c60441239 | ||
|
|
cbbd56c965 | ||
|
|
2561f9fe0e |
No files matched your search
@@ -70,8 +70,9 @@ nettle_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CO
|
|||||||
HAVE_NETTLEHASH $(PKG_CONFIG) --libs nettle`
|
HAVE_NETTLEHASH $(PKG_CONFIG) --libs nettle`
|
||||||
gmp_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC NO_GMP --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`
|
sunos_libs = `if uname | grep SunOS >/dev/null 2>&1; then echo -lsocket -lnsl -lposix4; fi`
|
||||||
nft_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_NFTSET $(PKG_CONFIG) --libs libnftables`
|
nft_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_NFTSET $(PKG_CONFIG) --cflags libnftables`
|
||||||
version = -DVERSION='\"`$(top)/bld/get-version $(top)`\"'
|
nft_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_NFTSET $(PKG_CONFIG) --libs libnftables`
|
||||||
|
version = -DVERSION='\"`$(top)/bld/get-version $(top)`\"'
|
||||||
|
|
||||||
sum?=$(shell $(CC) -DDNSMASQ_COMPILE_OPTS $(COPTS) -E $(top)/$(SRC)/dnsmasq.h | ( md5sum 2>/dev/null || md5 ) | cut -f 1 -d ' ')
|
sum?=$(shell $(CC) -DDNSMASQ_COMPILE_OPTS $(COPTS) -E $(top)/$(SRC)/dnsmasq.h | ( md5sum 2>/dev/null || md5 ) | cut -f 1 -d ' ')
|
||||||
sum!=$(CC) -DDNSMASQ_COMPILE_OPTS $(COPTS) -E $(top)/$(SRC)/dnsmasq.h | ( md5sum 2>/dev/null || md5 ) | cut -f 1 -d ' '
|
sum!=$(CC) -DDNSMASQ_COMPILE_OPTS $(COPTS) -E $(top)/$(SRC)/dnsmasq.h | ( md5sum 2>/dev/null || md5 ) | cut -f 1 -d ' '
|
||||||
@@ -91,7 +92,7 @@ hdrs = dnsmasq.h config.h dhcp-protocol.h dhcp6-protocol.h \
|
|||||||
all : $(BUILDDIR)
|
all : $(BUILDDIR)
|
||||||
@cd $(BUILDDIR) && $(MAKE) \
|
@cd $(BUILDDIR) && $(MAKE) \
|
||||||
top="$(top)" \
|
top="$(top)" \
|
||||||
build_cflags="$(version) $(dbus_cflags) $(idn2_cflags) $(idn_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags)" \
|
build_cflags="$(version) $(dbus_cflags) $(idn2_cflags) $(idn_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags) $(nft_cflags)" \
|
||||||
build_libs="$(dbus_libs) $(idn2_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs) $(ubus_libs) $(nft_libs)" \
|
build_libs="$(dbus_libs) $(idn2_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs) $(ubus_libs) $(nft_libs)" \
|
||||||
-f $(top)/Makefile dnsmasq
|
-f $(top)/Makefile dnsmasq
|
||||||
|
|
||||||
@@ -116,7 +117,7 @@ all-i18n : $(BUILDDIR)
|
|||||||
@cd $(BUILDDIR) && $(MAKE) \
|
@cd $(BUILDDIR) && $(MAKE) \
|
||||||
top="$(top)" \
|
top="$(top)" \
|
||||||
i18n=-DLOCALEDIR=\'\"$(LOCALEDIR)\"\' \
|
i18n=-DLOCALEDIR=\'\"$(LOCALEDIR)\"\' \
|
||||||
build_cflags="$(version) $(dbus_cflags) $(idn2_cflags) $(idn_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags)" \
|
build_cflags="$(version) $(dbus_cflags) $(idn2_cflags) $(idn_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags) $(nft_cflags)" \
|
||||||
build_libs="$(dbus_libs) $(idn2_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs) $(ubus_libs) $(nft_libs)" \
|
build_libs="$(dbus_libs) $(idn2_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs) $(ubus_libs) $(nft_libs)" \
|
||||||
-f $(top)/Makefile dnsmasq
|
-f $(top)/Makefile dnsmasq
|
||||||
for f in `cd $(PO); echo *.po`; do \
|
for f in `cd $(PO); echo *.po`; do \
|
||||||
|
|||||||
Vendored
+1
@@ -1,6 +1,7 @@
|
|||||||
dnsmasq (2.87-1) unstable; urgency=low
|
dnsmasq (2.87-1) unstable; urgency=low
|
||||||
|
|
||||||
* New upstream.
|
* New upstream.
|
||||||
|
* Include new NFTset support in the build.
|
||||||
|
|
||||||
-- Simon Kelley <simon@thekelleys.org.uk> Wed, 08 Sep 2021 23:11:25 +0000
|
-- Simon Kelley <simon@thekelleys.org.uk> Wed, 08 Sep 2021 23:11:25 +0000
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -5,7 +5,7 @@ Build-depends: gettext, libnetfilter-conntrack-dev [linux-any],
|
|||||||
libidn2-dev, libdbus-1-dev (>=0.61), libgmp-dev,
|
libidn2-dev, libdbus-1-dev (>=0.61), libgmp-dev,
|
||||||
nettle-dev (>=2.4-3), libbsd-dev [kfreebsd-any],
|
nettle-dev (>=2.4-3), libbsd-dev [kfreebsd-any],
|
||||||
liblua5.2-dev, dh-runit, debhelper-compat (= 10),
|
liblua5.2-dev, dh-runit, debhelper-compat (= 10),
|
||||||
pkg-config
|
pkg-config, libnftables-dev
|
||||||
Maintainer: Simon Kelley <simon@thekelleys.org.uk>
|
Maintainer: Simon Kelley <simon@thekelleys.org.uk>
|
||||||
Homepage: http://www.thekelleys.org.uk/dnsmasq/doc.html
|
Homepage: http://www.thekelleys.org.uk/dnsmasq/doc.html
|
||||||
Vcs-Git: http://thekelleys.org.uk/git/dnsmasq.git
|
Vcs-Git: http://thekelleys.org.uk/git/dnsmasq.git
|
||||||
|
|||||||
Vendored
+1
@@ -60,6 +60,7 @@ Notes on configuring dnsmasq as packaged for Debian.
|
|||||||
nodbus : omit DBus support.
|
nodbus : omit DBus support.
|
||||||
noconntrack : omit connection tracking support.
|
noconntrack : omit connection tracking support.
|
||||||
noipset : omit IPset support.
|
noipset : omit IPset support.
|
||||||
|
nonftset : omit nftset support.
|
||||||
nortc : compile alternate mode suitable for systems without an RTC.
|
nortc : compile alternate mode suitable for systems without an RTC.
|
||||||
noi18n : omit translations and internationalisation support.
|
noi18n : omit translations and internationalisation support.
|
||||||
noidn : omit international domain name support, must be
|
noidn : omit international domain name support, must be
|
||||||
|
|||||||
Vendored
+4
@@ -52,6 +52,10 @@ ifeq (,$(filter noidn, $(DEB_BUILD_OPTIONS)))
|
|||||||
DEB_COPTS += -DHAVE_LIBIDN2
|
DEB_COPTS += -DHAVE_LIBIDN2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq (,$(filter nonftset, $(DEB_BUILD_OPTIONS)))
|
||||||
|
DEB_COPTS += -DHAVE_NFTSET
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq (,$(filter noconntrack,$(DEB_BUILD_OPTIONS)))
|
ifeq (,$(filter noconntrack,$(DEB_BUILD_OPTIONS)))
|
||||||
ifeq ($(DEB_HOST_ARCH_OS),linux)
|
ifeq ($(DEB_HOST_ARCH_OS),linux)
|
||||||
DEB_COPTS += -DHAVE_CONNTRACK
|
DEB_COPTS += -DHAVE_CONNTRACK
|
||||||
|
|||||||
+4
-1
@@ -1173,9 +1173,12 @@ extern struct daemon {
|
|||||||
char *packet; /* packet buffer */
|
char *packet; /* packet buffer */
|
||||||
int packet_buff_sz; /* size of above */
|
int packet_buff_sz; /* size of above */
|
||||||
char *namebuff; /* MAXDNAME size buffer */
|
char *namebuff; /* MAXDNAME size buffer */
|
||||||
|
#if (defined(HAVE_CONNTRACK) && defined(HAVE_UBUS)) || defined(HAVE_DNSSEC)
|
||||||
|
/* CONNTRACK UBUS code uses this buffer, as well as DNSSEC code. */
|
||||||
|
char *workspacename;
|
||||||
|
#endif
|
||||||
#ifdef HAVE_DNSSEC
|
#ifdef HAVE_DNSSEC
|
||||||
char *keyname; /* MAXDNAME size buffer */
|
char *keyname; /* MAXDNAME size buffer */
|
||||||
char *workspacename; /* ditto */
|
|
||||||
unsigned long *rr_status; /* ceiling in TTL from DNSSEC or zero for insecure */
|
unsigned long *rr_status; /* ceiling in TTL from DNSSEC or zero for insecure */
|
||||||
int rr_status_sz;
|
int rr_status_sz;
|
||||||
int dnssec_no_time_check;
|
int dnssec_no_time_check;
|
||||||
|
|||||||
+16
-4
@@ -173,7 +173,7 @@ static int forward_query(int udpfd, union mysockaddr *udpaddr,
|
|||||||
unsigned int gotname = extract_request(header, plen, daemon->namebuff, NULL);
|
unsigned int gotname = extract_request(header, plen, daemon->namebuff, NULL);
|
||||||
void *hash = hash_questions(header, plen, daemon->namebuff);
|
void *hash = hash_questions(header, plen, daemon->namebuff);
|
||||||
unsigned char *oph = find_pseudoheader(header, plen, NULL, NULL, NULL, NULL);
|
unsigned char *oph = find_pseudoheader(header, plen, NULL, NULL, NULL, NULL);
|
||||||
int old_src = 0;
|
int old_src = 0, old_reply = 0;
|
||||||
int first, last, start = 0;
|
int first, last, start = 0;
|
||||||
int subnet, cacheable, forwarded = 0;
|
int subnet, cacheable, forwarded = 0;
|
||||||
size_t edns0_len;
|
size_t edns0_len;
|
||||||
@@ -199,7 +199,10 @@ static int forward_query(int udpfd, union mysockaddr *udpaddr,
|
|||||||
Similarly FREC_NO_CACHE is never set in flags, so a query which is
|
Similarly FREC_NO_CACHE is never set in flags, so a query which is
|
||||||
contigent on a particular source address EDNS0 option will never be matched. */
|
contigent on a particular source address EDNS0 option will never be matched. */
|
||||||
if (forward)
|
if (forward)
|
||||||
old_src = 1;
|
{
|
||||||
|
old_src = 1;
|
||||||
|
old_reply = 1;
|
||||||
|
}
|
||||||
else if ((forward = lookup_frec_by_query(hash, fwd_flags,
|
else if ((forward = lookup_frec_by_query(hash, fwd_flags,
|
||||||
FREC_CHECKING_DISABLED | FREC_AD_QUESTION | FREC_DO_QUESTION |
|
FREC_CHECKING_DISABLED | FREC_AD_QUESTION | FREC_DO_QUESTION |
|
||||||
FREC_HAS_PHEADER | FREC_DNSKEY_QUERY | FREC_DS_QUERY | FREC_NO_CACHE)))
|
FREC_HAS_PHEADER | FREC_DNSKEY_QUERY | FREC_DS_QUERY | FREC_NO_CACHE)))
|
||||||
@@ -376,9 +379,18 @@ static int forward_query(int udpfd, union mysockaddr *udpaddr,
|
|||||||
/* In strict order mode, there must be a server later in the list
|
/* In strict order mode, there must be a server later in the list
|
||||||
left to send to, otherwise without the forwardall mechanism,
|
left to send to, otherwise without the forwardall mechanism,
|
||||||
code further on will cycle around the list forwever if they
|
code further on will cycle around the list forwever if they
|
||||||
all return REFUSED. If at the last, give up. */
|
all return REFUSED. If at the last, give up.
|
||||||
|
Note that we can get here EITHER because a client retried,
|
||||||
|
or an upstream server returned REFUSED. The above only
|
||||||
|
applied in the later case. For client retries,
|
||||||
|
keep tyring the last server.. */
|
||||||
if (++start == last)
|
if (++start == last)
|
||||||
goto reply;
|
{
|
||||||
|
if (old_reply)
|
||||||
|
goto reply;
|
||||||
|
else
|
||||||
|
start--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-12
@@ -964,12 +964,8 @@ static char *domain_rev4(int from_file, char *server, struct in_addr *addr4, int
|
|||||||
if (size > 32 || size < 1)
|
if (size > 32 || size < 1)
|
||||||
return _("bad IPv4 prefix length");
|
return _("bad IPv4 prefix length");
|
||||||
|
|
||||||
for (i = 0; i < addrbytes; i++)
|
/* Zero out last address bits according to CIDR mask */
|
||||||
if (((u8 *)addr4)[3-i] != 0)
|
((u8 *)addr4)[3-addrbytes] &= ~((1 << addrbits)-1);
|
||||||
break;
|
|
||||||
|
|
||||||
if (i != addrbytes || (((u8 *)addr4)[3-addrbytes] & ((1 << addrbits) - 1)) != 0)
|
|
||||||
return _("address part not zero");
|
|
||||||
|
|
||||||
size = size & ~0x7;
|
size = size & ~0x7;
|
||||||
|
|
||||||
@@ -1027,12 +1023,8 @@ static char *domain_rev6(int from_file, char *server, struct in6_addr *addr6, in
|
|||||||
if (size > 128 || size < 1)
|
if (size > 128 || size < 1)
|
||||||
return _("bad IPv6 prefix length");
|
return _("bad IPv6 prefix length");
|
||||||
|
|
||||||
for (i = 0; i < addrbytes; i++)
|
/* Zero out last address bits according to CIDR mask */
|
||||||
if (addr6->s6_addr[15-i] != 0)
|
addr6->s6_addr[15-addrbytes] &= ~((1 << addrbits) - 1);
|
||||||
break;
|
|
||||||
|
|
||||||
if (i != addrbytes || (addr6->s6_addr[15-addrbytes] & ((1 << addrbits) - 1)) != 0)
|
|
||||||
return _("address part not zero");
|
|
||||||
|
|
||||||
size = size & ~0x3;
|
size = size & ~0x3;
|
||||||
|
|
||||||
|
|||||||
+4
-5
@@ -430,13 +430,12 @@ int hostname_issubdomain(char *a, char *b)
|
|||||||
time_t dnsmasq_time(void)
|
time_t dnsmasq_time(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_BROKEN_RTC
|
#ifdef HAVE_BROKEN_RTC
|
||||||
struct tms dummy;
|
struct timespec ts;
|
||||||
static long tps = 0;
|
|
||||||
|
|
||||||
if (tps == 0)
|
if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0)
|
||||||
tps = sysconf(_SC_CLK_TCK);
|
die(_("cannot read monotonic clock: %s"), NULL, EC_MISC);
|
||||||
|
|
||||||
return (time_t)(times(&dummy)/tps);
|
return ts.tv_sec;
|
||||||
#else
|
#else
|
||||||
return time(NULL);
|
return time(NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in new issue
Block a user