From: Francis Dupont Date: Thu, 10 Jan 2019 14:31:21 +0000 (+0100) Subject: [365-automatically-calculate-the-values-for-options-58-and-59] Removed extra traling... X-Git-Tag: 313-return-a-list-of-all-reservations-by-subnet-id_base~1^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fc9105e2f56162ecfada5a47b9d4d75824f6905;p=thirdparty%2Fkea.git [365-automatically-calculate-the-values-for-options-58-and-59] Removed extra traling spaces --- diff --git a/src/bin/dhcp4/dhcp4_parser.yy b/src/bin/dhcp4/dhcp4_parser.yy index e8981924b1..a91c949fb1 100644 --- a/src/bin/dhcp4/dhcp4_parser.yy +++ b/src/bin/dhcp4/dhcp4_parser.yy @@ -468,9 +468,9 @@ global_param: valid_lifetime | config_control | server_tag | reservation_mode - | calculate_tee_times - | t1_percent - | t2_percent + | calculate_tee_times + | t1_percent + | t2_percent | unknown_map_entry ; @@ -1081,9 +1081,9 @@ subnet4_param: valid_lifetime | subnet_4o6_subnet | user_context | comment - | calculate_tee_times - | t1_percent - | t2_percent + | calculate_tee_times + | t1_percent + | t2_percent | unknown_map_entry ; @@ -1215,9 +1215,9 @@ shared_network_param: name | valid_lifetime | user_context | comment - | calculate_tee_times - | t1_percent - | t2_percent + | calculate_tee_times + | t1_percent + | t2_percent | unknown_map_entry ; diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index a33fccc19b..ab0525ae90 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -2226,15 +2226,15 @@ Dhcpv4Srv::assignLease(Dhcpv4Exchange& ex) { } } -void +void Dhcpv4Srv::setTeeTimes(const Lease4Ptr& lease, const Subnet4Ptr& subnet, Pkt4Ptr resp) { uint32_t t2_time = 0; // If T2 is explicitly configured we'll use try value. - if (!subnet->getT2().unspecified()) { - t2_time = subnet->getT2(); - } else if (subnet->getCalculateTeeTimes()) { - // Calculating tee times is enabled, so calculated it. + if (!subnet->getT2().unspecified()) { + t2_time = subnet->getT2(); + } else if (subnet->getCalculateTeeTimes()) { + // Calculating tee times is enabled, so calculated it. t2_time = static_cast(subnet->getT2Percent() * (lease->valid_lft_)); } @@ -2250,9 +2250,9 @@ Dhcpv4Srv::setTeeTimes(const Lease4Ptr& lease, const Subnet4Ptr& subnet, Pkt4Ptr uint32_t t1_time = 0; // If T1 is explicitly configured we'll use try value. - if (!subnet->getT1().unspecified()) { - t1_time = subnet->getT1(); - } else if (subnet->getCalculateTeeTimes()) { + if (!subnet->getT1().unspecified()) { + t1_time = subnet->getT1(); + } else if (subnet->getCalculateTeeTimes()) { // Calculating tee times is enabled, so calculate it. t1_time = static_cast(subnet->getT1Percent() * (lease->valid_lft_)); } diff --git a/src/bin/dhcp4/json_config_parser.cc b/src/bin/dhcp4/json_config_parser.cc index 56c1f04df9..4af7d4a336 100644 --- a/src/bin/dhcp4/json_config_parser.cc +++ b/src/bin/dhcp4/json_config_parser.cc @@ -547,8 +547,8 @@ configureDhcp4Server(Dhcpv4Srv& server, isc::data::ConstElementPtr config_set, (config_pair.first == "boot-file-name") || (config_pair.first == "server-tag") || (config_pair.first == "reservation-mode") || - (config_pair.first == "calculate-tee-times") || - (config_pair.first == "t1-percent") || + (config_pair.first == "calculate-tee-times") || + (config_pair.first == "t1-percent") || (config_pair.first == "t2-percent")) { continue; }