]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3947] Removed spurious config parameter from the Subnet6.
authorMarcin Siodelski <marcin@isc.org>
Thu, 30 Jul 2015 13:38:26 +0000 (15:38 +0200)
committerMarcin Siodelski <marcin@isc.org>
Thu, 30 Jul 2015 13:38:26 +0000 (15:38 +0200)
src/lib/dhcpsrv/subnet.cc
src/lib/dhcpsrv/subnet.h
src/lib/dhcpsrv/tests/subnet_unittest.cc

index 3b13d7e03c399b72ffbb2192fc73e286de8a643e..f4d5c3ec9d6098703128d9a121334883c0c7c901 100644 (file)
@@ -330,8 +330,7 @@ Subnet6::Subnet6(const isc::asiolink::IOAddress& prefix, uint8_t length,
                  const Triplet<uint32_t>& valid_lifetime,
                  const SubnetID id)
     :Subnet(prefix, length, t1, t2, valid_lifetime, RelayInfo(IOAddress("::")), id),
-     preferred_(preferred_lifetime), rapid_commit_(false),
-     alloc_leases_on_renew_(true) {
+     preferred_(preferred_lifetime), rapid_commit_(false) {
     if (!prefix.isV6()) {
         isc_throw(BadValue, "Non IPv6 prefix " << prefix
                   << " specified in subnet6");
index 730ed7d0bd1e355ed8f4a64c9f6f1e779a377c36..55e4ddd716e005d6ceb95714f9894258660eb6b4 100644 (file)
@@ -655,21 +655,6 @@ public:
         return (rapid_commit_);
     }
 
-    /// @brief Enables or disables the allocation of the new leases for the
-    /// Renew and Rebind case.
-    ///
-    /// @param alloc_leases_on_renew A boolean value indicating if the server
-    /// can allocate new leases for the Renew and Rebind case.
-    void setAllocLeasesOnRenew(const bool alloc_leases_on_renew) {
-        alloc_leases_on_renew_ = alloc_leases_on_renew;
-    }
-
-    /// @brief Returns boolean value indicating if the new leases are allocated
-    /// by the server as a result of processing Renew and/or Rebind.
-    bool getAllocLeasesOnRenew() const {
-        return (alloc_leases_on_renew_);
-    }
-
 private:
 
     /// @brief Returns default address for pool selection
@@ -699,17 +684,6 @@ private:
     /// Commit is disabled for the subnet.
     bool rapid_commit_;
 
-    /// @brief A flag indicating if the server may allocate new leases
-    /// for the client sending a Renew or Rebind message.
-    ///
-    /// This flag indicates that the client may request allocation of the
-    /// new leases (of any type) when it renews existing leases. This
-    /// facilitates the use cases described in RFC7550. If the server is
-    /// configured to allocate new leases for the Renew and Rebind case
-    /// but it can't allocate them (e.g. because of the pool exhaustion)
-    /// it will send the NoAddrsAvail or the NoPrefixAvail status code
-    /// in the IA, depending on the IA type.
-    bool alloc_leases_on_renew_;
 };
 
 /// @brief A pointer to a Subnet6 object
index aa75f155aa7cb21fb75acf266c8415748f2a974a..8a5ad8af7211bed681f6410fda7dd04315dd4d8b 100644 (file)
@@ -1059,24 +1059,6 @@ TEST(Subnet6Test, rapidCommit) {
     EXPECT_FALSE(subnet.getRapidCommit());
 }
 
-// This test checks that the flag which indicates if the new leases are
-// allocated as a result of processing the Renew and Rebind message can
-// be set to "enable" or "disable".
-TEST(Subnet6Test, allocNewLeasesOnRenew) {
-    Subnet6 subnet(IOAddress("2001:db8:1::"), 56, 1, 2, 3, 4);
-
-    // By default, the flag should be enabled.
-    EXPECT_TRUE(subnet.getAllocLeasesOnRenew());
-
-    // Disable it.
-    subnet.setAllocLeasesOnRenew(false);
-    EXPECT_FALSE(subnet.getAllocLeasesOnRenew());
-
-    // Enable again.
-    subnet.setAllocLeasesOnRenew(true);
-    EXPECT_TRUE(subnet.getAllocLeasesOnRenew());
-}
-
 // Checks if last allocated address/prefix is stored/retrieved properly
 TEST(Subnet6Test, lastAllocated) {
     IOAddress ia("2001:db8:1::1");