From: Francis Dupont Date: Fri, 29 Jan 2016 13:57:39 +0000 (+0100) Subject: Merged rt38835a (add --with-randomdev in config options) X-Git-Tag: v4_3_4~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7311aaeb339ee998784bf3a273e9d26bfda59af;p=thirdparty%2Fdhcp.git Merged rt38835a (add --with-randomdev in config options) --- diff --git a/RELNOTES b/RELNOTES index 68f32659f..a7ca05b4a 100644 --- a/RELNOTES +++ b/RELNOTES @@ -126,7 +126,7 @@ by Eric Young (eay@cryptsoft.com). in the same packet, see RFC7550 for some discussion. [ISC-Bugs #40190] -! Update the bounds checking when receiving a packet. +- Update the bounds checking when receiving a packet. Thanks to Sebastian Poehn from Sophos for the bug report and a suggested patch. [ISC-Bugs #41267] @@ -187,6 +187,11 @@ by Eric Young (eay@cryptsoft.com). option as per RFC 6939. [ISC-Bugs #40334] +- Allow a filename to be specified instead of /dev/random during + configuration. This is passed to the BIND configuration to allow + for cross compilation. + [ISC-Bugs #33835] + Changes since 4.3.3b1 - None diff --git a/configure.ac b/configure.ac index 30f9ef0aa..5664827ae 100644 --- a/configure.ac +++ b/configure.ac @@ -580,9 +580,35 @@ AC_CHECK_FUNCS(strlcat) AC_SEARCH_LIBS(if_nametoindex, [ipv6]) # check for /dev/random (declares HAVE_DEV_RANDOM) -AC_CHECK_FILE(/dev/random, - AC_DEFINE([HAVE_DEV_RANDOM], [1], - [Define to 1 if you have the /dev/random file.])) +AC_MSG_CHECKING(for random device) +AC_ARG_WITH(randomdev, + AS_HELP_STRING([--with-randomdev=PATH],[Path for random device + (default is /dev/random)]), + use_randomdev="$withval", use_randomdev="unspec") +if test "$use_randomdev" = "unspec"; then + if test "$cross_compiling" = "yes"; then + AC_MSG_RESULT(unspecified) + AC_MSG_ERROR([ need --with-randomdev=PATH or --with-randomdev=no]) + fi + use_randomdev="/dev/random" +elif test "$use_randomdev" = "yes"; then + use_randomdev="/dev/random" +fi +if test "$use_randomdev" = "no"; then + AC_MSG_RESULT(disabled) + BINDCONFIG="$BINDCONFIG --with-randomdev=no" +else + if test "$cross_compiling" = "yes"; then + AC_MSG_RESULT($use_randomdev (unchecked)) + else + AC_MSG_RESULT($use_randomdev) + AC_CHECK_FILE($use_randomdev, + AC_DEFINE([HAVE_DEV_RANDOM], [1], + [Define to 1 if you have the /dev/random or other configured file.]), + AC_MSG_ERROR(cannot find $use_randomdev)) + fi + BINDCONFIG="$BINDCONFIG --with-randomdev=$use_randomdev" +fi # see if there is a "sa_len" field in our interface information structure AC_CHECK_MEMBER(struct sockaddr.sa_len,