From: Francis Dupont Date: Mon, 9 Apr 2018 12:32:48 +0000 (+0200) Subject: [master] Finishing merge of trac5404 (port relay) X-Git-Tag: trac5458a_base~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a6049947ad4caaaa697dba8cb7669a09264f0bc;p=thirdparty%2Fkea.git [master] Finishing merge of trac5404 (port relay) --- 2a6049947ad4caaaa697dba8cb7669a09264f0bc diff --cc ChangeLog index 5053f20927,bbec06a9f0..759f5bc3ba --- a/ChangeLog +++ b/ChangeLog @@@ -1,230 -1,3 +1,238 @@@ ++1382. [func] fdupont ++ Added support for generalized UDP Source Port for DHCP Relay ++ (RFC 8357) for DHCPv4, DHCPv6 and DHCPv4-over-DHCPv6. Note ++ this required changes to the inter-server protocol used by ++ our 4o6 implementation, and is therefore not backwardly ++ compatible. ++ (Trac #5404, git xxx) ++ +1381. [bug] marcin + Corrected a bug in the libkea-asiolink library which caused + the DHCP servers to crash while processing commands over + the unix domain socket on some systems. + (Trac #5580, git cb5276a24436a9e9ce4d1ab4630e7193a4c2d803) + +1380. [func] fdupont + Implemented lease6-get-all command in lease_cmds hooks library. + (Trac #5469, git a0bb7188df47a0f8020ff57739c5a6ab5f7e9828) + +1379. [func, bug] marcin + The network_state argument is provided to the callouts in + the dhcp4_srv_configured hook point. Also, fixed a couple + of minor bugs in the HTTP client classes. + (Trac #5470, git 93e2b2198c3163afb81d51fdf5ec547602a12415) + +1378. [doc] tomek + New parameter subnets-action for network4-del and network6-del + commands is now documented. + (Trac #5441, git 8b2ffabb3d1ba709f319df2b34d0804ee824446b) + +1377. [doc] tomek + New parameters for Cassandra are now documented. + (Trac #5484, git 56e7026ea2bfab99dbfa1a047dc920ec2f743540) + +1376. [func] razvan + Cassandra backend improvements: get all IPv4 leases, delete + hosts, ability to store fixed DHCPv4 fields (next-server, + server-hostname, boot-file-name) and user contexts in host + reservations. Also, the ability to store MAC address details + in DHCPv6 leases on PostgreSQL has been improved. + (Github #70, git 8cd0c1ae416be88baf69c2243e83a429d6d5c965) + (Trac #5506, git 8cd0c1ae416be88baf69c2243e83a429d6d5c965) + (Trac #5507, git 8cd0c1ae416be88baf69c2243e83a429d6d5c965) + (Trac #5508, git 8cd0c1ae416be88baf69c2243e83a429d6d5c965) + (Trac #4530, git 8cd0c1ae416be88baf69c2243e83a429d6d5c965) + +1375. [func] tmark + When encountering errors unpacking vendor specific options, + both kea-dhcp4 and kea-dhcp6 will now log the error, skip + unpacking any remaining options, and then attempt to process + the packet as is. Prior to this the servers would log the issue + and then drop the packet. + (Trac #5551, git 59ef33ee17672c55cee4ec86ff59737b361a3c21) + +1374. [func] tmark + kea-dhp4 and kea-dhcp6 can now be configured to attempt to + reconnect to Postgresql backends if connectivity is lost. + (Trac #5477, git 8e62a058382b2245d418cfbf829776934c638e5e) + +1373. [func] marcin + Implemented leases parsing from JSON in libkea-dhcpsrv. + (Trac #5466, git 84c2a2084b0fb7c086fc6b9502f7ff58b708174e) + +1372. [func] marcin + Implemented new hook points "dhcp4_srv_configured" and + "leases4_committed" in the DHCPv4 server. The latter supports + new next step status NEXT_STEP_PARK which causes the server + to "park" the client's DHCP packet. + (Trac #5457, git af43f07b0e227ccabcdf07a046a64cebb11bdccf) + +1371. [bug] fdupont + Fixed a bug in JSONfeed tool which did not correctly handle + strings and interpret their content. + (Trac #5513, git 231e923a85db7fb8305c7baa4d15f766fdf60942) + +1370. [bug] tmark + Fixed a bug which prevented inserting multiple host reservations + where IPv4 address was unspecified or when selected subnet identifier + was not specified (5416). Corrected inconsistent data types for + subnet id columns in both Postgres and MySQL schemas. Now both + schemas support upto MAX UINT32 in all subnet id columns. Exiting + databases may be updated without data migration. + (Trac #5416, #5522, git d1dd0f2e27ffa49515c17cf68d54f162359b6384) + +1369. [bug] marcin + Multiple critical performance optimizations in the allocation + engine for shared networks. + (Trac #5437, git 9d8bcd39802795d48c737a05ef3de3634a28ca4e) + +1368. [func] tmark + kea-dhcp4 now explicitly logs packets dropped due to a lack + message type as a log type DHCP4_PACKET_DROP_0009. Prior + to this such packets were logged has having an unsupported + message type of 0. + (Trac #5553, git ff97e5ffb5f3478be71aae8130b6eff3208bd69a) + +1367. [func] fdupont + Added initial skeleton implementation for Radius hook library. + (Trac #5524, git 832aa23b89eab71875bcbdb1e955eb92fdc0e01a) + +1366. [func] fdupont + Implemented FNV hashing function. Cassandra backend no longer + explicitly depends on OpenSSL. + (Trac #5502, git 71de75c3bb099f21fdef0d41806da281d6271287) + +1365. [func] fdupont + Both DHCPv4 and DHCPv6 servers can now listen on loopback + interfaces. This capability requires setting socket type to UDP in + DHCPv4. Note the feature has not been thoroughly tested. + (Trac #5390, git f38cbd73581a7a0f8634a63cb17f9b60407e3acc) + +1364. [func] fdupont + Extended forensic (aka legal) logging with database capability. + (Trac #5420, git 94bd3cc313e9f2a982ef8f8adf0cf44024c76499) + +1363. [func] tmark + Added support for automatically recalculating lease statistics + to the CQL backend. + (Trac #5487, git c807388d581ee1c3e479324f3c399f27feba1c96) + +1362. [func] razvan, andrei + A new parameter exit-wait-time has been added to perfdhcp. It is + now possible to tell perfdhcp to wait certain amount of time after + exit conditions are met before actuallying terminating. + (Github #55, git 0cd1178ae092fa0c2f122d0e16fb673b4074a6e6) + +1361. [func] razvan, andrei, tomek + Support for Google Benchmark has been added. To compile + benchmarking support, please use --with-benchmark option. + (Github #36, git d6819971410b460d7742c762844e2e75ba580944) + +1360. [build,bug] fdupont + Cassandra build fixes for macOS. + (Trac #5494, git cb0d735628aefd6bca2acc11b73d1f66b45d1c40) + +1359. [bug] rcgoodfellow + Fixed bug in kea-admin causing error on lease-dump. + (Github #61, git 2c9454ec56edc8f3cff8a23329f53ced0d172280) + +1358. [func] andreipavelQ,tomek + The logging configuration is now applied early, which helps + seeing errors in case the new configuration is faulty. + (Github #41, git d77fbec5a003a69cab207aa741133015f2657878) + +1357. [build] andreipavelQ + --with-dhcp-mysql renamed to --with-mysql and + --with-dhcp-pgsql renamed to --with-pgsql. These names were + leftovers from old BIND10 times when Kea was part of bigger + solution that also provided DNS services. Kea is now a stand-alone + software, thus the -dhcp- doesn't make sense in those options any + more. + (Github #40, git 318c9e3d3db9bb938ced27932d8401172529a2ff) + +1356. [doc] andreipavelQ + Documentation has been upgraded to DocBook 5.0. + (Github #39, git 9b6705bd6c534128ec18820ff0cbdd72b7fce9e9) + +1355. [func] tomek + Lightweight 4over6 options reinstantiated. Definitions for DHCPv6 + options 89 through 96 were added back. DHCPv4 v4 Parameters Option + 159 has its definition tweaked slightly. + (Trac #5514, git 6a4aac2b3bfffe41460db6d1cd3c55b1430aa50c) + +1354. [build] andrei + Support for coverage tests has been improved. + (Github #43, git 1949bb3abf71fb3997044d239eb683095166c39f) + +1353. [build,bug] andrei, razvan + Various small changes and bugfixes. Thank you to Andrei Pavel + and Razvan Becheriu for submitting their patch. + (Github #54, git 2efa7494228a1797dff8d9d74107a452c61e2386) + +1352. [func] fdupont + It is now possible to specify client classification restrictions + on per pool basis. This capability will be useful for grouping + certain types of devices into specific address and/or prefix + pools. + (Trac #5425, git 5f3a89d6e32e90cd9cbb2347c7b2208c3e1561e0) + +1351. [build] andreipavelQ + Compilation parameters unified (every file now includes config.h, + several makefile tweaks). + (Github #38, git 7206aa79c57be7466c4ab3dd558663c6c4f858b7) + +1350. [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) + +1349. [func] marcin + Implemented HTTP client classes in libkea-http. + (Trac #5451, git 94267e252b372650e4235389251b49d6f5501322) + +1348. [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) + +1347. [build] fdupont + Added support of boost 1.66.0 ASIO. + (Github #60/Trac #5496, git bc2947de4296bd99b74e50e65f272c7ad5312429) + +1346. [func] marcin + Implemented lease4-get-all command in lease_cmds hooks library. + (Trac #5468, git a378ec28489e98df64830d1f26c3bebd20e256b2) + +1345. [func] marcin + Implemented "force-create" parameter for lease4-update and + lease6-update commands. + (Trac #5472, git 369245e4c5308a701fd483123f2cb2fd7d3d0966) + +1344. [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 + Cassandra 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. diff --cc doc/guide/dhcp4-srv.xml index 395b74b5be,f959b594b0..b70ea6de01 --- a/doc/guide/dhcp4-srv.xml +++ b/doc/guide/dhcp4-srv.xml @@@ -2996,7 -2886,7 +2996,8 @@@ It is merely echoed by the serve DHCPv4-over-DHCPv6 support is experimental and the details of the inter-process communication can change: both the DHCPv4 and DHCPv6 sides should be running the same version -- of Kea. ++ of Kea. For instance the support of port relay (RFC 8357) introduced ++ such incompatible change. The dhcp4o6-port global parameter specifies diff --cc doc/guide/dhcp6-srv.xml index 9ca2dd62dc,dedd3a00ca..a6a584f3d2 --- a/doc/guide/dhcp6-srv.xml +++ b/doc/guide/dhcp6-srv.xml @@@ -2718,6 -2466,6 +2718,8 @@@ should include options from the isc opt DHCPv4-over-DHCPv6 support is experimental and the details of the inter-process communication can change: both the DHCPv4 and DHCPv6 sides should be running the same version of Kea. ++ For instance the support of port relay (RFC 8357) introduced such ++ such incompatible change. There is only one specific parameter for the DHCPv6 side: diff --cc src/bin/dhcp4/dhcp4_messages.mes index 8083a621d9,ddcb93bb13..2cf1a297ed --- a/src/bin/dhcp4/dhcp4_messages.mes +++ b/src/bin/dhcp4/dhcp4_messages.mes @@@ -203,15 -176,11 +203,15 @@@ a client's error or a server's purged d % DHCP4_DHCP4O6_BAD_PACKET received malformed DHCPv4o6 packet: %1 A malformed DHCPv4o6 packet was received. +% DHCP4_DHCP4O6_PACKET_RECEIVED received DHCPv4o6 packet from DHCPv4 server (type %1) for %2 on interface %3 +This debug message is printed when the server is receiving a DHCPv4o6 +from the DHCPv4 server over inter-process communication. + - % DHCP4_DHCP4O6_PACKET_SEND %1: trying to send packet %2 (type %3) to %4 on interface %5 encapsulating %6: %7 (type %8) + % DHCP4_DHCP4O6_PACKET_SEND %1: trying to send packet %2 (type %3) to %4 port %5 on interface %6 encapsulating %7: %8 (type %9) The arguments specify the client identification information (HW address and client identifier), DHCPv6 message name and type, source IPv6 - address and interface name, DHCPv4 client identification, message - name and type. + address and port, and interface name, DHCPv4 client identification, + message name and type. % DHCP4_DHCP4O6_PACKET_SEND_FAIL %1: failed to send DHCPv4o6 packet: %2 This error is output if the IPv4 DHCP server fails to send an @@@ -755,3 -692,7 +755,10 @@@ will drop its message if the received m and will send DHCPNAK if the received message was DHCPREQUEST. The argument includes the client and the transaction identification information. ++<<<<<<< HEAD ++======= + + % DHCP6_DHCP4O6_PACKET_RECEIVED received DHCPv4o6 packet from DHCPv6 server (type %1) for %2 port %3 on interface %4 + This debug message is printed when the server is receiving a DHCPv4o6 + from the DHCPv6 server over inter-process communication. ++>>>>>>> trac5404 diff --cc src/bin/dhcp4/dhcp4to6_ipc.cc index 72321b3619,f3cfb2bdf1..60948951e7 --- a/src/bin/dhcp4/dhcp4to6_ipc.cc +++ b/src/bin/dhcp4/dhcp4to6_ipc.cc @@@ -63,9 -63,10 +63,10 @@@ void Dhcp4to6Ipc::handler() // from Dhcpv4Srv::run_one() after receivePacket() if (pkt) { - LOG_DEBUG(packet4_logger, DBG_DHCP4_BASIC, DHCP6_DHCP4O6_PACKET_RECEIVED) + LOG_DEBUG(packet4_logger, DBG_DHCP4_BASIC, DHCP4_DHCP4O6_PACKET_RECEIVED) .arg(static_cast(pkt->getType())) .arg(pkt->getRemoteAddr().toText()) + .arg(pkt->getRemotePort()) .arg(pkt->getIface()); } } catch (const std::exception& e) {