mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fixes on #200. and rerun autoconf.
This commit is contained in:
parent
311f163aed
commit
bcdc13514a
4 changed files with 37 additions and 24 deletions
|
|
@ -28,6 +28,9 @@
|
|||
/* Whether daemon is deprecated */
|
||||
#undef DEPRECATED_DAEMON
|
||||
|
||||
/* Define this to enable kernel based UDP source port randomization. */
|
||||
#undef DISABLE_EXPLICIT_PORT_RANDOMISATION
|
||||
|
||||
/* default dnstap socket path */
|
||||
#undef DNSTAP_SOCKET_PATH
|
||||
|
||||
|
|
@ -811,9 +814,8 @@
|
|||
/* Define to 1 to use ipset support */
|
||||
#undef USE_IPSET
|
||||
|
||||
/* Define to 1 to disable explict UDP source port randomisation and rely on the
|
||||
kernel to provide random source ports */
|
||||
#undef DISABLE_EXPLICIT_PORT_RANDOMISATION
|
||||
/* Define if you enable libevent */
|
||||
#undef USE_LIBEVENT
|
||||
|
||||
/* Define if you want to use internal select based events */
|
||||
#undef USE_MINI_EVENT
|
||||
|
|
|
|||
31
configure
vendored
31
configure
vendored
|
|
@ -19124,31 +19124,34 @@ esac
|
|||
if test "${with_libevent+set}" = set; then :
|
||||
withval=$with_libevent;
|
||||
else
|
||||
withval="no"
|
||||
with_libevent="no"
|
||||
fi
|
||||
|
||||
if test x_$withval = x_yes -o x_$withval != x_no; then
|
||||
if test "x_$with_libevent" != x_no; then
|
||||
|
||||
$as_echo "#define USE_LIBEVENT 1" >>confdefs.h
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
|
||||
$as_echo_n "checking for libevent... " >&6; }
|
||||
if test x_$withval = x_ -o x_$withval = x_yes; then
|
||||
withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
|
||||
if test "x_$with_libevent" = x_ -o "x_$with_libevent" = x_yes; then
|
||||
with_libevent="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
|
||||
fi
|
||||
for dir in $withval; do
|
||||
for dir in $with_libevent; do
|
||||
thedir="$dir"
|
||||
if test -f "$dir/include/event.h" -o -f "$dir/include/event2/event.h"; then
|
||||
found_libevent="yes"
|
||||
if test "$thedir" != "/usr"; then
|
||||
CPPFLAGS="$CPPFLAGS -I$thedir/include"
|
||||
fi
|
||||
break;
|
||||
fi
|
||||
if test "$thedir" != "/usr"; then
|
||||
CPPFLAGS="$CPPFLAGS -I$thedir/include"
|
||||
fi
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if test x_$found_libevent != x_yes; then
|
||||
if test -f "$dir/event.h" -a \( -f "$dir/libevent.la" -o -f "$dir/libev.la" \) ; then
|
||||
# libevent source directory
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $thedir" >&5
|
||||
$as_echo "found in $thedir" >&6; }
|
||||
CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
|
||||
CPPFLAGS="$CPPFLAGS -I$thedir -I$thedir/include"
|
||||
BAK_LDFLAGS_SET="1"
|
||||
BAK_LDFLAGS="$LDFLAGS"
|
||||
# remove evdns from linking
|
||||
|
|
@ -19161,10 +19164,10 @@ $as_echo "found in $thedir" >&6; }
|
|||
cp $ev_files_o build/libevent
|
||||
cp $ev_files_lo build/libevent
|
||||
cp $ev_files_libso build/libevent/.libs
|
||||
LATE_LDFLAGS="build/libevent/*.lo -lm"
|
||||
LATE_LDFLAGS="build/libevent/*.lo -lm"
|
||||
LDFLAGS="build/libevent/*.o $LDFLAGS -lm"
|
||||
else
|
||||
as_fn_error $? "Cannot find the libevent library in $withval
|
||||
as_fn_error $? "Cannot find the libevent library in $with_libevent
|
||||
You can restart ./configure --with-libevent=no to use a builtin alternative.
|
||||
Please note that this alternative is not as capable as libevent when using
|
||||
large outgoing port ranges. " "$LINENO" 5
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
24 March 2020: Wouter
|
||||
- Merge PR #200 from yarikk: add ip-dscp option to specify the DSCP
|
||||
tag for outgoing packets.
|
||||
- Fixes on #200.
|
||||
|
||||
23 March 2020: Wouter
|
||||
- Fix compile on Solaris for unbound-checkconf.
|
||||
|
|
|
|||
|
|
@ -875,7 +875,8 @@ create_tcp_accept_sock(struct addrinfo *addr, int v6only, int* noproto,
|
|||
}
|
||||
|
||||
char*
|
||||
set_ip_dscp(int socket, int addrfamily, int dscp) {
|
||||
set_ip_dscp(int socket, int addrfamily, int dscp)
|
||||
{
|
||||
int ds;
|
||||
|
||||
if(dscp == 0)
|
||||
|
|
@ -885,32 +886,38 @@ set_ip_dscp(int socket, int addrfamily, int dscp) {
|
|||
case AF_INET6:
|
||||
if(setsockopt(socket, IPPROTO_IPV6, IPV6_TCLASS, &ds, sizeof(ds)) < 0)
|
||||
return sock_strerror(errno);
|
||||
break;
|
||||
default:
|
||||
if(setsockopt(socket, IPPROTO_IP, IP_TOS, &ds, sizeof(ds)) < 0)
|
||||
return sock_strerror(errno);
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
# ifndef USE_WINSOCK
|
||||
char*
|
||||
sock_strerror(int errn){
|
||||
return strerror(errno);
|
||||
sock_strerror(int errn)
|
||||
{
|
||||
return strerror(errn);
|
||||
}
|
||||
|
||||
void
|
||||
sock_close(int socket) {
|
||||
sock_close(int socket)
|
||||
{
|
||||
close(socket);
|
||||
}
|
||||
|
||||
# else
|
||||
char*
|
||||
sock_strerror(int errn){
|
||||
return wsa_strerror(WSAGetLastError()))
|
||||
sock_strerror(int ATTR_UNUSED(errn))
|
||||
{
|
||||
return wsa_strerror(WSAGetLastError());
|
||||
}
|
||||
|
||||
void
|
||||
sock_close(int socket) {
|
||||
sock_close(int socket)
|
||||
{
|
||||
closesocket(socket);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue