BIND 10 trac2994, updated. ecd9691c1791c973b9afabe17b95c108596be0f2 [2994] Comments fixes in Dhcpv4Srv and AllocEngine code.

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Jul 16 13:47:45 UTC 2013


The branch, trac2994 has been updated
       via  ecd9691c1791c973b9afabe17b95c108596be0f2 (commit)
       via  2cbcb533f792251d19339c8b38ac7b87db94b28a (commit)
      from  02141f2524808a5ccf1ac9b620fc702e37607e31 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ecd9691c1791c973b9afabe17b95c108596be0f2
Author: Tomek Mrugalski <tomasz at isc.org>
Date:   Tue Jul 16 15:47:32 2013 +0200

    [2994] Comments fixes in Dhcpv4Srv and AllocEngine code.

commit 2cbcb533f792251d19339c8b38ac7b87db94b28a
Author: Tomek Mrugalski <tomasz at isc.org>
Date:   Tue Jul 16 15:41:16 2013 +0200

    [2994] DHCPv4 Hooks documentation written.

-----------------------------------------------------------------------

Summary of changes:
 doc/devel/mainpage.dox                    |    5 +++++
 src/bin/dhcp4/dhcp4.dox                   |    4 ++++
 src/bin/dhcp4/tests/dhcp4_srv_unittest.cc |    1 +
 src/bin/dhcp6/dhcp6.dox                   |    4 ++++
 src/bin/dhcp6/dhcp6_hooks.dox             |    6 ++++--
 src/lib/dhcpsrv/alloc_engine.cc           |    8 ++++----
 6 files changed, 22 insertions(+), 6 deletions(-)

-----------------------------------------------------------------------
diff --git a/doc/devel/mainpage.dox b/doc/devel/mainpage.dox
index 8eb31e8..799ee37 100644
--- a/doc/devel/mainpage.dox
+++ b/doc/devel/mainpage.dox
@@ -37,6 +37,8 @@
  * <a href="http://bind10.isc.org/">BIND10 webpage (http://bind10.isc.org)</a>
  * @section hooksFramework Hooks Framework
  * - @subpage hooksComponentDeveloperGuide
+ * - @subpage dhcpv4Hooks
+ * - @subpage dhcpv6Hooks
  *
  * @section dnsMaintenanceGuide DNS Maintenance Guide
  * - Authoritative DNS (todo)
@@ -48,10 +50,13 @@
  *   - @subpage dhcpv4Session
  *   - @subpage dhcpv4ConfigParser
  *   - @subpage dhcpv4ConfigInherit
+ *   - @subpage dhcpv4Other
+ *   - @subpage dhcpv4Hooks
  * - @subpage dhcp6
  *   - @subpage dhcpv6Session
  *   - @subpage dhcpv6ConfigParser
  *   - @subpage dhcpv6ConfigInherit
+ *   - @subpage dhcpv6Other
  *   - @subpage dhcpv6Hooks
  * - @subpage libdhcp
  *   - @subpage libdhcpIntro
diff --git a/src/bin/dhcp4/dhcp4.dox b/src/bin/dhcp4/dhcp4.dox
index 86ae845..bd490fb 100644
--- a/src/bin/dhcp4/dhcp4.dox
+++ b/src/bin/dhcp4/dhcp4.dox
@@ -79,4 +79,8 @@ See \ref dhcpv6ConfigParser.
 Configuration inheritance in DHCPv4 follows exactly the same logic as its DHCPv6
 counterpart. See \ref dhcpv6ConfigInherit.
 
+ at section dhcpv4Other Other DHCPv4 topics
+
+ For hooks API support in DHCPv4, see @ref dhcpv4Hooks.
+
 */
diff --git a/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc b/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
index 55cfbd3..7dc460c 100644
--- a/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
+++ b/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
@@ -1626,6 +1626,7 @@ TEST_F(Dhcpv4SrvTest, ServerID) {
 /// selectSubnetAddr, selectSubnetIface, selectSubnetRelayLinkaddr,
 /// selectSubnetRelayInterfaceId. Note that the concept of interface-id is not
 /// present in the DHCPv4, so not everything is applicable directly.
+/// See ticket #3057
 
 // Checks if hooks are registered properly.
 TEST_F(Dhcpv4SrvTest, Hooks) {
diff --git a/src/bin/dhcp6/dhcp6.dox b/src/bin/dhcp6/dhcp6.dox
index 4376a2a..1396e9b 100644
--- a/src/bin/dhcp6/dhcp6.dox
+++ b/src/bin/dhcp6/dhcp6.dox
@@ -92,4 +92,8 @@
 
  @todo Add section about setting up options and their definitions with bindctl.
 
+ @section dhcpv6Other Other DHCPv6 topics
+
+ For hooks API support in DHCPv6, see @ref dhcpv6Hooks.
+
  */
diff --git a/src/bin/dhcp6/dhcp6_hooks.dox b/src/bin/dhcp6/dhcp6_hooks.dox
index c9379c6..a584179 100644
--- a/src/bin/dhcp6/dhcp6_hooks.dox
+++ b/src/bin/dhcp6/dhcp6_hooks.dox
@@ -110,8 +110,10 @@ packet processing. Hook points that are not specific to packet processing
    means that the lease won't be inserted into the database (SOLICIT),
    a value of false means that it will (REQUEST).
 
- - <b>Skip flag action</b>: the "skip" flag is ignored by the server on this
-   hook.
+ - <b>Skip flag action</b>: If any callout installed on 'lease6_select'
+   sets the skip flag, the server will not assign that particular lease.
+   Packet processing will continue and the client may get other addresses
+   or prefixes if it requested more than one address and/or prefix.
 
 @subsection dhcpv6HooksPkt6Send pkt6_send
 
diff --git a/src/lib/dhcpsrv/alloc_engine.cc b/src/lib/dhcpsrv/alloc_engine.cc
index ced228a..f4b4c98 100644
--- a/src/lib/dhcpsrv/alloc_engine.cc
+++ b/src/lib/dhcpsrv/alloc_engine.cc
@@ -518,7 +518,7 @@ Lease6Ptr AllocEngine::reuseExpiredLease(Lease6Ptr& expired,
 
         // Callouts decided to skip the action. This means that the lease is not
         // assigned, so the client will get NoAddrAvail as a result. The lease
-        // won't be inserted into the
+        // won't be inserted into the database.
         if (callout_handle->getSkip()) {
             LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_HOOKS, DHCPSRV_HOOK_LEASE6_SELECT_SKIP);
             return (Lease6Ptr());
@@ -596,7 +596,7 @@ Lease4Ptr AllocEngine::reuseExpiredLease(Lease4Ptr& expired,
 
         // Callouts decided to skip the action. This means that the lease is not
         // assigned, so the client will get NoAddrAvail as a result. The lease
-        // won't be inserted into the
+        // won't be inserted into the database.
         if (callout_handle->getSkip()) {
             LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_HOOKS, DHCPSRV_HOOK_LEASE4_SELECT_SKIP);
             return (Lease4Ptr());
@@ -655,7 +655,7 @@ Lease6Ptr AllocEngine::createLease6(const Subnet6Ptr& subnet,
 
         // Callouts decided to skip the action. This means that the lease is not
         // assigned, so the client will get NoAddrAvail as a result. The lease
-        // won't be inserted into the
+        // won't be inserted into the database.
         if (callout_handle->getSkip()) {
             LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_HOOKS, DHCPSRV_HOOK_LEASE6_SELECT_SKIP);
             return (Lease6Ptr());
@@ -746,7 +746,7 @@ Lease4Ptr AllocEngine::createLease4(const SubnetPtr& subnet,
 
         // Callouts decided to skip the action. This means that the lease is not
         // assigned, so the client will get NoAddrAvail as a result. The lease
-        // won't be inserted into the
+        // won't be inserted into the database.
         if (callout_handle->getSkip()) {
             LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_HOOKS, DHCPSRV_HOOK_LEASE4_SELECT_SKIP);
             return (Lease4Ptr());



More information about the bind10-changes mailing list