Comment # 17
on bug 3513
from Hadriel Kaplan
I'm not sure the "duplicate field registration" issue is a bug, technically.
C-code can register duplicate field abbreviations as well. See this comment in
epan/proto.c:
/* We allow multiple hfinfo's to be registered under the same
* abbreviation. This was done for X.25, as, depending
* on whether it's modulo-8 or modulo-128 operation,
* some bitfield fields may be in different bits of
* a byte, and we want to be able to refer to that field
* with one name regardless of whether the packets
* are modulo-8 or modulo-128 packets. */
Wireshark's lua does correctly catch and error duplicate protocol names (i.e.,
using Proto.new()), but ProtoFields are not prevented from being duplicate with
others. I agree though that it's not "normal", and can lead to weird
scenarios. The new field doesn't replace the old one - they're both kept and
used, which can be buggy if they're not the same basic type (i.e., both uint16
or whatever). Should lua be stricter and prevent duplication of ProtoFields?
We could do it with an optional non-default arg to "force" such registration.
You are receiving this mail because:
- You are the assignee for the bug.
- You are watching all bug changes.