// The server sends Reply message in response to Confirm.
Pkt6Ptr reply(new Pkt6(DHCPV6_REPLY, confirm->getTransid()));
- // Append necessary options. e.g. server id.
+ // Make sure that the necessary options are included.
+ copyDefaultOptions(confirm, reply);
appendDefaultOptions(confirm, reply);
// Number of addresses verified. If at the end it occurs that no addresses
// were verified we will need to dicard the message.
// indicate the success.
ASSERT_TRUE(client.receivedStatusCode());
ASSERT_EQ(STATUS_Success, client.getStatusCode());
- // Make sure that the server id has been included.
+ // Make sure that the server id and client id have been included.
EXPECT_TRUE(client.getContext().response_->getOption(D6O_SERVERID));
-
+ EXPECT_TRUE(client.getContext().response_->getOption(D6O_CLIENTID));
ASSERT_EQ(2, client.getLeaseNum());
lease_client2 = client.getLease(1);
ASSERT_NO_THROW(client.doConfirm());
ASSERT_TRUE(client.receivedStatusCode());
ASSERT_EQ(STATUS_NotOnLink, client.getStatusCode());
- // Make sure that the server id has been included.
+ // Make sure that the server id have been included.
EXPECT_TRUE(client.getContext().response_->getOption(D6O_SERVERID));
+ EXPECT_TRUE(client.getContext().response_->getOption(D6O_CLIENTID));
}
ASSERT_NO_THROW(client.doConfirm());
ASSERT_TRUE(client.receivedStatusCode());
ASSERT_EQ(STATUS_NotOnLink, client.getStatusCode());
- // Make sure that the server id has been included.
+ // Make sure that the server id and client id have been included.
EXPECT_TRUE(client.getContext().response_->getOption(D6O_SERVERID));
+ EXPECT_TRUE(client.getContext().response_->getOption(D6O_CLIENTID));
}
// Test that the Confirm message without any addresses is discarded.
// indicate the success.
ASSERT_TRUE(client.receivedStatusCode());
ASSERT_EQ(STATUS_Success, client.getStatusCode());
- // Make sure that the server id has been included.
+ // Make sure that the server id and client id have been included.
EXPECT_TRUE(client.getContext().response_->getOption(D6O_SERVERID));
+ EXPECT_TRUE(client.getContext().response_->getOption(D6O_CLIENTID));
}
// This test checks that the Confirm message is discarded by the server if it