]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5536] Added DHCPv6 RADIUS option 72-radius-option-definitions
authorFrancis Dupont <fdupont@isc.org>
Thu, 10 May 2018 14:24:47 +0000 (16:24 +0200)
committerFrancis Dupont <fdupont@isc.org>
Sun, 30 Sep 2018 19:35:08 +0000 (15:35 -0400)
src/lib/dhcp/dhcp6.h
src/lib/dhcp/std_option_defs.h
src/lib/dhcp/tests/libdhcp++_unittest.cc

index dc343686c030dafa4ac92f5b74792387d13b07fb..c6b8d9d7e2b2dd25d64dd9cb7ef056eca255da15 100644 (file)
@@ -98,7 +98,7 @@ enum DHCPv6OptionType {
 // D6O_KRB_KDC                             = 78, /* RFC6784 */
    D6O_CLIENT_LINKLAYER_ADDR               = 79, /* RFC6939 */
    D6O_LINK_ADDRESS                        = 80, /* RFC6977 */
-// D6O_RADIUS                              = 81, /* RFC7037 */
+   D6O_RADIUS                              = 81, /* RFC7037 */
    D6O_SOL_MAX_RT                          = 82, /* RFC7083 */
    D6O_INF_MAX_RT                          = 83, /* RFC7083 */
 // D6O_ADDRSEL                             = 84, /* RFC7078 */
index 4e9d82923be95a10e56ba09078b0ab751c9eeec7..e84585edea9077f1c77a4c3e6658c9705ef5946e 100644 (file)
@@ -437,6 +437,8 @@ const OptionDefParams STANDARD_V6_OPTION_DEFINITIONS[] = {
       NO_RECORD_DEF, "" },
     { "link-address", D6O_LINK_ADDRESS, OPT_IPV6_ADDRESS_TYPE, false,
       NO_RECORD_DEF, "" },
+    // @todo: find a way to parse content as RADIUS attributes.
+    { "radius", D6O_RADIUS, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
     { "solmax-rt", D6O_SOL_MAX_RT, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
     { "inf-max-rt", D6O_INF_MAX_RT, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
     { "dhcpv4-message", D6O_DHCPV4_MSG, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
index 89d5e65092dded620bdbe9c7120c18b3c92a7d83..f2bf01654df3f4f436c9cb36b1c92ca15e13c523 100644 (file)
@@ -1721,6 +1721,11 @@ TEST_F(LibDhcpTest, stdOptionDefs6) {
     LibDhcpTest::testStdOptionDefs6(D6O_LINK_ADDRESS, begin, begin + 16,
                                     typeid(OptionCustom));
 
+    // @todo: Put real RADIUS options in content when we'll be able to
+    // parse it...
+    LibDhcpTest::testStdOptionDefs6(D6O_RADIUS, begin, end,
+                                    typeid(Option));
+
     LibDhcpTest::testStdOptionDefs6(D6O_SOL_MAX_RT, begin, begin + 4,
                                     typeid(OptionInt<uint32_t>));