diff --git a/src/lib/dhcp/dhcp4.h b/src/lib/dhcp/dhcp4.h index 982e987d3b..5bb5223915 100644 --- a/src/lib/dhcp/dhcp4.h +++ b/src/lib/dhcp/dhcp4.h @@ -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 */ diff --git a/src/lib/dhcp/std_option_defs.h b/src/lib/dhcp/std_option_defs.h index fdd6e6e2c1..55eedd63ca 100644 --- a/src/lib/dhcp/std_option_defs.h +++ b/src/lib/dhcp/std_option_defs.h @@ -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, diff --git a/src/lib/dhcp/tests/libdhcp++_unittest.cc b/src/lib/dhcp/tests/libdhcp++_unittest.cc index b525533496..ab8fa7e8bb 100644 --- a/src/lib/dhcp/tests/libdhcp++_unittest.cc +++ b/src/lib/dhcp/tests/libdhcp++_unittest.cc @@ -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));