]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3343] Classification is now done before calling accept()
authorTomek Mrugalski <tomasz@isc.org>
Thu, 27 Feb 2014 10:12:47 +0000 (11:12 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Thu, 27 Feb 2014 10:12:47 +0000 (11:12 +0100)
src/bin/dhcp4/dhcp4_srv.cc

index fcee56cb533f8b1cb60db416aca20e80dbbea968..7199fa13e2e2471e198231d3ab4ade6e3509b649 100644 (file)
@@ -232,6 +232,11 @@ Dhcpv4Srv::run() {
             }
         }
 
+        // Assign this packet to one or more classes if needed. We need to do this
+       // before calling accept(), because getSubnet4() may need client class
+       // information.
+        classifyPacket(query);
+
         // Check whether the message should be further processed or discarded.
         // There is no need to log anything here. This function logs by itself.
         if (!accept(query)) {
@@ -274,9 +279,6 @@ Dhcpv4Srv::run() {
             callout_handle->getArgument("query4", query);
         }
 
-        // Assign this packet to one or more classes if needed
-        classifyPacket(query);
-
         try {
             switch (query->getType()) {
             case DHCPDISCOVER: