Browse Source

Merge branch 'master' of ssh://git.bind10.isc.org/var/bind10/git/bind10

JINMEI Tatuya 13 years ago
parent
commit
90f4e987cf

+ 9 - 1
ChangeLog

@@ -1,3 +1,11 @@
+360.	[func] 		fdupont
+	Alpha version of DHCP benchmarking tool added.  "perfdhcp" is able to
+	test both IPv4 and IPv6 servers: it can time the four-packet exchange
+	(DORA and SARR) as well as time the initial two-packet exchange (DO and
+	SA).  More information can be obtained by invoking the utility (in
+	tests/tools/perfdhcp) with the "-h" flag.
+	(Trac #1450, git 85083a76107ba2236732b45524ce7018eefbaf90)
+
 359.	[func]*		vorner
 	The target parameter of ZoneFinder::find is no longer present, as the
 	interface was awkward. To get all the RRsets of a single domain, use
@@ -25,7 +33,7 @@
 	values, and better errors if they are bad.
 	(Trac #1414, git 7b122af8489acf0f28f935a19eca2c5509a3677f)
 
-346.	[build]*		jreed
+346.	[build]*	jreed
 	Renamed libdhcp to libdhcp++.
 	(Trac #1446, git d394e64f4c44f16027b1e62b4ac34e054b49221d)
 

+ 6 - 1
configure.ac

@@ -120,7 +120,7 @@ AM_CONDITIONAL(SET_ENV_LIBRARY_PATH, test $SET_ENV_LIBRARY_PATH = yes)
 AC_SUBST(SET_ENV_LIBRARY_PATH)
 AC_SUBST(ENV_LIBRARY_PATH)
 
-m4_define([_AM_PYTHON_INTERPRETER_LIST], [python python3 python3.1])
+m4_define([_AM_PYTHON_INTERPRETER_LIST], [python python3 python3.1 python3.2])
 AC_ARG_WITH([pythonpath],
 AC_HELP_STRING([--with-pythonpath=PATH],
   [specify an absolute path to python executable when automatic version check (incorrectly) fails]),
@@ -831,6 +831,10 @@ EV_SET(NULL, 0, 0, 0, 0, 0, udata);],
 	])
 fi
 
+CLOCK_GETTIME_LDFLAGS=
+AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_GETTIME_LDFLAGS=-lrt], [])
+AC_SUBST([CLOCK_GETTIME_LDFLAGS])
+
 # /dev/poll issue: ASIO uses /dev/poll by default if it's available (generally
 # the case with Solaris).  Unfortunately its /dev/poll specific code would
 # trigger the gcc's "missing-field-initializers" warning, which would
@@ -997,6 +1001,7 @@ AC_CONFIG_FILES([Makefile
                  tests/tools/Makefile
                  tests/tools/badpacket/Makefile
                  tests/tools/badpacket/tests/Makefile
+                 tests/tools/perfdhcp/Makefile
                ])
 AC_OUTPUT([doc/version.ent
            compatcheck/sqlite3-difftbl-check.py

+ 1 - 0
src/lib/python/isc/util/io/socketsessionreceiver_python.cc

@@ -22,6 +22,7 @@
 
 #include <sys/types.h>
 #include <sys/socket.h>
+#include <netinet/in.h>
 #include <netdb.h>
 
 #include <string>

+ 3 - 0
src/lib/util/io/sockaddr_util.h

@@ -15,6 +15,9 @@
 #ifndef __SOCKADDR_UTIL_H_
 #define __SOCKADDR_UTIL_H_ 1
 
+#include <sys/socket.h>
+#include <netinet/in.h>
+
 #include <cassert>
 
 // This definitions in this file are for the convenience of internal

+ 4 - 3
src/lib/util/tests/socketsession_unittest.cc

@@ -17,6 +17,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/un.h>
+#include <netinet/in.h>
 
 #include <fcntl.h>
 #include <netdb.h>
@@ -815,9 +816,9 @@ TEST_F(ForwardTest, badPop) {
     sock.reset(-1);
     // The passed one should have been closed, too, so we should be able
     // to bind a new socket to the same port.
-    ScopedSocket(createSocket(AF_INET, SOCK_DGRAM, IPPROTO_UDP,
-                              getSockAddr("127.0.0.1", TEST_PORT),
-                              false));
+    sock.reset(createSocket(AF_INET, SOCK_DGRAM, IPPROTO_UDP,
+                            getSockAddr("127.0.0.1", TEST_PORT),
+                            false));
 }
 
 TEST(SocketSessionTest, badValue) {

+ 1 - 1
tests/tools/Makefile.am

@@ -1 +1 @@
-SUBDIRS = badpacket
+SUBDIRS = badpacket perfdhcp

+ 12 - 0
tests/tools/perfdhcp/Makefile.am

@@ -0,0 +1,12 @@
+SUBDIRS = .
+
+AM_CXXFLAGS = $(B10_CXXFLAGS)
+
+AM_LDFLAGS = $(CLOCK_GETTIME_LDFLAGS)
+AM_LDFLAGS += -lm
+if USE_STATIC_LINK
+AM_LDFLAGS += -static
+endif
+
+pkglibexec_PROGRAMS  = perfdhcp
+perfdhcp_SOURCES  = perfdhcp.c

File diff suppressed because it is too large
+ 3496 - 0
tests/tools/perfdhcp/perfdhcp.c