Commit 64870d56 authored by Razvan Becheriu's avatar Razvan Becheriu
Browse files

Merge branch 'master' into HEAD

parents 4350f397 a7670339
......@@ -104,6 +104,8 @@ We have received the following contributions:
- Razvan Becheriu, Qualitance
2016-05: Added support for Cassandra
2017-12: Significant update for Cassandra backend
2018-01: Host reservations for Cassandra
- Patrik Lundin
2016-07: Replace test by expr for < in configure.ac
......@@ -128,6 +130,9 @@ We have received the following contributions:
2017-02: Doxygen support updated to 1.8.11
2017-02: Improved PgSQL backend version handling
2017-02: Numerous spelling mistakes
2017-12: Significant update for Cassandra backend
2018-01: Host reservations for Cassandra
2018-01: Uniform compilation
- Vincent Legout
2016-11: Fixed serveral spelling mistakes
......@@ -155,7 +160,8 @@ Kea uses log4cplus (http://sourceforge.net/projects/log4cplus/) for logging,
Boost (http://www.boost.org/) library for almost everything, and can use Botan
(http://botan.randombit.net/) or OpenSSL (https://www.openssl.org/) for
cryptographic operations. It can also optionally use PostgreSQL
(http://www.postgresql.org/) and/or MySQL (http://www.mysql.com/) as a database.
(http://www.postgresql.org/) and/or MySQL (http://www.mysql.com/) and/or
Cassandra (http://cassandra.apache.org/) as a database.
Kea can use googletest for unit-tests (https://github.com/google/googletest).
......
......@@ -7,12 +7,6 @@ text is also included below.
-----------------------------------------------------------------------------
The ext/coroutine code is externally maintained and distributed under
the Boost Software License, Version 1.0. (See its accompanying file
ext/coroutine/LICENSE_1_0.txt.)
-----------------------------------------------------------------------------
The Cassandra backend code is distributed under the Apache License, Version 2.0.
The text is available at http://www.apache.org/licenses/LICENSE-2.0. Full
text is also included below in this file.
......
1349. [build] andreipavelQ
Compilation parameters unified (every file now includes config.h,
several makefile tweaks).
(Github #38, git 7206aa79c57be7466c4ab3dd558663c6c4f858b7)
1348. [func] fdupont
Several hook points now support next step status DROP. This allows
more flexibility with dropping packets from within hooks.
(Trac #5443, git ff22a906915a34df327174f550f69a396a05bb2c)
1347. [func] marcin
Implemented HTTP client classes in libkea-http.
(Trac #5451, git 94267e252b372650e4235389251b49d6f5501322)
1346. [build] fdupont
Modified configure.ac to include premium module m4 macros, if the
module is present. Prior to this it relied on premium having it's
own configure.ac script.
(Trac #5400, git 38c4f2fb8fc8c8874a0e4671cc295a049acf675f)
1345. [build] fdupont
Added support of boost 1.66.0 ASIO.
(Github #60/Trac #5496, git bc2947de4296bd99b74e50e65f272c7ad5312429)
1344. [func] marcin
Implemented lease4-get-all command in lease_cmds hooks library.
(Trac #5468, git a378ec28489e98df64830d1f26c3bebd20e256b2)
1343. [func] marcin
Implemented "force-create" parameter for lease4-update and
lease6-update commands.
(Trac #5472, git 369245e4c5308a701fd483123f2cb2fd7d3d0966)
1342. [func] andrei, razvan
Support for host reservations stored in Cassandra added. The core
functionality was added. There are some limitations (delete,
client classes, fixed DHCPv4 fields, statistics recount, etc.)
These will be addressed in upcoming tickets.
(github #37, git e37606fd2d0c02234a55f7445c52a12b2e7a82ec)
1343. [func] fdupont
User-context and comments are now supported in many new scopes:
global, shared-network, subnet, pool, host reservation, option,
option definition, client-class, control-socket, dhcp-ddns,
interfaces, loggers, and for DHCPv6 pd-pool and server-id.
(Trac #5351, git 3405a8fa5d391d96cd15874fd3de3ac63ceb33b6)
1342. [bug] fdupont
Fixed subnets and host reservations returned by config-get and
config-write.
(Trac #5452, git c24d057bed2692eaf3cdb6af889122eb582ffede)
1341. [func] razvan, andrei
Significant update of Cassandra support. A lot of code for
Cassandr Lease Manager has been updated and partially rewritten.
(github #35, git 41795494720cd9886c1e98d21eaeefd94d674e37)
1340. [func] marcin
Added support for "dhcp-enable" and "dhcp-disable" commands in
the DHCPv4 and DHCPv6 server.
(Trac #5442, git 36dc68ff7aa8b3cfd265c4f982d10248590039bd)
1339. [doc] marcin
Updated User's Guide describing how to selectively disable
legal logging for a subnet.
(Trac #5407, git 469080abd711f8e88a5133f76f4ab31a5549a858)
1338. [func] marcin
Persistent HTTP/1.1 connections and HTTP/1.0 keep-alive
are supported by RESTful API.
(Trac #5448, git 05018f7cc0662d6956b9b7648646e0c17da948ba)
1337. [doc] marcin
Added placeholder section for the libdhcp_ha hooks library.
(Trac #5447, git d939b5b8bc4befb24daf863f2408d97493e4bfbf)
1336. [bug] marcin
DHCPv6 server always sends prefixes with the lifetime of 0 for
the prefix leases that should no longer be used, even if those
......
......@@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
# ^^^^^^^^ This has to be the first line and cannot come later in this
# Makefile.am due to some bork in some versions of autotools.
SUBDIRS = compatcheck tools doc . ext src m4macros @PREMIUM_DIR@
SUBDIRS = compatcheck tools doc . ext src m4macros @PREMIUM_DIR@ @CONTRIB_DIR@
USE_LCOV=@USE_LCOV@
LCOV=@LCOV@
......@@ -77,7 +77,6 @@ report-cpp-coverage:
if HAVE_BOTAN
botan/\* \
endif
ext/coroutine/\* \
gtest/\* \
include/\* \
log4cplus/\* \
......@@ -120,9 +119,6 @@ install-exec-hook:
EXTRA_DIST = tools/path_replacer.sh
EXTRA_DIST += tools/mk_cfgrpt.sh
#### include external sources in the distributed tarball:
EXTRA_DIST += ext/coroutine/coroutine.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = dns++.pc
......
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.59])
AC_PREREQ([2.69])
# For released versions, this is in x.y.z format.
# For GIT versions, this is x.y.z-git, where x.y.z denotes the software
......@@ -72,13 +72,23 @@ AC_ARG_ENABLE([debug],
AM_CONDITIONAL([DEBUG_ENABLED], [test x$debug_enabled = xyes])
AM_COND_IF([DEBUG_ENABLED], [AC_DEFINE([ENABLE_DEBUG], [1], [Enable low-performing debugging facilities?])])
# Include premium configuration
PREMIUM_DIR=
if test -d "${srcdir}/premium"; then
PREMIUM_DIR=premium
AC_CONFIG_SUBDIRS([premium])
fi
AC_DEFUN([AX_PREMIUM],[])
# m4_sinclude includes the file if it exists at autoreconf time
m4_sinclude(premium/config.m4)
m4_sinclude(premium/tier1.m4)
m4_sinclude(premium/tier2.m4)
AC_SUBST(PREMIUM_DIR)
AX_PREMIUM
# Include contrib configuration
# (currently only a provision copied from premium support)
CONTRIB_DIR=
AC_DEFUN([AX_CONTRIB],[])
m4_sinclude(contrib/config.m4)
AC_SUBST(CONTRIB_DIR)
AX_CONTRIB
# Libtool configuration
#
......@@ -728,7 +738,7 @@ if test "$CQL_CONFIG" != "" ; then
CQL_INCLUDEDIR=`$CQL_CONFIG --includedir`
CQL_CPPFLAGS="`$CQL_CONFIG --cppflags` -I$CQL_INCLUDEDIR"
CQL_LIBS="-L`$CQL_CONFIG --libdir` -lcassandra_static -luv"
CQL_LIBS="-L`$CQL_CONFIG --libdir` -lcassandra -luv"
CQL_VERSION=`$CQL_CONFIG --version`
AC_SUBST(CQL_CPPFLAGS)
......@@ -1000,9 +1010,6 @@ fi
#
# ASIO: we extensively use it as the C++ event management module.
#
# Use our 'coroutine' header from ext
CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/ext/coroutine"
#
# Doesn't seem to be required?
CPPFLAGS="$CPPFLAGS -DBOOST_ASIO_HEADER_ONLY"
#
......@@ -1190,7 +1197,6 @@ AC_CONFIG_FILES([Makefile
doc/guide/Makefile
doc/version.ent
ext/Makefile
ext/coroutine/Makefile
ext/gtest/Makefile
m4macros/Makefile
src/Makefile
......@@ -1213,14 +1219,12 @@ AC_CONFIG_FILES([Makefile
src/bin/d2/tests/d2_process_tests.sh
src/bin/d2/tests/test_data_files_config.h
src/bin/dhcp4/Makefile
src/bin/dhcp4/spec_config.h.pre
src/bin/dhcp4/tests/Makefile
src/bin/dhcp4/tests/dhcp4_process_tests.sh
src/bin/dhcp4/tests/marker_file.h
src/bin/dhcp4/tests/test_data_files_config.h
src/bin/dhcp4/tests/test_libraries.h
src/bin/dhcp6/Makefile
src/bin/dhcp6/spec_config.h.pre
src/bin/dhcp6/tests/Makefile
src/bin/dhcp6/tests/dhcp6_process_tests.sh
src/bin/dhcp6/tests/marker_file.h
......@@ -1300,7 +1304,6 @@ AC_CONFIG_FILES([Makefile
src/lib/log/tests/severity_test.sh
src/lib/log/tests/tempdir.h
src/lib/process/Makefile
src/lib/process/spec_config.h.pre
src/lib/process/tests/Makefile
src/lib/process/testutils/Makefile
src/lib/stats/Makefile
......@@ -1320,6 +1323,7 @@ AC_CONFIG_FILES([Makefile
src/share/database/Makefile
src/share/database/scripts/Makefile
src/share/database/scripts/cql/Makefile
src/share/database/scripts/cql/upgrade_1.0_to_2.0.sh
src/share/database/scripts/mysql/Makefile
src/share/database/scripts/mysql/upgrade_1.0_to_2.0.sh
src/share/database/scripts/mysql/upgrade_2.0_to_3.0.sh
......@@ -1327,11 +1331,13 @@ AC_CONFIG_FILES([Makefile
src/share/database/scripts/mysql/upgrade_4.0_to_4.1.sh
src/share/database/scripts/mysql/upgrade_4.1_to_5.0.sh
src/share/database/scripts/mysql/upgrade_5.0_to_5.1.sh
src/share/database/scripts/mysql/upgrade_5.1_to_6.0.sh
src/share/database/scripts/pgsql/Makefile
src/share/database/scripts/pgsql/upgrade_1.0_to_2.0.sh
src/share/database/scripts/pgsql/upgrade_2.0_to_3.0.sh
src/share/database/scripts/pgsql/upgrade_3.0_to_3.1.sh
src/share/database/scripts/pgsql/upgrade_3.1_to_3.2.sh
src/share/database/scripts/pgsql/upgrade_3.2_to_4.0.sh
tools/Makefile
tools/path_replacer.sh
])
......@@ -1358,21 +1364,6 @@ AC_CONFIG_COMMANDS([permissions], [
chmod +x tools/path_replacer.sh
])
AM_CONDITIONAL(PREMIUM, test -d "$srcdir/premium/src")
AC_MSG_CHECKING([if premium package is available])
if test -d "$srcdir/premium/src"; then
# Define it in the config.h, so C++ code could use it.
AC_DEFINE([PREMIUM], [1], [Kea-premium package found])
# Export it here, so code in configure could use it.
PREMIUM=1
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
AC_OUTPUT
dnl Print the results
......@@ -1389,19 +1380,22 @@ cat > config.report << END
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Package:
Name: ${PACKAGE_NAME}
Version: ${PACKAGE_VERSION}
Extended version:${EXTENDED_VERSION}
OS Family: ${OS_TYPE}
Using GNU sed: ${GNU_SED}
Name: ${PACKAGE_NAME}
Version: ${PACKAGE_VERSION}
Extended version: ${EXTENDED_VERSION}
OS Family: ${OS_TYPE}
Using GNU sed: ${GNU_SED}
END
if test "$PREMIUM" != ""; then
cat >> config.report << END
Premium package: yes
Premium package: yes
Tier1 Packages: ${TIER1_PACKAGES}
Tier2 Packages: ${TIER2_PACKAGES}
Included Packages: ${INCLUDED_PACKAGES}
END
else
cat >> config.report << END
Premium package: no
Premium package: no
END
fi
cat >> config.report << END
......@@ -1462,9 +1456,9 @@ ${CRYPTO_NAME}:
${DISABLED_CRYPTO}: no
Log4cplus:
LOG4CPLUS_VERSION: ${LOG4CPLUS_VERSION}
LOG4CPLUS_VERSION: ${LOG4CPLUS_VERSION}
LOG4CPLUS_INCLUDES: ${LOG4CPLUS_INCLUDES}
LOG4CPLUS_LIBS: ${LOG4CPLUS_LIBS}
LOG4CPLUS_LIBS: ${LOG4CPLUS_LIBS}
Flex/bison:
FLEX: ${LEX}
......@@ -1536,14 +1530,14 @@ fi
cat >> config.report << END
Developer:
Enable Debugging: $debug_enabled
Google Tests: $enable_gtest
Valgrind: $found_valgrind
C++ Code Coverage: $USE_LCOV
Logger checks: $enable_logger_checks
Enable Debugging: $debug_enabled
Google Tests: $enable_gtest
Valgrind: $found_valgrind
C++ Code Coverage: $USE_LCOV
Logger checks: $enable_logger_checks
Generate Documentation: $enable_generate_docs
Parser Generation: $enable_generate_parser
Kea-shell: $enable_shell
Parser Generation: $enable_generate_parser
Kea-shell: $enable_shell
END
......
......@@ -18,6 +18,7 @@ nobase_dist_doc_DATA += examples/kea4/advanced.json
nobase_dist_doc_DATA += examples/kea4/backends.json
nobase_dist_doc_DATA += examples/kea4/cassandra.json
nobase_dist_doc_DATA += examples/kea4/classify.json
nobase_dist_doc_DATA += examples/kea4/comments.json
nobase_dist_doc_DATA += examples/kea4/dhcpv4-over-dhcpv6.json
nobase_dist_doc_DATA += examples/kea4/hooks.json
nobase_dist_doc_DATA += examples/kea4/leases-expiration.json
......@@ -33,6 +34,7 @@ nobase_dist_doc_DATA += examples/kea6/advanced.json
nobase_dist_doc_DATA += examples/kea6/backends.json
nobase_dist_doc_DATA += examples/kea6/cassandra.json
nobase_dist_doc_DATA += examples/kea6/classify.json
nobase_dist_doc_DATA += examples/kea6/comments.json
nobase_dist_doc_DATA += examples/kea6/dhcpv4-over-dhcpv6.json
nobase_dist_doc_DATA += examples/kea6/duid.json
nobase_dist_doc_DATA += examples/kea6/hooks.json
......
......@@ -110,10 +110,7 @@ The following are some details of the JSON backend framework.
(such as the logging initialization code) very easy to share among Kea4, Kea6 and
DHCP-DDNS.<br/><br/>
-# The .spec files used in BIND 10 by the control program to validate commands
have been retained. They will be kept and maintained even though no use of
them is currently planned. At some future time syntax validation may be implemented,
although it is out of scope for Kea 0.9 (and probably
for 1.0 as well, as it is a pretty big task).<br/><br/>
have been removed in 1.4.<br/><br/>
-# A shell script has been added (as src/bin/keactrl/keactrl) to
start, stop and reconfigure the daemons. Its only
job is to pass the configuration file to each daemon and remember its PID file, so
......
......@@ -101,12 +101,15 @@
"match-client-id": true,
// The following list defines subnets. Each subnet consists of at
// least subnet and pool entries. One extra feature that requires some
// explanation is user-context. This is a structure that you can define
// in subnets and pools. It is parsed by Kea, but not used directly.
// It is intended to keep anything you may want to put there - comments,
// extra designations, floor or department names etc. These structures
// will be made available to Kea hooks.
// least subnet and pool entries. One extra feature that requires
// some explanation is user-context. This is a structure that you can
// define in subnets, pools and others. It is parsed by Kea, but not
// used directly. It is intended to keep anything you may want to
// put there - comments, extra designations, floor or department
// names etc. These structures will be made available to Kea hooks.
// A comment entry is translated into a user-context with a
// "comment" property so you can include comments inside the
// configuration itself.
"subnet4": [
{
"pools": [ {
......@@ -117,6 +120,8 @@
"user-context": {
"comment": "Our first subnet!"
}
// Equivalent using smart parser
// "comment": "Our first subnet!"
},
{
// This particular subnet has match-client-id value changed.
......
// This is an example configuration file for the DHCPv4 server in Kea.
// It uses embedded (i.e., which will be included in configuration objects
// and not stripped by at lexical analysis) comments.
{ "Dhcp4":
{
// Global scope
"comment": "A DHCPv4 server",
// In interface config
"interfaces-config": {
"comment": "Use wildcard",
"interfaces": [ "*" ] },
// In option definitions
"option-def": [ {
"comment": "An option definition",
"name": "foo",
"code": 100,
"type": "ipv4-address",
"space": "isc"
} ],
// In option data
"option-data": [ {
"comment": "Set option value",
"name": "dhcp-message",
"data": "ABCDEF0105",
"csv-format": false
} ],
// In client classes
"client-classes": [
{
"comment": "match all",
"name": "all",
"test": "'' == ''"
},
// Of course comments are optional
{
"name": "none"
},
// A comment and a user-context can be specified
{
"comment": "a comment",
"name": "both",
"user-context": {
"version": 1
}
}
],
// In control socket (more for the agent)
"control-socket": {
"socket-type": "unix",
"socket-name": "/tmp/kea4-ctrl-socket",
"user-context": { "comment": "Indirect comment" }
},
// In shared networks
"shared-networks": [ {
"comment": "A shared network",
"name": "foo",
// In subnets
"subnet4": [
{
"comment": "A subnet",
"subnet": "192.0.1.0/24",
"id": 100,
// In pools
"pools": [
{
"comment": "A pool",
"pool": "192.0.1.1-192.0.1.10"
}
],
// In host reservations
"reservations": [
{
"comment": "A host reservation",
"hw-address": "AA:BB:CC:DD:EE:FF",
"hostname": "foo.example.com",
// Again in an option data
"option-data": [ {
"comment": "An option in a reservation",
"name": "domain-name",
"data": "example.com"
} ]
}
]
}
]
} ],
// In dhcp ddns
"dhcp-ddns": {
"comment": "No dynamic DNS",
"enable-updates": false
}
},
"Logging": {
// In loggers
"loggers": [ {
"comment": "A logger",
"name": "kea-dhcp4"
} ]
}
}
......@@ -86,6 +86,9 @@
// structures. You can put anything you want in the user-context
// as long as it is a valid JSON and it starts with a map (i.e.
// is enclosed by curly brackets).
// A comment entry is translated into a user-context with a
// "comment" property so you can include comments inside the
// configuration itself.
"subnet6": [
{
"pools": [
......@@ -102,6 +105,8 @@
// Here's the user-context for the whole subnet.
"user-context": { "comment": "Floor one, west wing" },
// Equivalent using smart parser
// "comment": "Floor one, west wing",
// This defines PD (prefix delegation) pools. In this case
// we have only one pool. That consists of /64 prefixes
......
// This is an example configuration file for the DHCPv6 server in Kea.
// It uses embedded (i.e., which will be included in configuration objects
// and not stripped by at lexical analysis) comments.
{ "Dhcp6":
{
// Global scope
"comment": "A DHCPv6 server",
// In interface config
"interfaces-config": {
"comment": "Use wildcard",
"interfaces": [ "*" ] },
// In option definitions
"option-def": [ {
"comment": "An option definition",
"name": "foo",
"code": 100,
"type": "ipv6-address",
"space": "isc"
} ],
// In option data
"option-data": [ {
"comment": "Set option value",
"name": "subscriber-id",
"data": "ABCDEF0105",
"csv-format": false
} ],
// In client classes
"client-classes": [
{
"comment": "match all",
"name": "all",
"test": "'' == ''"
},
// Of course comments are optional
{
"name": "none"
},
// A comment and a user-context can be specified
{
"comment": "a comment",
"name": "both",
"user-context": {
"version": 1
}
}
],
// In control socket (more for the agent)
"control-socket": {
"socket-type": "unix",
"socket-name": "/tmp/kea6-ctrl-socket",
"user-context": { "comment": "Indirect comment" }
},
// In shared networks
"shared-networks": [ {
"comment": "A shared network",
"name": "foo",
// In subnets
"subnet6": [
{
"comment": "A subnet",
"subnet": "2001:db1::/64",
"id": 100,
// In pools
"pools": [
{
"comment": "A pool",
"pool": "2001:db1::/64"
}
],
// In prefix pools
"pd-pools": [
{
"comment": "A prefix pool",
"prefix": "2001:db2::",
"prefix-len": 48,
"delegated-len": 64
}
],
// In host reservations
"reservations": [
{
"comment": "A host reservation",