Ethereal-dev: [Ethereal-dev] A bug in displaying unreserved bandwidth for TE extensions to ISI

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Chenjiang Hu <chu@xxxxxxxxxx>
Date: Tue, 7 May 2002 11:48:37 -0500
Hi, 

I find a problem in unreserved bandwidth display for TE extensions to ISIS,
which always shows the same value for all 8 unreserved bandwidths (priority
1
to priority 7). I looked at the function dissect_subclv_unrsv_bw() in file
packet-isis-lsp.c
and found that it uses the same offset to get the unreserved bandwidth for
all
8 priorities. The corrected code for function dissect_subclv_unrsv_bw() is
as follows:

static void
dissect_subclv_unrsv_bw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
int offset)
{
        proto_item *ti;
        proto_tree *ntree;
        guint32    ui;
        gfloat     bw;
        int        i;

        ti = proto_tree_add_text (tree, tvb, offset-2, 34, "Unreserved
bandwidth:");
        ntree = proto_item_add_subtree (ti, ett_isis_lsp_subclv_unrsv_bw);

        for (i = 0 ; i < 8 ; i++) {
                ui = tvb_get_ntohl(tvb, offset+4*i);;
                memcpy (&bw, &ui, 4);
                proto_tree_add_text (ntree, tvb, offset+4*i, 4,
                        "priority level %d: %.2f Mbps", i, bw*8/1000000 );
        }
}

Could any of you update your source code according to the above correction
for me?
so all the ethereal users can benifit from this fix.

Thanks,

Chenjiang Hu
----------------------------------------- (on rchss001)

This e-mail and any files transmitted with it are the property
of Chiaro Networks, Ltd., and may contain confidential and 
privileged material for the sole use of the intended recipient(s)
to whom this e-mail is addressed. If you are not one of the named
recipient(s), or otherwise have reason to believe that you have 
received this message in error, please notify the sender and 
delete all copies from your system.  Any other use, retention, 
dissemination, forwarding, printing or copying of this e-mail is 
strictly prohibited.


---------------------------------------------------------