// Address might have been rejected via class guard (i.e. not
// allowed for this client). We need to determine if we truly
// do not know about the address or whether this client just
- // isn't allowed to have that address. We should only NAK
+ // isn't allowed to have that address. We should only DHCPNAK
// For the latter.
while (s) {
if (s->inPool(Lease::TYPE_V4, hint)) {
}
// If we didn't find a subnet, it's not an address we know about
- // so we drop the NAK.
+ // so we drop the DHCPNAK.
if (!s) {
LOG_DEBUG(bad_packet4_logger, DBG_DHCP4_DETAIL,
DHCP4_UNKNOWN_ADDRESS_REQUESTED)
} else if (!query->getCiaddr().isV4Zero()) {
response->setRemoteAddr(query->getCiaddr());
- // We can't unicast the response to the client when sending NAK,
+ // We can't unicast the response to the client when sending DHCPNAK,
// because we haven't allocated address for him. Therefore,
- // NAK is broadcast.
+ // DHCPNAK is broadcast.
} else if (response->getType() == DHCPNAK) {
response->setRemoteAddr(IOAddress::IPV4_BCAST_ADDRESS());
ASSERT_NO_THROW(client.doRequest());
// The reservation has been removed. Since address that the client is
- // using doesn't belong a dynamic pool and the server is not
+ // using doesn't belong to a dynamic pool and the server is not
// authoritative it should not send a DHCPNAK.
resp = client.getContext().response_;
- ASSERT_FALSE(client.getContext().response_);
+ ASSERT_FALSE(resp);
// A conforming client would go back to the server discovery.
client.setState(Dhcp4Client::SELECTING);
resetCalloutBuffers();
- // Now request an address that can't be allocated. The client should receive
- // the DHCPNAK.
+ // Now request an address that can't be allocated.
client.ciaddr_ = IOAddress("10.0.0.1");
ASSERT_NO_THROW(client.doRequest());
- // Make sure that we did not receive a response. If we're
- // not authoritative, there should not be a NAK.
+ // Make sure that we did not receive a response. Since we're
+ // not authoritative, there should not be a DHCPNAK.
ASSERT_FALSE(client.getContext().response_);
// Check that no callback was not called.
Lease4Ptr
AllocEngine::discoverLease4(AllocEngine::ClientContext4& ctx) {
- // Find an existing lease for this client. This function will return true
+ // Find an existing lease for this client. This function will return null
// if there is a conflict with existing lease and the allocation should
// not be continued.
Lease4Ptr client_lease;
Lease4Ptr
AllocEngine::requestLease4(AllocEngine::ClientContext4& ctx) {
- // Find an existing lease for this client. This function will return true
+ // Find an existing lease for this client. This function will return null
// if there is a conflict with existing lease and the allocation should
// not be continued.
Lease4Ptr client_lease;