diff options
author | Marcin Siodelski <marcin@isc.org> | 2016-03-15 11:01:09 +0100 |
---|---|---|
committer | Marcin Siodelski <marcin@isc.org> | 2016-03-15 11:01:09 +0100 |
commit | f3e4bc82282abdf4b091af11c3c8f3e370f8ef1e (patch) | |
tree | 47123e7d29b23016237cec562bf67c1a6901f86c /src/lib/dhcpsrv/cfg_hosts.cc | |
parent | [master] Added ChangeLog entry for #3571. (diff) | |
download | kea-f3e4bc82282abdf4b091af11c3c8f3e370f8ef1e.tar.xz kea-f3e4bc82282abdf4b091af11c3c8f3e370f8ef1e.zip |
[4319] Extend host reservation parser to parse options.
Diffstat (limited to 'src/lib/dhcpsrv/cfg_hosts.cc')
-rw-r--r-- | src/lib/dhcpsrv/cfg_hosts.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/dhcpsrv/cfg_hosts.cc b/src/lib/dhcpsrv/cfg_hosts.cc index 877c182f60..cfb2bedbcb 100644 --- a/src/lib/dhcpsrv/cfg_hosts.cc +++ b/src/lib/dhcpsrv/cfg_hosts.cc @@ -454,7 +454,9 @@ CfgHosts::add4(const HostPtr& host) { // address, IPv6 address or prefix. if (host->getHostname().empty() && (host->getIPv4Reservation().isV4Zero()) && - (!host->hasIPv6Reservation())) { + (!host->hasIPv6Reservation()) && + host->getCfgOption4()->empty() && + host->getCfgOption6()->empty()) { std::ostringstream s; if (hwaddr) { s << "for DUID: " << hwaddr->toText(); @@ -463,7 +465,8 @@ CfgHosts::add4(const HostPtr& host) { } isc_throw(BadValue, "specified reservation " << s.str() << " must include at least one resource, i.e. " - "hostname, IPv4 address or IPv6 address/prefix"); + "hostname, IPv4 address, IPv6 address/prefix, " + "options"); } // Check for duplicates for the specified IPv4 subnet. |