Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
Thank you, Guy.
But I'm
afraid, that the issue is more difficult...
After perusal of 802.1s
once more I came to the conclusion
that this document mistakenly
allows double meaning of the
field "Version 3 Length"
(octets 37-38) :(
IMHO, the correct one is "is the number of
octets taken by the parameters
that follow in the BPDU..."
(14.6.q and Figure 14-1-MST BPDU parameters
and format). Clive A Stubbings
used this meaning.
I had been confused with item 14.4.e.3: "...a
Version 3
length representing an integral number, from 0 to 64
inclusive,
of MSTI Configuration Messages...".
I don't
consider this my mistake as an awful shame, because CISCO
did the same one,
at least C3550 Software (C3550-I5Q3L2-M), Version 12.1(12c)EA1
Attached
is a patch for your last check in. It allows to parse both types of
formats;
Ethereal warns about incorrect one, as far as I see.
I am
going to ask IEEE for the clarification about this field.
Best regards,
Alex
P.S. Could you explain, why Ethereal-dev
doesn't
operate? I cannot subscribe myself and read last messages from
the
archive (last archived message is *On Thu, 01 Jan 2004*)
"
On Monday, January 05, 2004 7:28 PM Guy
Harris wrote:
> On Mon, Jan 05, 2004 at 08:42:55AM
+0200, Alex Rozin wrote:
Alex > > I tried to debug my MSTP
implementation by Ethereal and
Alex > > saw, that my MST BPDUs are
considered as *malformed
Alex > > packets*.
Alex > > I
investigated a problem, exploring the code.
Alex > > It seems, that a
current version has a bug in packet-bpdu.c
Alex > > I fixed it as far
as I could; attached is a patch for ethereal-0.10.0
Guy > Checked in,
with "length" set to
Guy > "tvb_reported_length_remaining(tvb,
offset)"
Guy > after setting "offset" to BPDU_MSTI; that's a bit
simpler,
Guy > and also uses
Guy > the reported length of the tvbuff
(i.e., the packet length)
Guy > rather than
Guy > the data length
(i.e., the amount of packet data captured), so that
Guy > BPDUs are marked
as short frames if captured with a snapshot
Guy > length that
Guy >
doesn't capture all the packet data.
Guy >
Guy > I also updated your
e-mail address.
--- packet-bpdu.gui.c Wed Jan 7 09:46:30 2004 +++ packet-bpdu.c Wed Jan 7 11:32:21 2004 @@ -339,9 +339,13 @@ case BPDU_TYPE_RST: if (protocol_version_identifier == 3) { version_3_length = tvb_get_ntohs(tvb, BPDU_VERSION_3_LENGTH); + if (version_3_length < VERSION_3_STATIC_LENGTH - 2) { set_actual_length(tvb, RST_BPDU_SIZE + VERSION_3_STATIC_LENGTH + version_3_length * MSTI_MESSAGE_SIZE); + } else { + set_actual_length(tvb, RST_BPDU_SIZE + 2 + version_3_length); + } } else set_actual_length(tvb, RST_BPDU_SIZE); break; @@ -481,6 +485,15 @@ mstp_item = proto_tree_add_uint(bpdu_tree, hf_bpdu_version_3_length, tvb, BPDU_VERSION_3_LENGTH, 2, version_3_length); + if (version_3_length < VERSION_3_STATIC_LENGTH - 2) { + proto_item_append_text (mstp_item, + " (Malformed: number of MSTI messages !!! Must be %d)", + (int) (VERSION_3_STATIC_LENGTH - 2 + version_3_length * MSTI_MESSAGE_SIZE)); + } else { + proto_item_append_text (mstp_item, + " (Number of MSTI messages: %d)", + (int) ((version_3_length - VERSION_3_STATIC_LENGTH + 2) / MSTI_MESSAGE_SIZE)); + } mstp_tree = proto_item_add_subtree(mstp_item, ett_mstp); mst_config_format_selector = tvb_get_guint8(tvb, BPDU_MST_CONFIG_FORMAT_SELECTOR);
- References:
- [Ethereal-dev] Re: your mail
- From: Guy Harris
- [Ethereal-dev] Re: your mail
- Prev by Date: Re: [Ethereal-dev] Toolbar
- Next by Date: Re: [Ethereal-dev] errors linking ethereal CVS - Visual Studio .NET Professional
- Previous by thread: [Ethereal-dev] Re: your mail
- Next by thread: [Ethereal-dev] RE: MSTP(.1s): "Version 3 Length" in MST BPDU, Former "RE: your mail"
- Index(es):