Skip to content

Commit

Permalink
Merge remote-tracking branch 'nlnet/master'
Browse files Browse the repository at this point in the history
* nlnet/master:
  - Fix missing prototypes in the code.
  Changelog note for NLnetLabs#373 - Merge PR NLnetLabs#373 from fobser: Warning: arithmetic on a pointer to void   is a GNU extension.
  Changelog note for NLnetLabs#335 - Merge PR NLnetLabs#335 from fobser: Sprinkle in some static to prevent   missing prototype warnings.
  Warning: arithmetic on a pointer to void is a GNU extension.
  - Fix to squelch permission denied and other errors from remote host,   they are logged at higher verbosity but not on low verbosity.
  - Fix NLnetLabs#371: unbound-control timeout when Unbound is not running.
  - iana portlist updated.
  - make depend.
  Code repo continues for 1.13.1 in development.
  - Fix update, with write event check with streamreuse and fastopen.
  - Fix for NLnetLabs#283: fix stream reuse and tcp fast open.
  - Fix on windows to ignore connection failure on UDP, unless verbose.
  - Fix unbound-dnstap-socket to not use log routine from interrupt   handler and not print so frequently when invoked in sequence.
  - Fix NLnetLabs#356: deadlock when listening tcp.
  - Fix NLnetLabs#360: for the additionally reported TCP Fast Open makes TCP   connections fail, in that case we print a hint that this is   happening with the error in the logs.
  Sprinkle in some static to prevent missing prototype warnings.
  • Loading branch information
jedisct1 committed Dec 11, 2020
2 parents 000d604 + 811cf6d commit c892429
Show file tree
Hide file tree
Showing 18 changed files with 537 additions and 270 deletions.
489 changes: 283 additions & 206 deletions Makefile.in

Large diffs are not rendered by default.

25 changes: 13 additions & 12 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for unbound 1.13.0.
# Generated by GNU Autoconf 2.69 for unbound 1.13.1.
#
# Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
#
Expand Down Expand Up @@ -591,8 +591,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='unbound'
PACKAGE_TARNAME='unbound'
PACKAGE_VERSION='1.13.0'
PACKAGE_STRING='unbound 1.13.0'
PACKAGE_VERSION='1.13.1'
PACKAGE_STRING='unbound 1.13.1'
PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues'
PACKAGE_URL=''

