// the server has no more addresses to assign.
Dhcp4Client client3(client1.getServer(), Dhcp4Client::SELECTING);
client3.setIfaceName("eth1");
- testAssigned([this, &client3]() {
+ testAssigned([&client3]() {
ASSERT_NO_THROW(client3.doDiscover());
Pkt4Ptr resp3 = client3.getContext().response_;
ASSERT_FALSE(resp3);
// Asking for an address that is not in address pool should result in getting
// an address from one of the subnets, but generally hard to tell from which one.
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doDiscover(boost::shared_ptr<IOAddress>(new IOAddress("10.0.0.23"))));
});
// Release the lease that the client has got, because we'll need this address
// further in the test.
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doRelease());
});
configure(NETWORKS_CONFIG[10], *client.getServer());
// Perform 4-way exchange.
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doDORA());
});
Pkt4Ptr resp = client.getContext().response_;
configure(NETWORKS_CONFIG[8], *client1.getServer());
// Perform 4-way exchange.
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doDORA());
});
Pkt4Ptr resp1 = client1.getContext().response_;
client2.setIfaceName("eth0");
// Perform 4-way exchange.
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doDORA());
});
Pkt4Ptr resp2 = client2.getContext().response_;
configure(NETWORKS_CONFIG[9], *client1.getServer());
// Perform 4-way exchange.
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doDORA());
});
Pkt4Ptr resp1 = client1.getContext().response_;
client2.useRelay(true, IOAddress("192.1.2.3"));
// Perform 4-way exchange.
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doDORA());
});
Pkt4Ptr resp2 = client2.getContext().response_;
configure(NETWORKS_CONFIG[11], *client.getServer());
// Perform 4-way exchange.
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doDORA());
});
Pkt4Ptr resp1 = client.getContext().response_;
client.setState(Dhcp4Client::RENEWING);
// Try to renew the lease with modified MAC address.
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doRequest());
});
Pkt4Ptr resp2 = client.getContext().response_;
configure(NETWORKS_CONFIG[13], *client1.getServer());
// Simply send DHCPDISCOVER to avoid allocating a lease.
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doDiscover());
});
Pkt4Ptr resp1 = client1.getContext().response_;
// Configure DHCP server.
ASSERT_NO_THROW(configure(NETWORKS_CONFIG[15], *client1.getServer()));
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doDORA());
});
Dhcp4Client client2(client1.getServer(), Dhcp4Client::SELECTING);
client2.setIfaceName("eth0");
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doDORA());
});
// Release the lease that the client has got, because we'll need this address
// further in the test.
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doRelease());
});
// Release the lease that the client has got, because we'll need this address
// further in the test.
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doRelease());
});
IOAddress requested_address = exp_addr1.empty() ? IOAddress::IPV6_ZERO_ADDRESS() :
IOAddress(exp_addr1);
ASSERT_NO_THROW(client1.requestAddress(0xabca0, requested_address));
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doSolicit());
});
// first subnet is already full (it's a really small subnet) and the second
// subnet does not allow rapid-commit.
ASSERT_NO_THROW(client2.requestAddress(0xabca0));
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doSolicit());
});
// Client #1 requests an address in first subnet within a shared network.
ASSERT_NO_THROW(client1.requestAddress(0xabca0, IOAddress("2001:db8:1::20")));
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client1, IOAddress("2001:db8:1::20")));
Dhcp6Client client2(client1.getServer());
client2.setInterface("eth1");
ASSERT_NO_THROW(client2.requestAddress(0xabca0));
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client2, IOAddress("2001:db8:2::20")));
Dhcp6Client client3(client1.getServer());
client3.setInterface("eth1");
ASSERT_NO_THROW(client3.requestAddress(0xabca0));
- testAssigned([this, &client3] {
+ testAssigned([&client3] {
ASSERT_NO_THROW(client3.doSolicit(true));
});
EXPECT_EQ(0, client3.getLeaseNum());
// Client #3 should be assigned an address if subnet 3 is selected for it.
client3.setInterface("eth0");
- testAssigned([this, &client3] {
+ testAssigned([&client3] {
ASSERT_NO_THROW(client3.doSolicit(true));
});
EXPECT_EQ(1, client3.getLeaseNum());
// Client #1 should be able to renew its lease.
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doRenew());
});
EXPECT_EQ(1, client1.getLeaseNum());
EXPECT_TRUE(hasLeaseForAddress(client1, IOAddress("2001:db8:1::20")));
// Client #2 should be able to renew its lease too.
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doRenew());
});
EXPECT_EQ(1, client2.getLeaseNum());
// Client #1 should be assigned an address from shared network.
ASSERT_NO_THROW(client1.requestAddress(0xabca0));
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client1, IOAddress("2001:db8:1::20")));
Dhcp6Client client2(client1.getServer());
client2.useRelay(true, IOAddress("3001::2"));
ASSERT_NO_THROW(client2.requestAddress(0xabca0));
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client2, IOAddress("2001:db8:2::20")));
// Provide a hint to an existing address within first subnet. This address
// should be offered out of this subnet.
ASSERT_NO_THROW(client.requestAddress(0xabca, IOAddress("2001:db8:1::20")));
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doSolicit(true));
});
ASSERT_TRUE(hasLeaseForAddress(client, IOAddress("2001:db8:1::20"),
// the same shared network when we ask for it.
client.clearRequestedIAs();
ASSERT_NO_THROW(client.requestAddress(0xabca, IOAddress("2001:db8:2::20")));
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doSolicit(true));
});
ASSERT_TRUE(hasLeaseForAddress(client, IOAddress("2001:db8:2::20"),
// an address from one of the subnets, but generally hard to tell from which one.
client.clearRequestedIAs();
ASSERT_NO_THROW(client.requestAddress(0xabca, IOAddress("3002::123")));
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doSolicit(true));
});
std::vector<Lease6> leases = client.getLeasesByType(Lease::TYPE_NA);
// Client #1 requests an address in the restricted subnet but can't be assigned
// this address because the client doesn't belong to a certain class.
ASSERT_NO_THROW(client1.requestAddress(0xabca, IOAddress("2001:db8:1::20")));
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client1, IOAddress("2001:db8:2::20")));
// Release the lease that the client has got, because we'll need this address
// further in the test.
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doRelease());
});
client1.addExtraOption(option1234);
// This time, the allocation of the address provided as hint should be successful.
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client1, IOAddress("2001:db8:1::20")));
Dhcp6Client client2(client1.getServer());
client2.setInterface("eth1");
ASSERT_NO_THROW(client2.requestAddress(0xabca0));
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client2, IOAddress("2001:db8:2::20")));
// subnet to which client2 now belongs.
ASSERT_NO_FATAL_FAILURE(configure(NETWORKS_CONFIG[3], *client1.getServer()));
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doRenew());
});
EXPECT_EQ(0, client2.getLeaseNum());
// get renewed.
OptionPtr option1234_bis(new OptionUint16(Option::V6, 1234, 0x0002));
client2.addExtraOption(option1234_bis);
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doRenew());
});
EXPECT_EQ(1, client2.getLeaseNum());
// Client #1 should get his reserved address from the second subnet.
ASSERT_NO_THROW(client1.requestAddress(0xabca, IOAddress("2001:db8:1::20")));
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client1, IOAddress("2001:db8:2::28")));
// Client #2 should get its reserved address from the first subnet.
ASSERT_NO_THROW(client2.requestAddress(0xabca, IOAddress("2001:db8:1::30")));
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client2, IOAddress("2001:db8:1::28")));
// because its lease is now reserved for some other client. The client won't be
// assigned a lease for which it has a reservation because another client holds
// this lease.
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doRenew());
});
ASSERT_TRUE(client1.hasLeaseWithZeroLifetimeForAddress(IOAddress("2001:db8:2::28")));
}
// Client #2 is now renewing its lease and should get its newly reserved address.
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doRenew());
});
ASSERT_TRUE(client2.hasLeaseWithZeroLifetimeForAddress(IOAddress("2001:db8:1::28")));
ASSERT_TRUE(hasLeaseForAddress(client2, IOAddress("2001:db8:2::28")));
// Same for client #1.
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doRenew());
});
ASSERT_TRUE(hasLeaseForAddress(client1, IOAddress("2001:db8:1::28")));
// Assigned address should be allocated from the second subnet, because the
// client doesn't belong to the "a-devices" class.
ASSERT_NO_THROW(client.requestAddress(0xabca));
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client, IOAddress("2001:db8:2::16")));
client.addExtraOption(option1234);
// The client should now be assigned the reserved address from the first subnet.
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doRenew());
});
ASSERT_TRUE(client.hasLeaseWithZeroLifetimeForAddress(IOAddress("2001:db8:2::16")));
// Client requests an address from the second subnet which should be successful.
ASSERT_NO_THROW(client.requestAddress(0xabca, IOAddress("2001:db8:2::20")));
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client, IOAddress("2001:db8:2::20")));
// The client should not be able to renew the existing lease because it is now
// prohibited by the classification. Instead, the client should get a lease from the
// unrestricted subnet.
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doRenew());
});
ASSERT_TRUE(client.hasLeaseWithZeroLifetimeForAddress(IOAddress("2001:db8:2::20")));
// Perform 4-way exchange and make sure we have been assigned address from the
// subnet we wanted.
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client1, IOAddress("2001:db8:1::20")));
// Perform 4-way exchange and make sure we have been assigned address from the
// subnet we wanted.
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client2, IOAddress("2001:db8:2::20")));
// Perform 4-way exchange and make sure we have been assigned address from the
// subnet we wanted.
- testAssigned([this, &client3] {
+ testAssigned([&client3] {
ASSERT_NO_THROW(client3.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client3, IOAddress("3000::1")));
// Send solicit without a hint. The client should be offerred an address from the
// shared network. Depending on the subnet from which the address has been allocated
// a specific value of the Name Servers option should be returned.
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doSolicit(true));
});
client.clearRequestedIAs();
client.requestAddress(0xabca, IOAddress("2001:db8:2::20"));
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doSolicit(true));
});
ASSERT_TRUE(client.hasOptionWithAddress(D6O_NAME_SERVERS, "5555::33"));
// This time, let's do the 4-way exchange.
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doSARR());
});
ASSERT_TRUE(client.hasOptionWithAddress(D6O_NAME_SERVERS, "5555::33"));
// And renew the lease.
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doRenew());
});
ASSERT_TRUE(client.hasLeaseForAddress(IOAddress("2001:db8:2::20")));
// Client #1 should be assigned an address from one of the two subnets
// belonging to the first shared network.
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doSARR());
});
if (!hasLeaseForAddress(client1, IOAddress("2001:db8:1::20")) &&
// Client #2 should be assigned an address from one of the two subnets
// belonging to the second shared network.
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doSARR());
});
if (!hasLeaseForAddress(client2, IOAddress("2001:db8:3::20")) &&
// Client #1 should be assigned an address from one of the two subnets
// belonging to the first shared network.
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doSARR());
});
if (!hasLeaseForAddress(client1, IOAddress("2001:db8:1::20")) &&
// Client #2 should be assigned an address from one of the two subnets
// belonging to the second shared network
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doSARR());
});
if (!hasLeaseForAddress(client2, IOAddress("2001:db8:3::20")) &&
ASSERT_NO_FATAL_FAILURE(configure(NETWORKS_CONFIG[10], *client.getServer()));
// Perform 4-way exchange.
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doSARR());
});
ASSERT_NO_FATAL_FAILURE(configure(NETWORKS_CONFIG[11], *client1.getServer()));
// The client 1 should be offerred an address from the second subnet.
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doSolicit(true));
});
ASSERT_TRUE(hasLeaseForAddress(client1, IOAddress("2001:db8:2::20"),
client2.addExtraOption(option1234);
// Client 2 should be offerred an address from the first subnet.
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doSolicit(true));
});
ASSERT_TRUE(hasLeaseForAddress(client2, IOAddress("2001:db8:1::20"),
ASSERT_NO_FATAL_FAILURE(configure(NETWORKS_CONFIG[0], *client.getServer()));
// 4-way exchange.
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doSARR());
});
// The two addresses should come from different subnets.
ASSERT_TRUE(hasLeaseForPrefixPool(client, IOAddress("5000::"), 96, 96));
// Try to renew.
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doRenew());
});
ASSERT_TRUE(hasLeaseForAddress(client, IOAddress("2001:db8:1::20")));
ASSERT_NO_FATAL_FAILURE(configure(NETWORKS_CONFIG[4], *client.getServer()));
// 4-way exchange.
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doSARR());
});
ASSERT_EQ(4, client.getLeaseNum());
ASSERT_NE("1234::", leases_2222[0].addr_.toText());
// Try to renew and check this again.
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doRenew());
});
ASSERT_EQ(4, client.getLeaseNum());
ASSERT_NO_FATAL_FAILURE(configure(NETWORKS_CONFIG[13], *client.getServer()));
// 4-way exchange.
- testAssigned([this, &client] {
+ testAssigned([&client] {
ASSERT_NO_THROW(client.doSARR());
});
ASSERT_EQ(2, client.getLeaseNum());
// Client #1 should be assigned an address from shared network.
ASSERT_NO_THROW(client1.requestAddress(0xabca0));
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client1, IOAddress("2001:db8:1::20")));
client2.useRelay(true, IOAddress("3001::2"));
client2.useInterfaceId("vlan1000");
ASSERT_NO_THROW(client2.requestAddress(0xabca0));
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client2, IOAddress("2001:db8:2::20")));
// Client #1 should be assigned an address from shared network.
ASSERT_NO_THROW(client1.requestAddress(0xabca0));
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client1, IOAddress("2001:db8:1::20")));
client2.useRelay(true, IOAddress("3001::2"));
client2.useInterfaceId("vlan1000");
ASSERT_NO_THROW(client2.requestAddress(0xabca0));
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client2, IOAddress("2001:db8:2::20")));
// Client #1 requests an address in the restricted pool but can't be assigned
// this address because the client doesn't belong to a certain class.
ASSERT_NO_THROW(client1.requestAddress(0xabca, IOAddress("2001:db8:1::20")));
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client1, IOAddress("2001:db8:1::50")));
// Release the lease that the client has got, because we'll need this address
// further in the test.
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doRelease());
});
client1.addExtraOption(option1234);
// This time, the allocation of the address provided as hint should be successful.
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client1, IOAddress("2001:db8:1::20")));
Dhcp6Client client2(client1.getServer());
client2.setInterface("eth1");
ASSERT_NO_THROW(client2.requestAddress(0xabca0));
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client2, IOAddress("2001:db8:1::50")));
// pool to which client2 now belongs.
ASSERT_NO_FATAL_FAILURE(configure(NETWORKS_CONFIG[20], *client1.getServer()));
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doRenew());
});
EXPECT_EQ(0, client2.getLeasesWithNonZeroLifetime().size());
// get renewed.
OptionPtr option1234_bis(new OptionUint16(Option::V6, 1234, 0x0002));
client2.addExtraOption(option1234_bis);
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doRenew());
});
EXPECT_EQ(1, client2.getLeaseNum());
// Client #1 requests an address in the restricted pool but can't be assigned
// this address because the client doesn't belong to a certain class.
ASSERT_NO_THROW(client1.requestAddress(0xabca, IOAddress("2001:db8:1::20")));
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client1, IOAddress("2001:db8:1::50")));
// Release the lease that the client has got, because we'll need this address
// further in the test.
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doRelease());
});
client1.addExtraOption(option1234);
// This time, the allocation of the address provided as hint should be successful.
- testAssigned([this, &client1] {
+ testAssigned([&client1] {
ASSERT_NO_THROW(client1.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client1, IOAddress("2001:db8:1::20")));
Dhcp6Client client2(client1.getServer());
client2.setInterface("eth1");
ASSERT_NO_THROW(client2.requestAddress(0xabca0));
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doSARR());
});
ASSERT_TRUE(hasLeaseForAddress(client2, IOAddress("2001:db8:1::50")));
// pool to which client2 now belongs.
ASSERT_NO_FATAL_FAILURE(configure(NETWORKS_CONFIG[22], *client1.getServer()));
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doRenew());
});
EXPECT_EQ(0, client2.getLeasesWithNonZeroLifetime().size());
// get renewed.
OptionPtr option1234_bis(new OptionUint16(Option::V6, 1234, 0x0002));
client2.addExtraOption(option1234_bis);
- testAssigned([this, &client2] {
+ testAssigned([&client2] {
ASSERT_NO_THROW(client2.doRenew());
});
EXPECT_EQ(1, client2.getLeaseNum());