diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-03-04 06:47:10 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-03-04 06:47:10 +0000 |
commit | 9db95664d104089e059e1110bd4936cb8375ff26 (patch) | |
tree | ad09573b7494a677e409713fff80f9bed96d8553 /packet-fc.c | |
parent | 9a57223addead8c42ff2c9b98c88aa68d5f670fe (diff) |
When deciding whether we have enough data in a lower-level packet to
attempt reassembly of a higher-level packet that includes the
lower-level packet, use "tvb_bytes_exist()" to check whether all the
data that's to be included in the reassembly is available, rather than
by checking whether the packet is short.
Add some checks of that sort that were missing.
Use the reported length of the packet when doing reassembly.
Make the "iphdrlen" field of a "packet_info" structure be the length of
the IP header in bytes, not in 4-byte words.
svn path=/trunk/; revision=7274
Diffstat (limited to 'packet-fc.c')
-rw-r--r-- | packet-fc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packet-fc.c b/packet-fc.c index 0540273ffe..b496dca279 100644 --- a/packet-fc.c +++ b/packet-fc.c @@ -2,7 +2,7 @@ * Routines for Fibre Channel Decoding (FC Header, Link Ctl & Basic Link Svc) * Copyright 2001, Dinesh G Dutt <ddutt@cisco.com> * - * $Id: packet-fc.c,v 1.3 2003/01/28 23:56:38 guy Exp $ + * $Id: packet-fc.c,v 1.4 2003/03/04 06:47:09 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -659,7 +659,8 @@ dissect_fc (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * present, if we're configured to reassemble. */ if ((ftype != FC_FTYPE_LINKCTL) && (ftype != FC_FTYPE_BLS) && - seqcnt && fc_reassemble) { + seqcnt && fc_reassemble && + tvb_bytes_exist(tvb, FC_HEADER_SIZE, frag_size)) { /* Add this to the list of fragments */ frag_id = (pinfo->oxid << 16) | is_exchg_resp; |