Expand Down Expand Up @@ -1459,7 +1459,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures unbound 1.13.0 to adapt to many kinds of systems.
\`configure' configures unbound 1.13.1 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -1524,7 +1524,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of unbound 1.13.0:";;
short | recursive ) echo "Configuration of unbound 1.13.1:";;
esac
cat <<\_ACEOF

Expand Down Expand Up @@ -1752,7 +1752,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
unbound configure 1.13.0
unbound configure 1.13.1
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2461,7 +2461,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by unbound $as_me 1.13.0, which was
It was created by unbound $as_me 1.13.1, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ $0 $@
Expand Down Expand Up @@ -2813,11 +2813,11 @@ UNBOUND_VERSION_MAJOR=1

UNBOUND_VERSION_MINOR=13

UNBOUND_VERSION_MICRO=0
UNBOUND_VERSION_MICRO=1


LIBUNBOUND_CURRENT=9
LIBUNBOUND_REVISION=11
LIBUNBOUND_REVISION=12
LIBUNBOUND_AGE=1
# 1.0.0 had 0:12:0
# 1.0.1 had 0:13:0
Expand Down Expand Up @@ -2896,6 +2896,7 @@ LIBUNBOUND_AGE=1
# 1.11.0 had 9:9:1
# 1.12.0 had 9:10:1
# 1.13.0 had 9:11:1
# 1.13.1 had 9:12:1

# Current -- the number of the binary API that we're implementing
# Revision -- which iteration of the implementation of the binary
Expand Down Expand Up @@ -21731,7 +21732,7 @@ _ACEOF



version=1.13.0
version=1.13.1

date=`date +'%b %e, %Y'`

Expand Down Expand Up @@ -22250,7 +22251,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by unbound $as_me 1.13.0, which was
This file was extended by unbound $as_me 1.13.1, which was
generated by GNU Autoconf 2.69. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -22316,7 +22317,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
unbound config.status 1.13.0
unbound config.status 1.13.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

Expand Down
5 changes: 3 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ sinclude(dnscrypt/dnscrypt.m4)
# must be numbers. ac_defun because of later processing
m4_define([VERSION_MAJOR],[1])
m4_define([VERSION_MINOR],[13])
m4_define([VERSION_MICRO],[0])
m4_define([VERSION_MICRO],[1])
AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues, unbound)
AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR])
AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR])
AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO])

LIBUNBOUND_CURRENT=9
LIBUNBOUND_REVISION=11
LIBUNBOUND_REVISION=12
LIBUNBOUND_AGE=1
# 1.0.0 had 0:12:0
# 1.0.1 had 0:13:0
Expand Down Expand Up @@ -97,6 +97,7 @@ LIBUNBOUND_AGE=1
# 1.11.0 had 9:9:1
# 1.12.0 had 9:10:1
# 1.13.0 had 9:11:1
# 1.13.1 had 9:12:1

# Current -- the number of the binary API that we're implementing
# Revision -- which iteration of the implementation of the binary
Expand Down
9 changes: 7 additions & 2 deletions dnstap/unbound-dnstap-socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ static ssize_t tap_receive(struct tap_data* data, void* buf, size_t len)
}

/** delete the tap structure */
void tap_data_free(struct tap_data* data)
static void tap_data_free(struct tap_data* data)
{
ub_event_del(data->ev);
ub_event_free(data->ev);
Expand Down Expand Up @@ -1166,7 +1166,8 @@ int sig_quit = 0;
/** signal handler for user quit */
static RETSIGTYPE main_sigh(int sig)
{
verbose(VERB_ALGO, "exit on signal %d\n", sig);
if(!sig_quit)
fprintf(stderr, "exit on signal %d\n", sig);
if(sig_base) {
ub_event_base_loopexit(sig_base);
sig_base = NULL;
Expand Down Expand Up @@ -1354,6 +1355,10 @@ int main(int argc, char** argv)
struct tube;
struct query_info;
#include "util/data/packed_rrset.h"
#include "daemon/worker.h"
#include "daemon/remote.h"
#include "util/fptr_wlist.h"
#include "libunbound/context.h"

void worker_handle_control_cmd(struct tube* ATTR_UNUSED(tube),
uint8_t* ATTR_UNUSED(buffer), size_t ATTR_UNUSED(len),
Expand Down
30 changes: 29 additions & 1 deletion doc/Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
11 December 2020: Wouter
- Fix #371: unbound-control timeout when Unbound is not running.
- Fix to squelch permission denied and other errors from remote host,
they are logged at higher verbosity but not on low verbosity.
- Merge PR #335 from fobser: Sprinkle in some static to prevent
missing prototype warnings.
- Merge PR #373 from fobser: Warning: arithmetic on a pointer to void
is a GNU extension.
- Fix missing prototypes in the code.

3 December 2020: Wouter
- make depend.
- iana portlist updated.

2 December 2020: Wouter
- Fix #360: for the additionally reported TCP Fast Open makes TCP
connections fail, in that case we print a hint that this is
happening with the error in the logs.
- Fix #356: deadlock when listening tcp.
- Fix unbound-dnstap-socket to not use log routine from interrupt
handler and not print so frequently when invoked in sequence.
- Fix on windows to ignore connection failure on UDP, unless verbose.
- Fix for #283: fix stream reuse and tcp fast open.
- Fix update, with write event check with streamreuse and fastopen.

1 December 2020: Wouter
- Fix #358: Squelch udp connect 'no route to host' errors on low
verbosity.
Expand All @@ -6,7 +31,10 @@
- Fix assertion failure on double callback when iterator loses
interest in query at head of line that then has the tcp stream
not kept for reuse.
- tag for the 1.13.0rc4 release.
- tag for the 1.13.0rc4 release. This also became the 1.13.0
release version on 3 dec 2020 with the streamreuse and fastopen
fix from 2 dec 2020. The code repo continues for 1.13.1 in
development.

27 November 2020: Wouter
- Fix compile warning for type cast in http2_submit_dns_response.
Expand Down
14 changes: 7 additions & 7 deletions dynlibmod/dynlibmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
* module actions.
*/
#include "config.h"
#include "dynlibmod/dynlibmod.h"
#include "util/module.h"
#include "util/config_file.h"
#include "dynlibmod/dynlibmod.h"

#if HAVE_WINDOWS_H
#include <windows.h>
#define __DYNMOD HMODULE
#define __DYNSYM FARPROC
#define __LOADSYM GetProcAddress
void log_dlerror() {
static void log_dlerror() {
DWORD dwLastError = GetLastError();
LPSTR MessageBuffer;
DWORD dwBufferLength;
Expand All @@ -37,11 +37,11 @@ void log_dlerror() {

}

HMODULE open_library(const char* fname) {
static HMODULE open_library(const char* fname) {
return LoadLibrary(fname);
}

void close_library(const char* fname, __DYNMOD handle) {
static void close_library(const char* fname, __DYNMOD handle) {
(void)fname;
(void)handle;
}
Expand All @@ -50,15 +50,15 @@ void close_library(const char* fname, __DYNMOD handle) {
#define __DYNMOD void*
#define __DYNSYM void*
#define __LOADSYM dlsym
void log_dlerror() {
static void log_dlerror() {
log_err("dynlibmod: %s", dlerror());
}

void* open_library(const char* fname) {
static void* open_library(const char* fname) {
return dlopen(fname, RTLD_LAZY | RTLD_GLOBAL);
}

void close_library(const char* fname, __DYNMOD handle) {
static void close_library(const char* fname, __DYNMOD handle) {
if(!handle) return;
if(dlclose(handle) != 0) {
log_err("dlclose %s: %s", fname, strerror(errno));
Expand Down
3 changes: 3 additions & 0 deletions libunbound/libworker.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
#include "iterator/iter_hints.h"
#include "sldns/sbuffer.h"
#include "sldns/str2wire.h"
#ifdef USE_DNSTAP
#include "dnstap/dtstream.h"
#endif

#ifdef HAVE_TARGETCONDITIONALS_H
#include <TargetConditionals.h>
Expand Down
1 change: 1 addition & 0 deletions pythonmod/pythonmod_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
* conversions.
*/
#include "config.h"
#include "pythonmod/pythonmod_utils.h"
#include "util/module.h"
#include "util/netevent.h"
#include "util/net_help.h"
Expand Down
3 changes: 2 additions & 1 deletion pythonmod/pythonmod_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

#include "util/module.h"
struct delegpt_addr;
struct sldns_buffer;

/**
* Store the reply_info and query_info pair in message cache (qstate->msg_cache)
Expand Down Expand Up @@ -77,7 +78,7 @@ void invalidateQueryInCache(struct module_qstate* qstate, struct query_info* qin
* @param pkt: a sldns_buffer which contains sldns_packet data
* @return 0 on failure, out of memory or parse error.
*/
int createResponse(struct module_qstate* qstate, sldns_buffer* pkt);
int createResponse(struct module_qstate* qstate, struct sldns_buffer* pkt);

/**
* Convert reply->addr to string
Expand Down
12 changes: 6 additions & 6 deletions services/listen_dnsport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1821,20 +1821,20 @@ tcp_req_info_setup_listen(struct tcp_req_info* req)
req->cp->tcp_is_reading = 0;
comm_point_stop_listening(req->cp);
comm_point_start_listening(req->cp, -1,
req->cp->tcp_timeout_msec);
adjusted_tcp_timeout(req->cp));
} else if(rd) {
req->cp->tcp_is_reading = 1;
comm_point_stop_listening(req->cp);
comm_point_start_listening(req->cp, -1,
req->cp->tcp_timeout_msec);
adjusted_tcp_timeout(req->cp));
/* and also read it (from SSL stack buffers), so
* no event read event is expected since the remainder of
* the TLS frame is sitting in the buffers. */
req->read_again = 1;
} else {
comm_point_stop_listening(req->cp);
comm_point_start_listening(req->cp, -1,
req->cp->tcp_timeout_msec);
adjusted_tcp_timeout(req->cp));
comm_point_listen_for_rw(req->cp, 0, 0);
}
}
Expand Down Expand Up @@ -1947,7 +1947,7 @@ tcp_req_info_handle_readdone(struct tcp_req_info* req)
send_it:
c->tcp_is_reading = 0;
comm_point_stop_listening(c);
comm_point_start_listening(c, -1, c->tcp_timeout_msec);
comm_point_start_listening(c, -1, adjusted_tcp_timeout(c));
return;
}
req->in_worker_handle = 0;
Expand Down Expand Up @@ -2065,7 +2065,7 @@ tcp_req_info_send_reply(struct tcp_req_info* req)
/* switch to listen to write events */
comm_point_stop_listening(req->cp);
comm_point_start_listening(req->cp, -1,
req->cp->tcp_timeout_msec);
adjusted_tcp_timeout(req->cp));
return;
}
/* queue up the answer behind the others already pending */
Expand Down Expand Up @@ -2793,7 +2793,7 @@ void http2_req_stream_clear(struct http2_stream* h2_stream)
}
}

nghttp2_session_callbacks* http2_req_callbacks_create()
nghttp2_session_callbacks* http2_req_callbacks_create(void)
{
nghttp2_session_callbacks *callbacks;
if(nghttp2_session_callbacks_new(&callbacks) == NGHTTP2_ERR_NOMEM) {
Expand Down
2 changes: 1 addition & 1 deletion services/listen_dnsport.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ size_t http2_get_response_buffer_size(void);
* Create nghttp2 callbacks to handle HTTP2 requests.
* @return malloc'ed struct, NULL on failure
*/
nghttp2_session_callbacks* http2_req_callbacks_create();
nghttp2_session_callbacks* http2_req_callbacks_create(void);

/** Free http2 stream buffers and decrease buffer counters */
void http2_req_stream_clear(struct http2_stream* h2_stream);
Expand Down
Loading

0 comments on commit c892429

Please sign in to comment.