// Domain name should not be skipped because the vendor option was truncated.
EXPECT_TRUE(query4->getOption(DHO_DOMAIN_NAME));
- // Drop statistics should not change.
+ // Drop statistics should have been increased.
+ EXPECT_EQ(1, getStatistic("pkt4-parse-failed"));
EXPECT_EQ(1, getStatistic("pkt4-receive-drop"));
}
EXPECT_TRUE(query4->inClass("HA_server3"));
// Drop statistics should not increase.
+ EXPECT_EQ(0, getStatistic("pkt4-not-for-use"));
EXPECT_EQ(0, getStatistic("pkt4-receive-drop"));
}
EXPECT_TRUE(query4->inClass("HA_server3"));
// Drop statistics should not increase.
+ EXPECT_EQ(0, getStatistic("pkt4-not-for-us"));
EXPECT_EQ(0, getStatistic("pkt4-receive-drop"));
}
EXPECT_TRUE(query4->getClasses().empty());
// Drop statistics should not increase.
+ EXPECT_EQ(0, getStatistic("pkt4-not-for-us"));
EXPECT_EQ(0, getStatistic("pkt4-receive-drop"));
}
EXPECT_TRUE(query4->getClasses().empty());
// Drop statistics should have been increased.
+ EXPECT_EQ(1, getStatistic("pkt4-not-for-us"));
EXPECT_EQ(1, getStatistic("pkt4-receive-drop"));
}
EXPECT_TRUE(query4->getClasses().empty());
// Drop statistics should have been increased.
+ EXPECT_EQ(0, getStatistic("pkt4-not-for-us"));
+ EXPECT_EQ(1, getStatistic("pkt4-processing-failed"));
EXPECT_EQ(1, getStatistic("pkt4-receive-drop"));
}
EXPECT_EQ(DHCPV6_SOLICIT, static_cast<int>(query6->getType()));
// Domain name should be skipped because the vendor option was truncated.
EXPECT_FALSE(query6->getOption(D6O_NIS_DOMAIN_NAME));
+
+ // Drop statistics should have been increased.
+ EXPECT_EQ(1, getStatistic("pkt6-parse-failed"));
+ EXPECT_EQ(1, getStatistic("pkt6-receive-drop"));
}
// Tests subnet6_select callout implementation when the server name
// to which the query belongs.
ASSERT_EQ(1, query6->getClasses().size());
EXPECT_TRUE(query6->inClass("HA_server3"));
+
+ // Drop statistics should not increase.
+ EXPECT_EQ(0, getStatistic("pkt6-not-for-use"));
+ EXPECT_EQ(0, getStatistic("pkt6-receive-drop"));
}
// Tests subnet6_select callout implementation when the server name
EXPECT_TRUE(query6->inClass("HA_server3"));
// Drop statistics should not increase.
+ EXPECT_EQ(0, getStatistic("pkt6-not-for-us"));
EXPECT_EQ(0, getStatistic("pkt6-receive-drop"));
}
EXPECT_TRUE(query6->getClasses().empty());
// Drop statistics should not increase.
+ EXPECT_EQ(0, getStatistic("pkt6-not-for-us"));
EXPECT_EQ(0, getStatistic("pkt6-receive-drop"));
}
EXPECT_TRUE(query6->getClasses().empty());
// Drop statistics should have been increased.
+ EXPECT_EQ(1, getStatistic("pkt6-not-for-us"));
EXPECT_EQ(1, getStatistic("pkt6-receive-drop"));
}
EXPECT_TRUE(query6->getClasses().empty());
// Drop statistics should have been increased.
+ EXPECT_EQ(0, getStatistic("pkt6-not-for-us"));
+ EXPECT_EQ(1, getStatistic("pkt6-processing-failed"));
EXPECT_EQ(1, getStatistic("pkt6-receive-drop"));
}
// be set to "park".
EXPECT_EQ(CalloutHandle::NEXT_STEP_PARK, callout_handle->getStatus());
EXPECT_TRUE(callout_handle->getParkingLotHandlePtr()->drop(query4));
+
+ // Drop statistics should not increase.
+ EXPECT_EQ(0, getStatistic("pkt4-not-for-us"));
+ EXPECT_EQ(0, getStatistic("pkt4-receive-drop"));
}
// Tests leases4_committed callout implementation for multiple relationships.
// there was no error during the callout.
EXPECT_EQ(CalloutHandle::NEXT_STEP_PARK, callout_handle->getStatus());
EXPECT_TRUE(callout_handle->getParkingLotHandlePtr()->drop(query4));
+
+ // Drop statistics should not increase.
+ EXPECT_EQ(0, getStatistic("pkt4-not-for-us"));
+ EXPECT_EQ(0, getStatistic("pkt4-receive-drop"));
}
// Tests leases4_committed callout implementation for multiple relationships when
// The relationship was not found so the packet should be dropped.
EXPECT_EQ(CalloutHandle::NEXT_STEP_DROP, callout_handle->getStatus());
EXPECT_TRUE(callout_handle->getParkingLotHandlePtr()->drop(query4));
+
+ // Drop statistics should have beeb increased.
+ EXPECT_EQ(1, getStatistic("pkt4-not-for-us"));
+ EXPECT_EQ(1, getStatistic("pkt4-receive-drop"));
}
// Tests leases4_committed callout implementation for multiple relationships when
// The relationship was not found so the packet should be dropped.
EXPECT_EQ(CalloutHandle::NEXT_STEP_DROP, callout_handle->getStatus());
EXPECT_TRUE(callout_handle->getParkingLotHandlePtr()->drop(query4));
+
+ // Drop statistics should have beeb increased.
+ EXPECT_EQ(1, getStatistic("pkt4-not-for-us"));
+ EXPECT_EQ(1, getStatistic("pkt4-receive-drop"));
}
// Tests leases6_committed callout implementation.
// be set to "park".
EXPECT_EQ(CalloutHandle::NEXT_STEP_PARK, callout_handle->getStatus());
EXPECT_TRUE(callout_handle->getParkingLotHandlePtr()->drop(query6));
+
+ // Drop statistics should not increase.
+ EXPECT_EQ(0, getStatistic("pkt6-not-for-us"));
+ EXPECT_EQ(0, getStatistic("pkt6-receive-drop"));
}
// Tests leases6_committed callout implementation for multiple relationships.
// there was no error during the callout.
EXPECT_EQ(CalloutHandle::NEXT_STEP_PARK, callout_handle->getStatus());
EXPECT_TRUE(callout_handle->getParkingLotHandlePtr()->drop(query6));
+
+ // Drop statistics should not increase.
+ EXPECT_EQ(0, getStatistic("pkt6-not-for-us"));
+ EXPECT_EQ(0, getStatistic("pkt6-receive-drop"));
}
// Tests leases6_committed callout implementation for multiple relationships when
// The relationship was not found so the packet should be dropped.
EXPECT_EQ(CalloutHandle::NEXT_STEP_DROP, callout_handle->getStatus());
EXPECT_TRUE(callout_handle->getParkingLotHandlePtr()->drop(query6));
+
+ // Drop statistics should have beeb increased.
+ EXPECT_EQ(1, getStatistic("pkt6-not-for-us"));
+ EXPECT_EQ(1, getStatistic("pkt6-receive-drop"));
}
// Tests leases6_committed callout implementation for multiple relationships when
// The relationship was not found so the packet should be dropped.
EXPECT_EQ(CalloutHandle::NEXT_STEP_DROP, callout_handle->getStatus());
EXPECT_TRUE(callout_handle->getParkingLotHandlePtr()->drop(query6));
+
+ // Drop statistics should have beeb increased.
+ EXPECT_EQ(1, getStatistic("pkt6-not-for-us"));
+ EXPECT_EQ(1, getStatistic("pkt6-receive-drop"));
}
// Tests lease4_expire callout implementation when the server is a hub