From f5b47f1a6e9048e72f1e3b0e0f7c03459e20ca66 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 10 Dec 2023 10:45:31 +0100 Subject: Merging upstream version 1.3.0. Signed-off-by: Daniel Baumann --- examples/readme.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'examples/readme.lua') diff --git a/examples/readme.lua b/examples/readme.lua index dc6de89..a62ec99 100755 --- a/examples/readme.lua +++ b/examples/readme.lua @@ -1,4 +1,8 @@ #!/usr/bin/env dnsjit + +-- Disclaimer, to keep this example short it only works on pre-prepared +-- PCAPs with only UDP DNS traffic in them. + require("dnsjit.core.objects") local input = require("dnsjit.input.pcap").new() local layer = require("dnsjit.filter.layer").new() @@ -12,6 +16,7 @@ while true do local object = producer(ctx) if object == nil then break end if object:type() == "payload" then + dns:reset() dns.obj_prev = object if dns:parse_header() == 0 then print(dns.id) -- cgit v1.2.3