diff options
Diffstat (limited to 'main.c')
-rwxr-xr-x | main.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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++; |