diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-08-26 07:34:43 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-08-26 07:34:43 +0000 |
commit | f93c76fd10c0899a5ce6b8eae5009c5b374cdbd8 (patch) | |
tree | bd78b3a5917f10ac3c0089bfed2d856bf0db57c7 /packet-rip.c | |
parent | 8b2e03eea6229b300b3de3322f14c446d0c303e9 (diff) | |
download | wireshark-f93c76fd10c0899a5ce6b8eae5009c5b374cdbd8.tar.gz wireshark-f93c76fd10c0899a5ce6b8eae5009c5b374cdbd8.tar.bz2 wireshark-f93c76fd10c0899a5ce6b8eae5009c5b374cdbd8.zip |
Convert a bunch of uses of "fd->cap_len" to use "pi.captured_len" (or to
use END_OF_FRAME), so that they don't look at stuff in an IP datagram
past the end of the IP datagram (i.e., frame padding).
svn path=/trunk/; revision=584
Diffstat (limited to 'packet-rip.c')
-rw-r--r-- | packet-rip.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packet-rip.c b/packet-rip.c index c2fa6c7f89..f81efc48fc 100644 --- a/packet-rip.c +++ b/packet-rip.c @@ -2,7 +2,7 @@ * Routines for RIPv1 and RIPv2 packet disassembly * (c) Copyright Hannes R. Boehm <hannes@boehm.org> * - * $Id: packet-rip.c,v 1.11 1999/08/04 00:33:11 guy Exp $ + * $Id: packet-rip.c,v 1.12 1999/08/26 07:34:40 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -92,7 +92,7 @@ dissect_rip(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { col_add_str(fd, COL_INFO, packet_type[rip_header.command]); if (tree) { - ti = proto_tree_add_item(tree, proto_rip, offset, (fd->cap_len - offset), NULL); + ti = proto_tree_add_item(tree, proto_rip, offset, END_OF_FRAME, NULL); rip_tree = proto_item_add_subtree(ti, ETT_RIP); proto_tree_add_text(rip_tree, offset, 1, "Command: %d (%s)", rip_header.command, packet_type[rip_header.command]); @@ -105,7 +105,7 @@ dissect_rip(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { /* zero or more entries */ - while((fd->cap_len - offset) >= RIP_ENTRY_LENGTH){ + while((pi.captured_len - offset) >= RIP_ENTRY_LENGTH){ memcpy(&rip_entry, &pd[offset], sizeof(rip_entry)); /* avoid alignment problem */ family = ntohs(rip_entry.vektor.family); switch (family) { |