]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Merged rt38835a (add --with-randomdev in config options)
authorFrancis Dupont <fdupont@isc.org>
Fri, 29 Jan 2016 13:57:39 +0000 (14:57 +0100)
committerFrancis Dupont <fdupont@isc.org>
Fri, 29 Jan 2016 13:57:39 +0000 (14:57 +0100)
RELNOTES
configure.ac

index 68f32659f3bf456f5911b809396f8cc616176598..a7ca05b4ab13d9b800163b5fd36ed21ec1f037d3 100644 (file)
--- 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
index 30f9ef0aa24772b67862f4cd6166e1cdd25ad77e..5664827ae6a309acd587867bade35088ef44113d 100644 (file)
@@ -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,