aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ipv6.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-06-29 09:46:54 +0000
committerGuy Harris <guy@alum.mit.edu>2001-06-29 09:46:54 +0000
commit556a11ad45f9f97d52273386290aa7cdae579c5e (patch)
tree146bc0d7a44d8f5d8b5e672a520865b17cf6466d /packet-ipv6.c
parentc94f0e130b3e4fdb4f4f6fdf82130166fa011392 (diff)
Create a routine to do the tvbuff-length-adjusting and
"pinfo->{len,captured_len}"-adjusting currently done by the IP dissector, make the IP dissector call that rather than doing the work itself, make the IPv6 dissector call that rather than just adjusting the tvbuff length itself, and make the IPX dissector call that rather than just adjusting "pi.{len,captured_len}" itself. This cleans things up a bit, and causes trailers to be properly reported in IPX-over-Ethernet frames. svn path=/trunk/; revision=3621
Diffstat (limited to 'packet-ipv6.c')
-rw-r--r--packet-ipv6.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/packet-ipv6.c b/packet-ipv6.c
index 8b2c8e49db..d5a6e7de0e 100644
--- a/packet-ipv6.c
+++ b/packet-ipv6.c
@@ -1,11 +1,10 @@
/* packet-ipv6.c
* Routines for IPv6 packet disassembly
*
- * $Id: packet-ipv6.c,v 1.60 2001/06/26 17:31:36 itojun Exp $
+ * $Id: packet-ipv6.c,v 1.61 2001/06/29 09:46:52 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
- *
* Copyright 1998 Gerald Combs
*
* MobileIPv6 support added by Tomislav Borosa <tomislav.borosa@siemens.hr>
@@ -675,9 +674,8 @@ dissect_ipv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Get the payload length */
plen = ntohs(ipv6.ip6_plen);
- /* Check for trailer (not part of IPv6 packet) */
- if (plen + sizeof (struct ip6_hdr) < tvb_reported_length(tvb))
- tvb_set_reported_length(tvb, plen + sizeof (struct ip6_hdr));
+ /* Adjust the length of this tvbuff to include only the IPv6 datagram. */
+ set_actual_length(tvb, pinfo, plen + sizeof (struct ip6_hdr));
SET_ADDRESS(&pinfo->net_src, AT_IPv6, 16, tvb_get_ptr(tvb, offset + IP6H_SRC, 16));
SET_ADDRESS(&pinfo->src, AT_IPv6, 16, tvb_get_ptr(tvb, offset + IP6H_SRC, 16));