summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcpsrv/cfg_hosts.cc
diff options
context:
space:
mode:
authorTomek <tomasz@isc.org>2017-03-29 17:39:53 +0200
committerTomek <tomasz@isc.org>2017-03-29 17:39:53 +0200
commitb35c56666d143b1a6801b4244dbb9662a4b5c7cf (patch)
tree42e0565a422176c31783412ab4a50fe7a8433dbc /src/lib/dhcpsrv/cfg_hosts.cc
parent[5132] host4_identifer hook implemented. (diff)
downloadkea-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.cc6
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();