diff options
author | Tomek Mrugalski <tomasz@isc.org> | 2017-04-03 13:33:34 +0200 |
---|---|---|
committer | Tomek Mrugalski <tomasz@isc.org> | 2017-04-03 13:33:34 +0200 |
commit | cf9be2f7fca8536ed5b2dc860d5ac8315e3e44f7 (patch) | |
tree | 15e05b7130b1c2b3268ef186de0be8ae5fe0817e /src/lib/dhcpsrv/cfg_hosts.cc | |
parent | [5132] spelling (diff) | |
download | kea-cf9be2f7fca8536ed5b2dc860d5ac8315e3e44f7.tar.xz kea-cf9be2f7fca8536ed5b2dc860d5ac8315e3e44f7.zip |
[5132] Changes after review (comment #9):
- new tests added
- needed => required
- spaced added where needed
- CfgHosts::toElement6 updated
-
Diffstat (limited to 'src/lib/dhcpsrv/cfg_hosts.cc')
-rw-r--r-- | src/lib/dhcpsrv/cfg_hosts.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/dhcpsrv/cfg_hosts.cc b/src/lib/dhcpsrv/cfg_hosts.cc index c16fb85633..935be7fbd9 100644 --- a/src/lib/dhcpsrv/cfg_hosts.cc +++ b/src/lib/dhcpsrv/cfg_hosts.cc @@ -775,6 +775,10 @@ CfgHosts::toElement6() const { isc_throw(ToElementError, "unexpected circuit-id DUID type"); } else if (id_type == Host::IDENT_CLIENT_ID) { isc_throw(ToElementError, "unexpected client-id DUID type"); + } else if (id_type == Host::IDENT_FLEX) { + const std::vector<uint8_t>& bin = (*host)->getIdentifier(); + std::string flex = util::encode::encodeHex(bin); + map->set("flex-id", Element::create(flex)); } else { isc_throw(ToElementError, "invalid DUID type: " << id_type); } |