diff --git a/src/lib/dhcp/pkt4.cc b/src/lib/dhcp/pkt4.cc index cae19d0754..e1e6673499 100644 --- a/src/lib/dhcp/pkt4.cc +++ b/src/lib/dhcp/pkt4.cc @@ -143,7 +143,7 @@ Pkt4::pack() { // write DHCP magic cookie buffer_out_.writeUint32(DHCP_OPTIONS_COOKIE); - LibDHCP::packOptions(buffer_out_, options_); + LibDHCP::packOptions4(buffer_out_, options_); // add END option that indicates end of options // (End option is very simple, just a 255 octet) diff --git a/src/lib/dhcp/pkt6.cc b/src/lib/dhcp/pkt6.cc index 33b4633722..6f95ef930a 100644 --- a/src/lib/dhcp/pkt6.cc +++ b/src/lib/dhcp/pkt6.cc @@ -244,7 +244,7 @@ Pkt6::packUDP() { buffer_out_.writeUint8( (transid_) & 0xff ); // the rest are options - LibDHCP::packOptions(buffer_out_, options_); + LibDHCP::packOptions6(buffer_out_, options_); } catch (const Exception& e) { // An exception is thrown and message will be written to Logger diff --git a/src/lib/dhcp/tests/libdhcp++_unittest.cc b/src/lib/dhcp/tests/libdhcp++_unittest.cc index 66bac96e4e..8b11343f86 100644 --- a/src/lib/dhcp/tests/libdhcp++_unittest.cc +++ b/src/lib/dhcp/tests/libdhcp++_unittest.cc @@ -396,7 +396,7 @@ TEST_F(LibDhcpTest, packOptions6) { OutputBuffer assembled(512); - EXPECT_NO_THROW(LibDHCP::packOptions(assembled, opts)); + EXPECT_NO_THROW(LibDHCP::packOptions6(assembled, opts)); EXPECT_EQ(sizeof(v6packed), assembled.getLength()); EXPECT_EQ(0, memcmp(assembled.getData(), v6packed, sizeof(v6packed))); } @@ -591,7 +591,7 @@ TEST_F(LibDhcpTest, packOptions4) { opts.insert(make_pair(opt1->getType(), rai)); OutputBuffer buf(100); - EXPECT_NO_THROW(LibDHCP::packOptions(buf, opts)); + EXPECT_NO_THROW(LibDHCP::packOptions4(buf, opts)); ASSERT_EQ(buf.getLength(), sizeof(v4_opts)); EXPECT_EQ(0, memcmp(v4_opts, buf.getData(), sizeof(v4_opts))); }