]> git.ipfire.org Git - thirdparty/suricata.git/commit
DNS: refactor tx completion logic 1623/head
authorVictor Julien <victor@inliniac.net>
Wed, 2 Sep 2015 11:07:59 +0000 (13:07 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 2 Sep 2015 12:49:28 +0000 (14:49 +0200)
commita798cf9518192bb78432cddb43c848f31c22ba3f
tree233327a16e943d4585629e69e6aa6db26d5a4f7e
parent7281ae6e8014b50ab4e37b0b39c4dd739b5434b3
DNS: refactor tx completion logic

Use simple bool values to track the transaction state in both directions.

A tx is only created in two cases:
1. full request parsed
2. response parsed (request missing)

This is true even for multi-packet TCP requests.

This leads to the following tx completion logic for the request side:
the presence of a tx implies the request is complete

On the response side, we consider the tx complete when we have seen
the response. If the DNS parser thinks the response was lost, we also
flag the response side as complete.
src/app-layer-dns-common.c