@@ -255,8 +255,8 @@ class FqdnDhcpv6SrvTest : public Dhcpv6SrvTest {
255
255
// /
256
256
// / @param iaid IAID
257
257
// / @param pkt A DHCPv6 message to which the IA option should be added.
258
- // / @param cxt allocation engine context to which IA option should be
259
- // / added.
258
+ // / @param cxt allocation engine context to which IA option should be
259
+ // / added.
260
260
void addIA (const uint32_t iaid, const IOAddress& addr, Pkt6Ptr& pkt,
261
261
AllocEngine::ClientContext6& ctx) {
262
262
Option6IAPtr opt_ia = generateIA (D6O_IA_NA, iaid, 1500 , 3000 );
@@ -275,8 +275,8 @@ class FqdnDhcpv6SrvTest : public Dhcpv6SrvTest {
275
275
// / @param iaid IAID
276
276
// / @param status_code Status code
277
277
// / @param pkt A DHCPv6 message to which the option should be added.
278
- // / @param cxt allocation engine context to which IA option should be
279
- // / added.
278
+ // / @param cxt allocation engine context to which IA option should be
279
+ // / added.
280
280
void addIA (const uint32_t iaid, const uint16_t status_code, Pkt6Ptr& pkt,
281
281
AllocEngine::ClientContext6& ctx) {
282
282
Option6IAPtr opt_ia = generateIA (D6O_IA_NA, iaid, 1500 , 3000 );
@@ -696,7 +696,7 @@ class FqdnDhcpv6SrvTest : public Dhcpv6SrvTest {
696
696
ASSERT_TRUE (pool);
697
697
}
698
698
699
- // / @brief Verifies that DDNS TTL parameters are used when specified.
699
+ // / @brief Verifies that DDNS TTL parameters are used when specified.
700
700
// /
701
701
// / @param valid_flt lease life time
702
702
// / @param ddns_ttl_percent expected configured value for ddns-ttl-percent
@@ -725,7 +725,7 @@ class FqdnDhcpv6SrvTest : public Dhcpv6SrvTest {
725
725
726
726
// Create an IA.
727
727
Option6IAPtr opt_ia = generateIA (D6O_IA_NA, 1234 , 1500 , 3000 );
728
- Option6IAAddrPtr opt_iaaddr (new Option6IAAddr (D6O_IAADDR,
728
+ Option6IAAddrPtr opt_iaaddr (new Option6IAAddr (D6O_IAADDR,
729
729
IOAddress (" 2001:db8:1::1" ),
730
730
valid_lft, valid_lft));
731
731
opt_ia->addOption (opt_iaaddr);
@@ -2239,15 +2239,15 @@ TEST_F(FqdnDhcpv6SrvTest, ddnsTtlTest) {
2239
2239
testDdnsTtlParameters (2100 , // valid lft
2240
2240
Optional<double >(), // percent
2241
2241
999 , // ttl
2242
- Optional<uint32_t >(), // min
2242
+ Optional<uint32_t >(), // min
2243
2243
Optional<uint32_t >()); // max
2244
2244
}
2245
2245
2246
2246
// Verify the ddns-ttl-min is used when specified.
2247
2247
TEST_F (FqdnDhcpv6SrvTest, ddnsTtlMinTest) {
2248
2248
testDdnsTtlParameters (2100 , // valid lft
2249
2249
Optional<double >(), // percent
2250
- Optional<uint32_t >(), // ttl
2250
+ Optional<uint32_t >(), // ttl
2251
2251
800 , // ttl-min
2252
2252
Optional<uint32_t >()); // ttl-max
2253
2253
}
@@ -2256,19 +2256,19 @@ TEST_F(FqdnDhcpv6SrvTest, ddnsTtlMinTest) {
2256
2256
TEST_F (FqdnDhcpv6SrvTest, ddnsTtlMaxTest) {
2257
2257
testDdnsTtlParameters (2100 , // valid lft
2258
2258
Optional<double >(), // percent
2259
- Optional<uint32_t >(), // ttl
2259
+ Optional<uint32_t >(), // ttl
2260
2260
Optional<uint32_t >(), // ttl-min
2261
- 500 ); // ttl-max
2261
+ 500 ); // ttl-max
2262
2262
}
2263
2263
2264
- // Verify pool-level DDNS pararmeters are used.
2264
+ // Verify pool-level DDNS parameters are used.
2265
2265
// We don't verify all of them, just enough
2266
2266
// enough to ensure proper scoping of values.
2267
2267
TEST_F (FqdnDhcpv6SrvTest, poolDdnsParametersTest) {
2268
2268
2269
2269
// A configuration with following pools:
2270
2270
// 1. Specifies a qualifying suffix
2271
- // 2. Specifes no DDNS parameters
2271
+ // 2. Specifies no DDNS parameters
2272
2272
// 3. Disables DDNS updates
2273
2273
// 4. Specifies a qualifying suffix but disables DDNS updates
2274
2274
std::string config = R"(
@@ -2358,18 +2358,23 @@ TEST_F(FqdnDhcpv6SrvTest, poolDdnsParametersTest) {
2358
2358
query->setIndex (ETH0_INDEX);
2359
2359
2360
2360
// Add the client id.
2361
- OptionPtr client_id (new Option (Option::V6, D6O_CLIENTID, scenario.raw_duid_ ));
2361
+ OptionPtr client_id (new Option (Option::V6, D6O_CLIENTID,
2362
+ scenario.raw_duid_ ));
2362
2363
query->addOption (client_id);
2363
2364
query->addOption (srv_->getServerID ());
2364
2365
2365
2366
// Add an IA requesting the expected address.
2366
2367
Option6IAPtr ia = generateIA (D6O_IA_NA, 234 , 1500 , 3000 );
2367
- OptionPtr hint_opt (new Option6IAAddr (D6O_IAADDR, scenario.expected_address_ , 300 , 500 ));
2368
+ OptionPtr hint_opt (new Option6IAAddr (D6O_IAADDR,
2369
+ scenario.expected_address_ ,
2370
+ 300 , 500 ));
2368
2371
ia->addOption (hint_opt);
2369
2372
query->addOption (ia);
2370
2373
2371
- // Add an FQDN option. We set it to partial to ensure we qualify it with a suffix.
2372
- query->addOption (createClientFqdn (Option6ClientFqdn::FLAG_S, scenario.client_fqdn_ ,
2374
+ // Add an FQDN option. We set it to partial to ensure we qualify
2375
+ // it with a suffix.
2376
+ query->addOption (createClientFqdn (Option6ClientFqdn::FLAG_S,
2377
+ scenario.client_fqdn_ ,
2373
2378
Option6ClientFqdn::PARTIAL));
2374
2379
2375
2380
// Process the REQUEST.
@@ -2392,16 +2397,18 @@ TEST_F(FqdnDhcpv6SrvTest, poolDdnsParametersTest) {
2392
2397
2393
2398
// Check that we got the address we requested.
2394
2399
tmp = ia->getOption (D6O_IAADDR);
2395
- boost::shared_ptr<Option6IAAddr> addr = boost::dynamic_pointer_cast<Option6IAAddr>(tmp);
2400
+ boost::shared_ptr<Option6IAAddr> addr
2401
+ = boost::dynamic_pointer_cast<Option6IAAddr>(tmp);
2396
2402
ASSERT_TRUE (addr);
2397
2403
EXPECT_EQ (addr->getAddress (), scenario.expected_address_ );
2398
2404
2399
2405
// Check that the lease exists with the correct FDQN.
2400
- Lease6Ptr lease = LeaseMgrFactory::instance ().getLease6 (Lease::TYPE_NA, addr->getAddress ());
2406
+ Lease6Ptr lease = LeaseMgrFactory::instance ().getLease6 (Lease::TYPE_NA,
2407
+ addr->getAddress ());
2401
2408
ASSERT_TRUE (lease);
2402
2409
EXPECT_EQ (lease->hostname_ , scenario.expected_fqdn_ );
2403
2410
2404
- // Verfiy the FQDN in the response is correct.
2411
+ // Verify the FQDN in the response is correct.
2405
2412
Option6ClientFqdnPtr fqdn;
2406
2413
ASSERT_TRUE (fqdn = boost::dynamic_pointer_cast<
2407
2414
Option6ClientFqdn>(reply->getOption (D6O_CLIENT_FQDN)));
@@ -2415,7 +2422,7 @@ TEST_F(FqdnDhcpv6SrvTest, poolDdnsParametersTest) {
2415
2422
verifyNameChangeRequest (isc::dhcp_ddns::CHG_ADD, true , true ,
2416
2423
scenario.expected_address_ .toText (),
2417
2424
scenario.expected_dhcid_ ,
2418
- 0 , 4000 ,
2425
+ 0 , 4000 ,
2419
2426
scenario.expected_fqdn_ );
2420
2427
}
2421
2428
}
0 commit comments