Wireshark-dev: Re: [Wireshark-dev] Hi. regarding 'visited' bit

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Sun, 16 May 2010 18:16:52 +0200
On 05/16/2010 03:36 PM, Ari Yoskovitz wrote:
Hi.

I am using the pinfo->fd->flags.visited bit in my dissector.
I have discovered (after a lot of debugging...) the sometimes this bit
is asserted even on the first run, namely when the packet was not visited...
It happens very rarely, but when it does the results are destructive.

Am I missing anything? Is this a bug?

This should never happen. If this is true, that's a bug.
Now the question is, can you define the circumstances when this happens?

Thanks.

BTW It looks to me that this bit has to be manually set to 1 when the
packet is being visited for the first time. Again, am I wrong here? Thanks.


This is *incorrect*
The EPAN dissection engine handles setting of this bit after the frame was handed off to the frame dissector. See dissect_packet() in epan/packet.c. You're supposed to treat this as a readonly value. Maybe this is the cause for the bug you see?

Thanks,
Jaap