Browse Source

[3343] Classification is now done before calling accept()

Tomek Mrugalski 11 years ago
parent
commit
9e14f6e222
1 changed files with 5 additions and 3 deletions
  1. 5 3
      src/bin/dhcp4/dhcp4_srv.cc

+ 5 - 3
src/bin/dhcp4/dhcp4_srv.cc

@@ -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: