BIND 10 trac3316, updated. 7e7238756a8b742acb1aad92d50bad06905f34c3 [3316] Minor update in classSpecificProcessing()

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Feb 18 16:47:09 UTC 2014


The branch, trac3316 has been updated
       via  7e7238756a8b742acb1aad92d50bad06905f34c3 (commit)
       via  13bff6316f19e2429ed2256f32925b257abb01b4 (commit)
      from  e8cd634195e60ea0f56453441366aef5ba830386 (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 7e7238756a8b742acb1aad92d50bad06905f34c3
Author: Tomek Mrugalski <tomasz at isc.org>
Date:   Tue Feb 18 17:35:58 2014 +0100

    [3316] Minor update in classSpecificProcessing()

commit 13bff6316f19e2429ed2256f32925b257abb01b4
Author: Tomek Mrugalski <tomasz at isc.org>
Date:   Tue Feb 18 16:57:45 2014 +0100

    [3316] User's Guide update

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

Summary of changes:
 doc/guide/bind10-guide.xml |   44 +++++++++++++++++++++++---------------------
 src/bin/dhcp4/dhcp4_srv.cc |    2 +-
 2 files changed, 24 insertions(+), 22 deletions(-)

-----------------------------------------------------------------------
diff --git a/doc/guide/bind10-guide.xml b/doc/guide/bind10-guide.xml
index b74a1e2..7873e60 100644
--- a/doc/guide/bind10-guide.xml
+++ b/doc/guide/bind10-guide.xml
@@ -4431,15 +4431,16 @@ Dhcp4/subnet4	[]	list	(default)
         extensions will be using hooks extensions.
       </para>
       </note>
-      <para>In certain cases it is useful to differentiate between different types
-      of clients and treat them differently. The process of doing classification
-      is conducted in two steps. The first step is to assess incoming packet and
-      assign it to zero or more classes. This classification is currently simple,
-      but is expected to grow in capability soon. Currently the server checks whether
-      incoming packet has vendor class identifier option (60). If it has, content
-      of that option is interpreted as a class. For example, modern cable modems
-      will send this option with value "docsis3.0" and as a result the
-      packet will belong to class "docsis3.0".
+      <para>In certain cases it is useful to differentiate between different
+      types of clients and treat them differently. The process of doing
+      classification is conducted in two steps. The first step is to assess
+      incoming packet and assign it to zero or more classes. This classification
+      is currently simple, but is expected to grow in capability soon. Currently
+      the server checks whether incoming packet has vendor class identifier
+      option (60). If it has, content of that option is prepended with
+      "VENDOR_CLASS_" then is interpreted as a class. For example,
+      modern cable modems will send this option with value "docsis3.0"
+      and as a result the packet will belong to class "VENDOR_CLASS_docsis3.0".
       </para>
 
       <para>It is envisaged that the client classification will be used for changing
@@ -4450,12 +4451,12 @@ Dhcp4/subnet4	[]	list	(default)
       subnet selection.</para>
 
       <para>
-        For clients that belong to the docsis3.0 class, the siaddr field is set to
-        the value of next-server (if specified in a subnet). If there is
-        boot-file-name option specified, its value is also set in the file field
-        in the DHCPv4 packet. For eRouter1.0 class, the siaddr is always set to
-        0.0.0.0. That capability is expected to be moved to external hook
-        library that will be dedicated to cable modems.
+        For clients that belong to the VENDOR_CLASS_docsis3.0 class, the siaddr
+        field is set to the value of next-server (if specified in a subnet). If
+        there is boot-file-name option specified, its value is also set in the
+        file field in the DHCPv4 packet. For eRouter1.0 class, the siaddr is
+        always set to 0.0.0.0. That capability is expected to be moved to
+        external hook library that will be dedicated to cable modems.
       </para>
 
       <para>
@@ -4483,13 +4484,13 @@ Dhcp4/subnet4	[]	list	(default)
         the 192.0.2.0/24 prefix. The Administrator of that network has decided
         that addresses from range 192.0.2.10 to 192.0.2.20 are going to be
         managed by the Dhcp4 server. Only clients belonging to client class
-        docsis3.0 are allowed to use this subnet. Such a configuration can be
-        achieved in the following way:
+        VENDOR_CLASS_docsis3.0 are allowed to use this subnet. Such a
+        configuration can be achieved in the following way:
         <screen>
 > <userinput>config add Dhcp4/subnet4</userinput>
 > <userinput>config set Dhcp4/subnet4[0]/subnet "192.0.2.0/24"</userinput>
 > <userinput>config set Dhcp4/subnet4[0]/pool [ "192.0.2.10 - 192.0.2.20" ]</userinput>
-> <userinput>config set Dhcp4/subnet4[0]/client-class "docsis3.0"</userinput>
+> <userinput>config set Dhcp4/subnet4[0]/client-class "VENDOR_CLASS_docsis3.0"</userinput>
 > <userinput>config commit</userinput></screen>
       </para>
 
@@ -5558,9 +5559,10 @@ should include options from the isc option space:
       assign it to zero or more classes. This classification is currently simple,
       but is expected to grow in capability soon. Currently the server checks whether
       incoming packet has vendor class option (16). If it has, content
-      of that option is interpreted as a class. For example, modern cable modems
-      will send this option with value "docsis3.0" and as a result the
-      packet will belong to class "docsis3.0".
+      of that option is prepended with "VENDOR_CLASS_" interpreted as a
+      class. For example, modern cable modems will send this option with value
+      "docsis3.0" and as a result the packet will belong to class
+      "VENDOR_CLASS_docsis3.0".
       </para>
 
       <para>It is envisaged that the client classification will be used for changing
diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc
index 1b36978..2f42738 100644
--- a/src/bin/dhcp4/dhcp4_srv.cc
+++ b/src/bin/dhcp4/dhcp4_srv.cc
@@ -1841,7 +1841,7 @@ bool Dhcpv4Srv::classSpecificProcessing(const Pkt4Ptr& query, const Pkt4Ptr& rsp
         return (true);
     }
 
-    if (query->inClass(DOCSIS3_CLASS_MODEM)) {
+    if (query->inClass(VENDOR_CLASS_PREFIX + DOCSIS3_CLASS_MODEM)) {
 
         // Set next-server. This is TFTP server address. Cable modems will
         // download their configuration from that server.



More information about the bind10-changes mailing list