diff options
author | Tomek <tomasz@isc.org> | 2017-03-29 17:39:53 +0200 |
---|---|---|
committer | Tomek <tomasz@isc.org> | 2017-03-29 17:39:53 +0200 |
commit | b35c56666d143b1a6801b4244dbb9662a4b5c7cf (patch) | |
tree | 42e0565a422176c31783412ab4a50fe7a8433dbc /src/lib/dhcpsrv/cfg_hosts.cc | |
parent | [5132] host4_identifer hook implemented. (diff) | |
download | kea-b35c56666d143b1a6801b4244dbb9662a4b5c7cf.tar.xz kea-b35c56666d143b1a6801b4244dbb9662a4b5c7cf.zip |
[5132] parser updated, unit-tests implemented
Diffstat (limited to 'src/lib/dhcpsrv/cfg_hosts.cc')
-rw-r--r-- | src/lib/dhcpsrv/cfg_hosts.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/dhcpsrv/cfg_hosts.cc b/src/lib/dhcpsrv/cfg_hosts.cc index a5b1933b00..c16fb85633 100644 --- a/src/lib/dhcpsrv/cfg_hosts.cc +++ b/src/lib/dhcpsrv/cfg_hosts.cc @@ -713,8 +713,12 @@ CfgHosts::toElement4() const { const std::vector<uint8_t>& bin = (*host)->getIdentifier(); std::string client_id = util::encode::encodeHex(bin); map->set("client-id", Element::create(client_id)); + } 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); + isc_throw(ToElementError, "invalid identifier type: " << id_type); } // Set the reservation const IOAddress& address = (*host)->getIPv4Reservation(); |