summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rwxr-xr-xmain.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/main.c b/main.c
index 7f8221d..fdb1abe 100755
--- a/main.c
+++ b/main.c
@@ -130,8 +130,17 @@ cthelper_process_packet(const uint8_t *pkt, uint32_t pktlen,
printf("\e[0m\n");
}
- } else
+ } else {
ret = h->cb(pktb, dataoff, ct->myct, ctinfo);
+ /* Release expectation and expectation counter if added via
+ * myct->exp.
+ */
+ if (ct->myct->exp) {
+ cthelper_test_stats.ct_expect_created++;
+ nfexp_destroy(ct->myct->exp);
+ ct->myct->exp = NULL;
+ }
+ }
if (ret == NF_DROP)
cthelper_test_stats.pkts_dropped++;