summaryrefslogtreecommitdiff
path: root/packet-isis-hello.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-01-24 03:33:35 +0000
committerGuy Harris <guy@alum.mit.edu>2000-01-24 03:33:35 +0000
commitf2246ebb65b7640ecf7e17a974ef4521427dca47 (patch)
tree0e9b2b89c52b9e6ccceab293202cf1051f4b1c5f /packet-isis-hello.c
parent9d4c965c819bf9ff2e979db0fb18dd3d8d3cfd4c (diff)
downloadwireshark-f2246ebb65b7640ecf7e17a974ef4521427dca47.tar.gz
Fix a bunch of dissectors to use "pi.captured_len" rather than
"fd->cap_len" for the frame length - or to use macros such as "BYTES_ARE_IN_FRAME()", "IS_DATA_IN_FRAME()", and "END_OF_FRAME", which use "pi.captured_len" - so that they correctly handle frames where the actual data length of the packet is less than the size of the raw frame, e.g. with encapsulations such as ISL. svn path=/trunk/; revision=1530
Diffstat (limited to 'packet-isis-hello.c')
-rw-r--r--packet-isis-hello.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/packet-isis-hello.c b/packet-isis-hello.c
index 00b530f342..1710e05a7f 100644
--- a/packet-isis-hello.c
+++ b/packet-isis-hello.c
@@ -1,7 +1,7 @@
/* packet-isis-hello.c
* Routines for decoding isis hello packets and their CLVs
*
- * $Id: packet-isis-hello.c,v 1.1 1999/12/15 04:34:17 guy Exp $
+ * $Id: packet-isis-hello.c,v 1.2 2000/01/24 03:33:33 guy Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@@ -427,10 +427,10 @@ isis_dissect_isis_hello(int hello_type, int header_length,
hlen = sizeof(*ihp);
}
- if (fd->cap_len < (offset + hlen)) {
+ if (!BYTES_ARE_IN_FRAME(offset, hlen)) {
isis_dissect_unknown(offset, hlen, tree, fd,
"not enough capture data for header (%d vs %d)",
- hlen, offset - fd->cap_len);
+ hlen, END_OF_FRAME);
return;
}
@@ -438,7 +438,7 @@ isis_dissect_isis_hello(int hello_type, int header_length,
if (tree) {
ti = proto_tree_add_item(tree, proto_isis_hello,
- offset, fd->cap_len - offset, NULL);
+ offset, END_OF_FRAME, NULL);
hello_tree = proto_item_add_subtree(ti, ett_isis_hello);
proto_tree_add_item_format(hello_tree,
hf_isis_hello_circuit_reserved,