From: Andrei Pavel Date: Fri, 14 May 2021 14:14:05 +0000 (+0300) Subject: [#1860] document lenient option parsing X-Git-Tag: Kea-1.9.8~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5329d68c4cbfb586603157b3755fab2faee80752;p=thirdparty%2Fkea.git [#1860] document lenient option parsing --- diff --git a/doc/examples/kea4/all-keys.json b/doc/examples/kea4/all-keys.json index e841456cd3..864c1eba19 100644 --- a/doc/examples/kea4/all-keys.json +++ b/doc/examples/kea4/all-keys.json @@ -100,6 +100,14 @@ } ], + // Parameters for triggering behaviors compatible with broken or + // non-compliant clients, relays or other agents + "compatibility": { + // Parse options more leniently where fields can be deduced + // deterministically even if against RFC or common practice. + "lenient-option-parsing": true + }, + // Command control socket configuration parameters for Kea DHCPv4 server. "control-socket": { // Location of the unix domain socket file the DHCPv4 server uses diff --git a/doc/examples/kea6/all-keys.json b/doc/examples/kea6/all-keys.json index bde412bcb4..694942af62 100644 --- a/doc/examples/kea6/all-keys.json +++ b/doc/examples/kea6/all-keys.json @@ -51,6 +51,14 @@ } ], + // Parameters for triggering behaviors compatible with broken or + // non-compliant clients, relays or other agents + "compatibility": { + // Parse options more leniently where fields can be deduced + // deterministically even if against RFC or common practice. + "lenient-option-parsing": true + }, + // Command control socket configuration parameters for Kea DHCPv6 server. "control-socket": { // Location of the unix domain socket file the DHCPv6 server uses diff --git a/doc/sphinx/arm/dhcp6-srv.rst b/doc/sphinx/arm/dhcp6-srv.rst index cffc968f3a..7520d3f76b 100644 --- a/doc/sphinx/arm/dhcp6-srv.rst +++ b/doc/sphinx/arm/dhcp6-srv.rst @@ -6943,3 +6943,24 @@ Configuration Backend for the DHCPv6 server: The configuration structure is almost identical to that of the DHCPv4 server (see :ref:`dhcp4-cb-json` for the detailed description). + +.. _dhcp6-compatibility: + +Kea DHCPv6 Compatibility Configuration Parameters +================================================= + +Kea is friendly towards broken or non-compliant clients. In that purpose, flags +have to be enabled in order to keep Kea's default behavior of conforming to RFCs +or to common practices. + +Lenient Option Parsing +---------------------- + +By default, DHCPv6 option 16's vendor-class-data field is parsed as a set of +length-value pairs. + +With ``lenient-option-parsing: "true"``, if a length ever exceeds the rest of +the option's buffer, Kea no longer complains with the log message ``unable to +parse the opaque data tuple, the buffer length is x, but the tuple length is y`` +with ``x < y``. Instead, the value is considered to be the rest of the buffer, +or in terms of the log message above, the tuple length ``y`` becomes ``x``.