]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2543] Implement changes for code review
authorDan Theisen <djt@isc.org>
Tue, 11 Oct 2022 02:49:47 +0000 (19:49 -0700)
committerDan Theisen <djt@isc.org>
Tue, 11 Oct 2022 08:03:46 +0000 (01:03 -0700)
doc/examples/kea4/all-keys-netconf.json
doc/examples/kea4/all-keys.json
doc/sphinx/arm/dhcp4-srv.rst
src/lib/dhcpsrv/cfg_subnets4.cc
src/lib/dhcpsrv/srv_config.h

index 64241eaa96f1abcfd98ba62f9edb8af60affab84..baa1594c22d4ff7663ff7b799c65a9a4ecdf9679 100644 (file)
         "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.
index 225afcf06e8f286fe2db2e2ed1d6897bb862dec0..ae578b079a720fd87b35e5397f47a44fe464c3bb 100644 (file)
             // 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
         },
 
index 6eb0c82d2161b4361dbf606cfd376a55b7b5b310..3b267bed06e680731d651bd342373dccaece3261 100644 (file)
@@ -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
 
index 782986aee6732a37fecfd245c7ff17321e4963d9..9cc80d2581e50eb6887d18c9349e53684d1eb7db 100644 (file)
@@ -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);
index e0b323f8ec6700025e8f668ab39bd42772db1b15..75c5f7e05e8cdc5c8e6893341bfe357e3348e024 100644 (file)
@@ -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