From: Tomek Mrugalski Date: Thu, 11 Oct 2012 12:59:58 +0000 (+0200) Subject: [master] Merge branch 'trac2237' (Subnet/pool storage for DHCPv4) X-Git-Tag: trac2402_base~17^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ad6e5687c4835d70422ee09d1bfdb032979060a;p=thirdparty%2Fkea.git [master] Merge branch 'trac2237' (Subnet/pool storage for DHCPv4) Conflicts: ChangeLog src/lib/dhcp/cfgmgr.h src/lib/dhcp/tests/cfgmgr_unittest.cc --- 7ad6e5687c4835d70422ee09d1bfdb032979060a diff --cc ChangeLog index 16fb41e2e1,c0763551f3..b421f01e88 --- a/ChangeLog +++ b/ChangeLog @@@ -1,58 -1,8 +1,65 @@@ -4XX. [func] tomek ++492. [func] tomek + libdhcpsrv: The DHCP Configuration Manager is now able to store + information about IPv4 subnets and pools. It is still not possible - to configure that information. This will be implemented in a near - future. ++ to configure that information. Such capability will be implemented ++ in a near future. ++ (Trac #2237, git a78e560343b41f0f692c7903c938b2b2b24bf56b) ++ +491. [func] tomek + b10-dhcp6: Configuration for DHCPv6 has been implemented. + Currently it is possible to configure IPv6 subnets and pools + within those subnets, global and per subnet values of renew, + rebind, preferred and valid lifetimes. Configured parameters + are accepted, but are not used yet by the allocation engine yet. + (Trac #2269, git 028bed9014b15facf1a29d3d4a822c9d14fc6411) + +490. [func] tomek - libdhcp++: An abstract API for lease database has been ++ libdhcpsrv: An abstract API for lease database has been + implemented. It offers a common interface to all concrete + database backends. + (Trac #2140, git df196f7609757253c4f2f918cd91012bb3af1163) + +489. [func] muks + The isc::dns::RRsetList class has been removed. It was now unused + inside the BIND 10 codebase, and the interface was considered + prone to misuse. + (Trac #2266, git 532ac3d0054f6a11b91ee369964f3a84dabc6040) + +488. [build] jinmei + On configure, changed the search order for Python executable. + It first ties more specific file names such as "python3.2" before + more generic "python3". This will prevent configure failure on + Mac OS X that installs Python3 via recent versions of Homebrew. + (Trac #2339, git 88db890d8d1c64de49be87f03c24a2021bcf63da) + +487. [bug] jinmei + The bind10 process now terminates a component (subprocess) by the + "config remove Boss/components" bindctl command even if the + process crashes immediately before the command is sent to bind10. + Previously this led to an inconsistent state between the + configuration and an internal component list of bind10, and bind10 + kept trying to restart the component. A known specific case of + this problem is that b10-ddns could keep failing (due to lack of + dependency modules) and the administrator couldn't stop the + restart via bindctl. + (Trac #2244, git 7565788d06f216ab254008ffdfae16678bcd00e5) + +486. [bug]* jinmei + All public header files for libb10-dns++ are now installed. + Template configure.ac and utility AC macros for external projects + using the library are provided under the "examples" directory. + The src/bin/host was moved as part of the examples (and not + installed with other BIND 10 programs any more). + (Trac #1870, git 4973e638d354d8b56dcadf71123ef23c15662021) + +485. [bug] jelte + Several bugs have been fixed in bindctl; tab-completion now works + within configuration lists, the problem where sometimes the + completion added a part twice has been solved, and it no longer + suggests the confusing value 'argument' as a completion-hint for + configuration items. Additionally, bindctl no longer crashes upon + input like 'config remove Boss'. + (Trac #2254, git 9047de5e8f973e12e536f7180738e6b515439448) 484. [func] tomek A new library (libb10-dhcpsrv) has been created. At present, it diff --cc src/lib/dhcp/cfgmgr.h index f57ef994d6,2e127c088c..2911d059de --- a/src/lib/dhcp/cfgmgr.h +++ b/src/lib/dhcp/cfgmgr.h @@@ -99,20 -99,22 +99,36 @@@ public /// needed is a dynamic server reconfiguration - a use case that is not /// planned to be supported any time soon. + /// @brief removes all subnets + /// + /// This method removes all existing subnets. It is used during + /// reconfiguration - old configuration is wiped and new definitions + /// are used to recreate subnets. + /// + /// @todo Implement more intelligent approach. Note that comparison + /// between old and new configuration is tricky. For example: is + /// 2000::/64 and 2000::/48 the same subnet or is it something + /// completely new? + void deleteSubnets6() { + subnets6_.clear(); + } + + /// @brief get IPv4 subnet by address + /// + /// Finds a matching subnet, based on an address. This can be used + /// in two cases: when trying to find an appropriate lease based on + /// a) relay link address (that must be the address that is on link) + /// b) our global address on the interface the message was received on + /// (for directly connected clients) + /// + /// @param hint an address that belongs to a searched subnet + Subnet4Ptr getSubnet4(const isc::asiolink::IOAddress& hint); + + /// @brief adds a subnet4 + void addSubnet4(const Subnet4Ptr& subnet); + + /// @brief removes all IPv4 subnets + void removeSubnets4(); protected: /// @brief Protected constructor.