summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcpsrv/cfg_hosts.cc
diff options
context:
space:
mode:
authorTomek Mrugalski <tomasz@isc.org>2017-04-11 18:51:31 +0200
committerTomek Mrugalski <tomasz@isc.org>2017-04-11 18:51:31 +0200
commit501190d8845f85d5ed28f5e9c44818dcd5f0d0bf (patch)
tree77f82791e972276c4a3af8af4c2f9c329721d46d /src/lib/dhcpsrv/cfg_hosts.cc
parent[5207] extra checks added in add4(), add6() (diff)
downloadkea-501190d8845f85d5ed28f5e9c44818dcd5f0d0bf.tar.xz
kea-501190d8845f85d5ed28f5e9c44818dcd5f0d0bf.zip
[5207] Reverted part of earlier comments, add4/add6 description updated
Diffstat (limited to 'src/lib/dhcpsrv/cfg_hosts.cc')
-rw-r--r--src/lib/dhcpsrv/cfg_hosts.cc16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/lib/dhcpsrv/cfg_hosts.cc b/src/lib/dhcpsrv/cfg_hosts.cc
index 7b5efd900f..4453c92d58 100644
--- a/src/lib/dhcpsrv/cfg_hosts.cc
+++ b/src/lib/dhcpsrv/cfg_hosts.cc
@@ -602,11 +602,6 @@ CfgHosts::add4(const HostPtr& host) {
"options");
}
- if (host->getIPv4SubnetID() == 0) {
- // This is IPv6-only host. No need to add it to v4 tables.
- return;
- }
-
// Check for duplicates for the specified IPv4 subnet.
if ((host->getIPv4SubnetID() > 0) &&
get4(host->getIPv4SubnetID(), hwaddr, duid)) {
@@ -668,17 +663,6 @@ CfgHosts::add6(const HostPtr& host) {
// Get all reservations for this host.
IPv6ResrvRange reservations = host->getIPv6Reservations();
- // Check if the (identifier type, identifier) tuple is already used.
- const std::vector<uint8_t>& id = host->getIdentifier();
- if ((host->getIPv6SubnetID() > 0) && !id.empty()) {
- if (get6(host->getIPv6SubnetID(), host->getIdentifierType(), &id[0],
- id.size())) {
- isc_throw(DuplicateHost, "failed to add duplicate IPv6 host using identifier: "
- << Host::getIdentifierAsText(host->getIdentifierType(),
- &id[0], id.size()));
- }
- }
-
// Check if there are any IPv6 reservations.
if (std::distance(reservations.first, reservations.second) == 0) {
// If there aren't, we don't need to add this to hosts6_, which is used