From: Francis Dupont Date: Tue, 4 Oct 2022 14:39:44 +0000 (+0200) Subject: [#2584] Removed v4 code X-Git-Tag: Kea-2.3.2~80 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=911c48b7e64d2eccf1c41da4724c293b76be10b9;p=thirdparty%2Fkea.git [#2584] Removed v4 code --- diff --git a/src/lib/dhcpsrv/lease.cc b/src/lib/dhcpsrv/lease.cc index fd77922e76..d14c53b273 100644 --- a/src/lib/dhcpsrv/lease.cc +++ b/src/lib/dhcpsrv/lease.cc @@ -333,7 +333,7 @@ Lease4::Lease4(const isc::asiolink::IOAddress& address, : Lease(address, valid_lifetime, subnet_id, cltt, fqdn_fwd, fqdn_rev, hostname, hw_address), - client_id_(client_id), remote_id_(), relay_id_() { + client_id_(client_id) { } std::string diff --git a/src/lib/dhcpsrv/lease.h b/src/lib/dhcpsrv/lease.h index a0b3010b97..0c2c791903 100644 --- a/src/lib/dhcpsrv/lease.h +++ b/src/lib/dhcpsrv/lease.h @@ -492,12 +492,6 @@ struct Lease4 : public Lease { static Lease4Ptr fromElement(const data::ConstElementPtr& element); /// @todo: Add DHCPv4 failover related fields here - - /// @brief Remote identifier for Bulk Lease Query - std::vector remote_id_; - - /// @brief Relay identifier for Bulk Lease Query - std::vector relay_id_; }; /// @brief A collection of IPv4 leases. diff --git a/src/lib/dhcpsrv/memfile_lease_storage.h b/src/lib/dhcpsrv/memfile_lease_storage.h index 8aa5f1e783..6828018424 100644 --- a/src/lib/dhcpsrv/memfile_lease_storage.h +++ b/src/lib/dhcpsrv/memfile_lease_storage.h @@ -48,12 +48,6 @@ struct DuidIndexTag { }; /// @brief Tag for index using hostname. struct HostnameIndexTag { }; -/// @brief Tag for index using remote-id. -struct RemoteIdIndexTag { }; - -/// @brief Tag for index using relay-id. -struct RelayIdIndexTag { }; - /// @name Multi index containers holding DHCPv4 and DHCPv6 leases. /// //@{ @@ -65,8 +59,6 @@ struct RelayIdIndexTag { }; /// - using a composite index: DUID, IAID and lease type. /// - using a composite index: boolean flag indicating if the state is /// "expired-reclaimed" and expiration time. -/// - using subnet ID. -/// - using hostname. /// /// Indexes can be accessed using the index number (from 0 to 5) or a /// name tag. It is recommended to use the tags to access indexes as @@ -148,15 +140,11 @@ typedef boost::multi_index_container< /// @brief A multi index container holding DHCPv4 leases. /// /// The leases in the container may be accessed using different indexes: -/// - IPv4 address, -/// - composite index: hardware address and subnet id, +/// - IPv6 address, +/// - composite index: HW address and subnet id, /// - composite index: client id and subnet id, /// - using a composite index: boolean flag indicating if the state is /// "expired-reclaimed" and expiration time. -/// - using subnet id. -/// - using hostname. -/// - using remote id. -/// - using a composite index: /// /// Indexes can be accessed using the index number (from 0 to 5) or a /// name tag. It is recommended to use the tags to access indexes as @@ -238,39 +226,11 @@ typedef boost::multi_index_container< boost::multi_index::member >, - // Specification of the sixth index starts here. + // Specification of the seventh index starts here // This index is used to retrieve leases for matching hostname. boost::multi_index::ordered_non_unique< boost::multi_index::tag, boost::multi_index::member - >, - - // Specification of the seventh index starts here. - // This index is used to retrieve leases for matching remote id - // for Bulk Lease Query. - boost::multi_index::hashed_non_unique< - boost::multi_index::tag, - boost::multi_index::member, - &Lease4::remote_id_> - >, - - // Specification of the eighth index starts here. - // This index is used to retrieve leases for matching relay id - // for Bulk Lease Query. - boost::multi_index::ordered_non_unique< - boost::multi_index::tag, - boost::multi_index::composite_key< - Lease4, - // Relay id. - boost::multi_index::member, - &Lease4::relay_id_>, - // Address. - boost::multi_index::member - > > > > Lease4Storage; // Specify the type name for this container. @@ -319,12 +279,6 @@ typedef Lease4Storage::index::type Lease4StorageSubnetIdIndex; /// @brief DHCPv4 lease storage index by hostname. typedef Lease4Storage::index::type Lease4StorageHostnameIndex; -/// @brief DHCPv4 lease storage index by remote identifier. -typedef Lease4Storage::index::type Lease4StorageRemoteIdIndex; - -/// @brief DHCPv4 lease storage index by relay identifier. -typedef Lease4Storage::index::type Lease4StorageRelayIdIndex; - //@} /// @name Multi index containers holding DHCPv6 lease extended informations