mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-01 14:35:29 +00:00
[#2543] Implement changes for code review
This commit is contained in:
@@ -105,11 +105,7 @@
|
||||
"compatibility": {
|
||||
// Parse options more leniently where fields can be deduced
|
||||
// deterministically even if against RFC or common practice.
|
||||
"lenient-option-parsing": true,
|
||||
// Ignore Relay Agent Information Link Selection suboption if set
|
||||
// to true. This will use normal subnet selection logic instead of
|
||||
// attempting to use the subnet specified by the suboption.
|
||||
"ignore-rai-link-selection": false
|
||||
"lenient-option-parsing": true
|
||||
},
|
||||
|
||||
// Command control socket configuration parameters for Kea DHCPv4 server.
|
||||
|
@@ -107,8 +107,10 @@
|
||||
// deterministically even if against RFC or common practice.
|
||||
"lenient-option-parsing": true,
|
||||
// Ignore Relay Agent Information Link Selection suboption if set
|
||||
// to true. This will use normal subnet selection logic instead of
|
||||
// attempting to use the subnet specified by the suboption.
|
||||
// to true. Enabling this will cause Kea use normal subnet
|
||||
// selection logic instead of attempting to use the subnet
|
||||
// specified in the suboption. This config option defaults to
|
||||
// false, as enabling it breaks RFC compliance.
|
||||
"ignore-rai-link-selection": false
|
||||
},
|
||||
|
||||
|
@@ -7196,7 +7196,11 @@ Ignore RAI Link Selection
|
||||
With ``"ignore-rai-link-selection": true``, Relay Agent Information Link
|
||||
Selection suboption data will not be used for subnet selection. This will use
|
||||
normal subnet selection logic instead of attempting to use the subnet specified
|
||||
by the suboption.
|
||||
by the suboption. This option is not RFC compliant and is set to ``false`` by
|
||||
default. Setting this option to ``true`` can help with subnet selection in
|
||||
certain scenarios, for example, when your DHCP Relay Servers do not allow you
|
||||
to specify which suboptions are included in the Relay Agent Information
|
||||
option, and includes incorrect Link Selection information.
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
|
@@ -225,9 +225,11 @@ CfgSubnets4::initSelector(const Pkt4Ptr& query) {
|
||||
OptionCustomPtr rai_custom =
|
||||
boost::dynamic_pointer_cast<OptionCustom>(rai);
|
||||
if (rai_custom) {
|
||||
// If Relay Agent Information Link Selection is ignored in the configuration, skip
|
||||
// returning the related subnet selector here, and move on to normal subnet selection.
|
||||
bool ignore_link_sel = CfgMgr::instance().getCurrentCfg()->getIgnoreRAILinkSelection();
|
||||
// If Relay Agent Information Link Selection is ignored in the
|
||||
// configuration, skip returning the related subnet selector here,
|
||||
// and move on to normal subnet selection.
|
||||
bool ignore_link_sel = CfgMgr::instance().getCurrentCfg()->
|
||||
getIgnoreRAILinkSelection();
|
||||
if (!ignore_link_sel) {
|
||||
OptionPtr link_select =
|
||||
rai_custom->getOption(RAI_OPTION_LINK_SELECTION);
|
||||
|
@@ -1160,11 +1160,14 @@ private:
|
||||
/// @brief Pointer to the configuration consistency settings
|
||||
CfgConsistencyPtr cfg_consist_;
|
||||
|
||||
/// @brief Compatibility flags
|
||||
/// @{
|
||||
/// @name Compatibility flags
|
||||
///
|
||||
//@{
|
||||
/// @brief Indicates whether lenient option parsing is enabled
|
||||
bool lenient_option_parsing_;
|
||||
/// @brief Indicates whether RAI link-selection suboptions will be ignored
|
||||
bool ignore_rai_link_selection_;
|
||||
/// @}
|
||||
//@}
|
||||
|
||||
/// @brief Flag which indicates if the server should do host reservations
|
||||
/// lookup before lease lookup. This parameter has effect only when
|
||||
|
Reference in New Issue
Block a user