Wireshark-dev: Re: [Wireshark-dev] Problems when changing a dissector preference

From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Mon, 19 Nov 2007 16:15:33 -0500


Stig Bjørlykke wrote:
Hi.

In the DMP dissector I build a hash_table with some SEQ/ACK analysis values the first time the package is dissected (when pinfo->fd- >flags.visited==FALSE). This hash_table is deleted in the dissectors init routine.

When changing the udp port in the dissectors preferences, from an unknown port to the port used in the packages, the init routine for the dissector is called and all packages are reloaded with pinfo->fd- >flags.visited=TRUE. This will not create my hash_table as expected, and the analysis values are not calculated.

Any idea how I should fix this?

Free it (and recreate it) in a routine registered with register_init_routine() instead?