+ def get_replay_counts(self, p):
+ replay_node_name = ('/err/%s/SA replayed packet' %
+ self.tra4_decrypt_node_name[0])
+ count = self.statistics.get_err_counter(replay_node_name)
+
+ if p.async_mode:
+ replay_post_node_name = ('/err/%s/SA replayed packet' %
+ self.tra4_decrypt_node_name[p.async_mode])
+ count += self.statistics.get_err_counter(replay_post_node_name)
+
+ return count
+
+ def get_hash_failed_counts(self, p):
+ if ESP == self.encryption_type and p.crypt_algo == "AES-GCM":
+ hash_failed_node_name = ('/err/%s/ESP decryption failed' %
+ self.tra4_decrypt_node_name[p.async_mode])
+ else:
+ hash_failed_node_name = ('/err/%s/Integrity check failed' %
+ self.tra4_decrypt_node_name[p.async_mode])
+ count = self.statistics.get_err_counter(hash_failed_node_name)
+
+ if p.async_mode:
+ count += self.statistics.get_err_counter(
+ '/err/crypto-dispatch/bad-hmac')
+
+ return count
+