2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 05:27:55 +00:00

[#1684] v4-captive-portal code changed from 114 to 160

This commit is contained in:
Tomek Mrugalski 2022-01-12 15:03:22 +01:00
parent a0d68148ce
commit ccc9a027d2
3 changed files with 10 additions and 10 deletions

View File

@ -173,7 +173,10 @@ enum DHCPOptionType {
// 109-111 are removed/unassigned
DHO_NETINFO_ADDR = 112, /* RFC3679 */
DHO_NETINFO_TAG = 113, /* RFC3679 */
DHO_URL = 114, /* RFC3679 */
// URL option was replaced with captive portal.
// DHO_URL = 114, /* RFC3679 */
DHO_V4_CAPTIVE_PORTAL = 114, /* RFC8910 */
// 115 is removed/unassigned
DHO_AUTO_CONFIG = 116, /* RFC2563 */
DHO_NAME_SERVICE_SEARCH = 117, /* RFC2937 */
@ -209,7 +212,6 @@ enum DHCPOptionType {
// DHO_DATA_SOURCE = 157,
// DHO_V4_PCP_SERVER = 158,
DHO_V4_PORTPARAMS = 159,
DHO_V4_CAPTIVE_PORTAL = 160,
// 161-209 are removed/unassigned
// DHO_PATH_PREFIX = 210, /* RFC5071 */
// DHO_REBOOT_TIME = 211, /* RFC5071 */

View File

@ -309,8 +309,8 @@ const OptionDefParams STANDARD_V4_OPTION_DEFINITIONS[] = {
OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
{ "netinfo-server-tag", DHO_NETINFO_TAG, DHCP4_OPTION_SPACE,
OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
{ "default-url", DHO_URL, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false,
NO_RECORD_DEF, "" },
{ "v4-captive-portal", DHO_V4_CAPTIVE_PORTAL, DHCP4_OPTION_SPACE,
OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
{ "auto-config", DHO_AUTO_CONFIG, DHCP4_OPTION_SPACE, OPT_UINT8_TYPE,
false, NO_RECORD_DEF, "" },
{ "name-service-search", DHO_NAME_SERVICE_SEARCH, DHCP4_OPTION_SPACE,
@ -347,8 +347,6 @@ const OptionDefParams STANDARD_V4_OPTION_DEFINITIONS[] = {
true, RECORD_DEF(V4_RDNSS_SELECT_RECORDS), "" },
{ "v4-portparams", DHO_V4_PORTPARAMS, DHCP4_OPTION_SPACE, OPT_RECORD_TYPE,
false, RECORD_DEF(V4_PORTPARAMS_RECORDS), "" },
{ "v4-captive-portal", DHO_V4_CAPTIVE_PORTAL, DHCP4_OPTION_SPACE,
OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
{ "option-6rd", DHO_6RD, DHCP4_OPTION_SPACE, OPT_RECORD_TYPE, true,
RECORD_DEF(OPT_6RD_RECORDS), "" },
{ "v4-access-domain", DHO_V4_ACCESS_DOMAIN, DHCP4_OPTION_SPACE,

View File

@ -1659,7 +1659,10 @@ TEST_F(LibDhcpTest, stdOptionDefs4) {
LibDhcpTest::testStdOptionDefs4(DHO_NETINFO_TAG, begin, end,
typeid(OptionString));
LibDhcpTest::testStdOptionDefs4(DHO_URL, begin, end,
/* Option 114 URL (RFC 3679) was retired and replaced with CAPTIVE_PORTAL (RFC8910)
which was previously 160, but was reassigned (compare RFC7710 and RFC8910) */
LibDhcpTest::testStdOptionDefs4(DHO_V4_CAPTIVE_PORTAL, begin, end,
typeid(OptionString));
LibDhcpTest::testStdOptionDefs4(DHO_DOMAIN_SEARCH, fqdn_buf.begin(),
@ -1727,9 +1730,6 @@ TEST_F(LibDhcpTest, stdOptionDefs4) {
LibDhcpTest::testStdOptionDefs4(DHO_V4_PORTPARAMS, begin, begin + 4,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_V4_CAPTIVE_PORTAL, begin, end,
typeid(OptionString));
LibDhcpTest::testStdOptionDefs4(DHO_6RD, begin, begin + 22,
typeid(OptionCustom));