l = checkLease(ack, clientid, req->getHWAddr(), addr);
ASSERT_TRUE(l);
- // Check that T1, T2, preferred, valid and cltt were really updated
- EXPECT_EQ(l->t1_, subnet_->getT1());
- EXPECT_EQ(l->t2_, subnet_->getT2());
+ // Check that valid and cltt were really updated
EXPECT_EQ(l->valid_lft_, subnet_->getValid());
// Checking for CLTT is a bit tricky if we want to avoid off by 1 errors
l = checkLease(ack, clientid, req->getHWAddr(), addr);
ASSERT_TRUE(l);
- // Check that T1, T2, preferred, valid and cltt were really updated
- EXPECT_EQ(l->t1_, subnet_->getT1());
- EXPECT_EQ(l->t2_, subnet_->getT2());
+ // Check that valid and cltt were really updated
EXPECT_EQ(l->valid_lft_, hint);
// Checking for CLTT is a bit tricky if we want to avoid off by 1 errors
l = checkLease(ack, clientid, req->getHWAddr(), addr);
ASSERT_TRUE(l);
- // Check that T1, T2, preferred, valid and cltt were really updated
- EXPECT_EQ(l->t1_, subnet_->getT1());
- EXPECT_EQ(l->t2_, subnet_->getT2());
+ // Check that valid and cltt were really updated
EXPECT_EQ(l->valid_lft_, subnet_->getValid().getMin());
// Checking for CLTT is a bit tricky if we want to avoid off by 1 errors
l = checkLease(ack, clientid, req->getHWAddr(), addr);
ASSERT_TRUE(l);
- // Check that T1, T2, preferred, valid and cltt were really updated
- EXPECT_EQ(l->t1_, subnet_->getT1());
- EXPECT_EQ(l->t2_, subnet_->getT2());
+ // Check that valid and cltt were really updated
EXPECT_EQ(l->valid_lft_, subnet_->getValid().getMax());
// Checking for CLTT is a bit tricky if we want to avoid off by 1 errors
DuidPtr other_duid = DuidPtr(new DUID(vector<uint8_t>(12, 0xff)));
const uint32_t other_iaid = 3568;
Lease6Ptr lease(new Lease6(Lease::TYPE_NA, addr, other_duid, other_iaid,
- 501, 502, 503, 504, subnet_->getID(),
+ 501, 502, subnet_->getID(),
HWAddrPtr(), 0));
lease->cltt_ = time(NULL) - 500; // Allocated 500 seconds ago
lease->valid_lft_ = 495; // Lease was valid for 495 seconds
DuidPtr other_duid = DuidPtr(new DUID(vector<uint8_t>(12, 0xff)));
const uint32_t other_iaid = 3568;
Lease6Ptr lease(new Lease6(Lease::TYPE_NA, addr, other_duid, other_iaid,
- 501, 502, 503, 504, subnet_->getID(),
+ 501, 502, subnet_->getID(),
HWAddrPtr(), 0));
lease->cltt_ = time(NULL) - 500; // Allocated 500 seconds ago
lease->valid_lft_ = 495; // Lease was valid for 495 seconds
DuidPtr other_duid = DuidPtr(new DUID(vector<uint8_t>(12, 0xff)));
const uint32_t other_iaid = 3568;
Lease6Ptr lease(new Lease6(Lease::TYPE_NA, addr, other_duid, other_iaid,
- 501, 502, 503, 504, subnet_->getID(),
+ 501, 502, subnet_->getID(),
HWAddrPtr(), 0));
lease->cltt_ = time(NULL) - 500; // Allocated 500 seconds ago
lease->valid_lft_ = 495; // Lease was valid for 495 seconds
DuidPtr other_duid = DuidPtr(new DUID(vector<uint8_t>(12, 0xff)));
const uint32_t other_iaid = 3568;
Lease6Ptr lease(new Lease6(Lease::TYPE_NA, addr, other_duid, other_iaid,
- 501, 502, 503, 504, subnet_->getID(),
+ 501, 502, subnet_->getID(),
HWAddrPtr(), 0));
lease->cltt_ = time(NULL) - 500; // Allocated 500 seconds ago
lease->valid_lft_ = 495; // Lease was valid for 495 seconds
TEST_F(AllocEngine6Test, defaultRenewLeaseLifetime) {
// Create a lease for the client.
Lease6Ptr lease(new Lease6(Lease::TYPE_NA, IOAddress("2001:db8:1::15"),
- duid_, iaid_, 300, 400, 100, 200,
+ duid_, iaid_, 300, 400,
subnet_->getID(), HWAddrPtr(), 128));
// Allocated 200 seconds ago - half of the lifetime.
TEST_F(AllocEngine6Test, hintRenewLeaseLifetime) {
// Create a lease for the client.
Lease6Ptr lease(new Lease6(Lease::TYPE_NA, IOAddress("2001:db8:1::15"),
- duid_, iaid_, 300, 400, 100, 200,
+ duid_, iaid_, 300, 400,
subnet_->getID(), HWAddrPtr(), 128));
// Allocated 200 seconds ago - half of the lifetime.
TEST_F(AllocEngine6Test, minRenewLeaseLifetime) {
// Create a lease for the client.
Lease6Ptr lease(new Lease6(Lease::TYPE_NA, IOAddress("2001:db8:1::15"),
- duid_, iaid_, 300, 400, 100, 200,
+ duid_, iaid_, 300, 400,
subnet_->getID(), HWAddrPtr(), 128));
// Allocated 200 seconds ago - half of the lifetime.
TEST_F(AllocEngine6Test, maxRenewLeaseLifetime) {
// Create a lease for the client.
Lease6Ptr lease(new Lease6(Lease::TYPE_NA, IOAddress("2001:db8:1::15"),
- duid_, iaid_, 300, 400, 100, 200,
+ duid_, iaid_, 300, 400,
subnet_->getID(), HWAddrPtr(), 128));
// Allocated 200 seconds ago - half of the lifetime.