Commit 377e3644 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[5016] Prefix Exclude option is now defined as IPv6 prefix.

parent 00b90ea2
......@@ -10,10 +10,11 @@
#include <dhcp/option4_addrlst.h>
#include <dhcp/option4_client_fqdn.h>
#include <dhcp/option6_addrlst.h>
#include <dhcp/option6_client_fqdn.h>
#include <dhcp/option6_ia.h>
#include <dhcp/option6_iaaddr.h>
#include <dhcp/option6_iaprefix.h>
#include <dhcp/option6_client_fqdn.h>
#include <dhcp/option6_pdexclude.h>
#include <dhcp/option6_status_code.h>
#include <dhcp/option_custom.h>
#include <dhcp/option_definition.h>
......@@ -778,6 +779,9 @@ OptionDefinition::factorySpecialFormatOption(Option::Universe u,
} else if (getCode() == D6O_BOOTFILE_PARAM && haveOpaqueDataTuplesFormat()) {
// Bootfile params (option code 60)
return (OptionPtr(new OptionOpaqueDataTuples(Option::V6, getCode(), begin, end)));
} else if ((getCode() == D6O_PD_EXCLUDE) && haveType(OPT_IPV6_PREFIX_TYPE)) {
// Prefix Exclude (option code 67)
return (OptionPtr(new Option6PDExclude(begin, end)));
}
} else {
if ((getCode() == DHO_FQDN) && haveFqdn4Format()) {
......
......@@ -361,7 +361,7 @@ const OptionDefParams STANDARD_V6_OPTION_DEFINITIONS[] = {
{ "erp-local-domain-name", D6O_ERP_LOCAL_DOMAIN_NAME, OPT_FQDN_TYPE, false,
NO_RECORD_DEF, "" },
{ "rsoo", D6O_RSOO, OPT_EMPTY_TYPE, false, NO_RECORD_DEF, "rsoo-opts" },
{ "pd-exclude", D6O_PD_EXCLUDE, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
{ "pd-exclude", D6O_PD_EXCLUDE, OPT_IPV6_PREFIX_TYPE, false, NO_RECORD_DEF, "" },
{ "client-linklayer-addr", D6O_CLIENT_LINKLAYER_ADDR, OPT_BINARY_TYPE, false,
NO_RECORD_DEF, "" },
{ "dhcpv4-message", D6O_DHCPV4_MSG, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
......
......@@ -18,6 +18,7 @@
#include <dhcp/option6_ia.h>
#include <dhcp/option6_iaaddr.h>
#include <dhcp/option6_iaprefix.h>
#include <dhcp/option6_pdexclude.h>
#include <dhcp/option6_status_code.h>
#include <dhcp/option_custom.h>
#include <dhcp/option_int.h>
......@@ -1562,6 +1563,9 @@ TEST_F(LibDhcpTest, stdOptionDefs6) {
typeid(OptionCustom),
"rsoo-opts");
LibDhcpTest::testStdOptionDefs6(D6O_PD_EXCLUDE, begin, end,
typeid(Option6PDExclude));
LibDhcpTest::testStdOptionDefs6(D6O_ERP_LOCAL_DOMAIN_NAME,
fqdn_buf.begin(), fqdn_buf.end(),
typeid(OptionCustom));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment