aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ipv6.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-01-15 04:17:37 +0000
committerGuy Harris <guy@alum.mit.edu>2000-01-15 04:17:37 +0000
commit7063b3ae251be32e727b3bfd9dad28bb8ed0a075 (patch)
treeeffd0ff49a3ee02739db891b65ac3c0d8851c021 /packet-ipv6.c
parent339d67b043a1f1ac860b84ed48ec6ba77d96f487 (diff)
Fix up a bunch of places where a pointer into the packet buffer was cast
to a type requiring 2-byte or better alignment and was then dereferenced; doing that requires that the code generated by your compiler not trap if it makes an unaligned reference, and on most RISC processors the code generated by the compiler *will* trap on an unaligned reference by default. svn path=/trunk/; revision=1480
Diffstat (limited to 'packet-ipv6.c')
-rw-r--r--packet-ipv6.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/packet-ipv6.c b/packet-ipv6.c
index 3c30156391..f40f475d9d 100644
--- a/packet-ipv6.c
+++ b/packet-ipv6.c
@@ -1,7 +1,7 @@
/* packet-ipv6.c
* Routines for IPv6 packet disassembly
*
- * $Id: packet-ipv6.c,v 1.25 1999/11/16 11:42:36 guy Exp $
+ * $Id: packet-ipv6.c,v 1.26 2000/01/15 04:17:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -196,7 +196,7 @@ dissect_opts(const u_char *pd, int offset, frame_data *fd, proto_tree *tree,
if (p[1] == 4) {
proto_tree_add_text(dstopt_tree, p - pd, p[1] + 2,
"Jumbo payload: %u (%d bytes)",
- ntohl(*(guint32 *)&p[2]), p[1] + 2);
+ pntohl(&p[2]), p[1] + 2);
} else {
proto_tree_add_text(dstopt_tree, p - pd, p[1] + 2,
"Jumbo payload: Invalid length (%d bytes)",
@@ -210,7 +210,7 @@ dissect_opts(const u_char *pd, int offset, frame_data *fd, proto_tree *tree,
char *rta;
if (p[1] == 2) {
- rta = val_to_str(ntohs(*(guint16 *)&p[2]), rtalertvals,
+ rta = val_to_str(pntohs(&p[2]), rtalertvals,
"Unknown");
} else
rta = "Invalid length";