2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 05:55:28 +00:00

[898-add-a-new-hook-to-support-bootp] Checkpoint: reviewed change and addressed comment, to do import BOOTP class stuff from !522

This commit is contained in:
Francis Dupont
2019-11-21 10:59:59 +01:00
parent 4d1cfb15a0
commit 40686b4238
3 changed files with 3 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
.. _hooks-bootp:
.. _bootp-library:
BOOTP support
=============

View File

@@ -40,7 +40,6 @@ int buffer4_receive(CalloutHandle& handle) {
if (copy->getType() != DHCP_NOTYPE) {
// DHCP query.
query->addClass("DHCP");
return (0);
}
if (copy->getOp() == BOOTREPLY) {

View File

@@ -124,7 +124,7 @@ TEST_F(BootpTest, dhcpOffer) {
TEST_F(BootpTest, bootReply) {
// The constructor does not allow to directly create a BOOTREPLY packet.
Pkt4Ptr pkt(new Pkt4(DHCPOFFER, 12345));
//pkt->setType(DHCP_NOTYPE);
pkt->setType(DHCP_NOTYPE);
pkt->delOption(DHO_DHCP_MESSAGE_TYPE);
ASSERT_EQ(BOOTREPLY, pkt->getOp());
calloutsCall(pkt, false);
@@ -134,7 +134,7 @@ TEST_F(BootpTest, bootReply) {
TEST_F(BootpTest, bootRequest) {
// The constructor does not allow to directly create a BOOTREQUEST packet.
Pkt4Ptr pkt(new Pkt4(DHCPDISCOVER, 12345));
// pkt->setType(DHCP_NOTYPE);
pkt->setType(DHCP_NOTYPE);
pkt->delOption(DHO_DHCP_MESSAGE_TYPE);
ASSERT_EQ(BOOTREQUEST, pkt->getOp());
calloutsCall(pkt, true);