aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ipv6.c
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2006-06-25 12:15:35 +0000
committerJaap Keuter <jaap.keuter@xs4all.nl>2006-06-25 12:15:35 +0000
commit846331e8a6c5b2ec7280475c012e364c9916de14 (patch)
treef1c28d4ffc9351cbeec55738f609dc60668a1cc5 /epan/dissectors/packet-ipv6.c
parent139b870383684c53ba900ed0dfa926439aae0b7b (diff)
Fix Ethereal bug 1004. Make UDP dissector work on top of IPv6 by filling in pinfo fields correctly.
svn path=/trunk/; revision=18574
Diffstat (limited to 'epan/dissectors/packet-ipv6.c')
-rw-r--r--epan/dissectors/packet-ipv6.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c
index 7c1475022a..7a9657bb0a 100644
--- a/epan/dissectors/packet-ipv6.c
+++ b/epan/dissectors/packet-ipv6.c
@@ -585,9 +585,7 @@ dissect_ipv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset = 0;
tvb_memcpy(tvb, (guint8 *)&ipv6, offset, sizeof(ipv6));
- pinfo->ipproto = ipv6.ip6_nxt; /* XXX make work TCP follow (ipproto = 6) */
-
- /* Get the payload length */
+ /* Get extension header and payload length */
plen = g_ntohs(ipv6.ip6_plen);
/* Adjust the length of this tvbuff to include only the IPv6 datagram. */
@@ -732,6 +730,11 @@ again:
proto_tree_add_uint_hidden(ipv6_tree, hf_ipv6_final, tvb, poffset, 1, nxt);
#endif
+ /* collect packet info */
+ pinfo->ipproto = nxt;
+ pinfo->iplen = sizeof(ipv6) + plen;
+ pinfo->iphdrlen = offset;
+
/* If ipv6_reassemble is on, this is a fragment, and we have all the data
* in the fragment, then just add the fragment to the hashtable.
*/