> Von: Guy Harris [mailto:gharris@xxxxxxxxx]
> Gesendet: Montag, 11. November 2002 20:26
> Betreff: Re: [Ethereal-dev] 2 patches to packet-gtp.c
>
> On Mon, Nov 11, 2002 at 09:50:06AM -0800, Guy Harris wrote:
> > Instead, a new tvbuff should be constructed, with new data, and that
> > data modified.
>
> Or, instead, we should have the PPP dissector export its dissector
> table, and have the GTP dissector go through that dissector table
> itself, and not do any octet shuffling at all. This also lets us get
> rid of the option to control whether to do octet shuffling.
>
> I've checked in a change to do that.
Sorry, but I didn't know so much of the Ethereal code. I just stumbled
over the mangling before the warning was established.
I think the binary data must stay the truth even if the interpretation
may fail. So I tried to correct how I thought it would work
(and it did work). If that caused you to apply a better solution then
it was worth the try ;-) At least it was a good idea to split the patches.
> (Another possibility would be to have the GTP dissector have its own
> dissector table, and have only the configuration protocols for PPP
> register in that table, so bogus protocol ID values don't cause us to
> dissect "configuration options" as IP packets or something such as
> that.)
I wouldn't do that. The standard leaves a small path: "The support of
other protocol identifiers is implementation dependent". So if the field
says the following data are IP (0x0021), not IPCP (0x8021), then I would
give it a try to decode it that way. Of course it doesn't make sense, but
test tools could send such nonsense to challenge the unit under test.
It is nicer to have that nonsense decoded correctly ;-)
Andreas