aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2007-04-25 23:54:54 +0000
committerGuy Harris <guy@alum.mit.edu>2007-04-25 23:54:54 +0000
commit9439c19e31d67e28084fd188123f31d08a04cd65 (patch)
tree43ec32219dea0be6021556a45344290a952734c0
parent17b1c57ec9932dc4ff3afdfc4a8ea876ec69fbcd (diff)
The data field of an address structure is a void *, so we can't look at
what it points to. Stop doing that in the code to check for source routing. svn path=/trunk/; revision=21572
-rw-r--r--epan/dissectors/packet-tr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-tr.c b/epan/dissectors/packet-tr.c
index 7c99e1bb31..9b156cdd39 100644
--- a/epan/dissectors/packet-tr.c
+++ b/epan/dissectors/packet-tr.c
@@ -378,17 +378,17 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
SET_ADDRESS(&trh->src, AT_ETHER, 6, tvb_get_ptr(tr_tvb, 8, 6));
SET_ADDRESS(&trh->dst, AT_ETHER, 6, tvb_get_ptr(tr_tvb, 2, 6));
+ /* if the high bit on the first byte of src hwaddr is 1, then
+ this packet is source-routed */
memcpy(trn_shost_nonsr, trh->src.data, 6);
+ source_routed = trn_shost_nonsr[0] & 128;
trn_shost_nonsr[0] &= 127;
+
frame_type = (trh->fc & 192) >> 6;
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "Token-Ring %s", fc[frame_type]);
- /* if the high bit on the first byte of src hwaddr is 1, then
- this packet is source-routed */
- source_routed = trh->src.data[0] & 128;
-
trn_rif_bytes = tvb_get_guint8(tr_tvb, 14) & 31;
if (fix_linux_botches) {