// Check if the callout handle state was reset after the callout.
checkCalloutHandleReset(discover);
+
+ // Drop statistics should be maintained by the callouts, not by the server.
+ EXPECT_EQ(0, getStatistic("pkt4-receive-drop"));
}
// Checks if callouts installed on pkt4_receive are indeed called and the
// Check if the callout handle state was reset after the callout.
checkCalloutHandleReset(discover);
+
+ // Drop statistics should be maintained by the callouts, not by the server.
+ EXPECT_EQ(0, getStatistic("pkt4-receive-drop"));
}
// Checks if callouts installed on pkt4_send are indeed called and the
// Check if the callout handle state was reset after the callout.
checkCalloutHandleReset(discover);
+
+ // Drop statistics should be maintained by the callouts, not by the server.
+ EXPECT_EQ(0, getStatistic("pkt4-receive-drop"));
}
// This test verifies that the leases4_committed hook point is not triggered
.arg(query->getLocalAddr().toText())
.arg(query->getIface());
- // Increase the statistic of dropped packets.
- StatsMgr::instance().addValue("pkt6-receive-drop",
- static_cast<int64_t>(1));
+ // Not increasing the statistics of the dropped packets because it
+ // is the callouts' responsibility to increase it. There are some
+ // cases when the callouts may elect to not increase the statistics.
+ // For example, packets dropped by the load-balancing algorithm must
+ // not increase the statistics.
return (Pkt6Ptr());
}
(callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP)) {
LOG_DEBUG(hooks_logger, DBG_DHCP6_HOOKS, DHCP6_HOOK_PACKET_RCVD_SKIP)
.arg(query->getLabel());
- // Increase the statistic of dropped packets.
- StatsMgr::instance().addValue("pkt6-receive-drop",
- static_cast<int64_t>(1));
+ // Not increasing the statistics of the dropped packets because it
+ // is the callouts' responsibility to increase it. There are some
+ // cases when the callouts may elect to not increase the statistics.
+ // For example, packets dropped by the load-balancing algorithm must
+ // not increase the statistics.
return (Pkt6Ptr());
}
// Check if the callout handle state was reset after the callout.
checkCalloutHandleReset(sol);
+
+ // Drop statistics should be maintained by the callouts, not by the server.
+ EXPECT_EQ(0, getStatistic("pkt6-receive-drop"));
}
// Checks if callouts installed on pkt6_receive are indeed called and the
// Check if the callout handle state was reset after the callout.
checkCalloutHandleReset(sol);
+
+ // Drop statistics should be maintained by the callouts, not by the server.
+ EXPECT_EQ(0, getStatistic("pkt6-receive-drop"));
}
// Checks if callouts installed on pkt6_send are indeed called and the
// Check if the callout handle state was reset after the callout.
checkCalloutHandleReset(sol);
+
+ // Drop statistics should be maintained by the callouts, not by the server.
+ EXPECT_EQ(0, getStatistic("pkt6-receive-drop"));
}
// This test verifies that the leases6_committed hook point is not triggered