diff options
author | Doug Brown <doug@downtowndougbrown.com> | 2014-12-21 19:30:46 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-12-22 06:57:42 +0000 |
commit | 37940ee5adb8b7bc42e013fe14457871e434ac70 (patch) | |
tree | d4c95e4c5a6adb264b7f6fd2d2960181ab53e05c /epan/dissectors/packet-aarp.c | |
parent | 7b721a1c0e4db1e1090e92df2c648e9fdc4cfb7a (diff) |
Fix AARP AppleTalk address parsing
AppleTalk addresses are 3 bytes long and stored in AARP packets as 4 bytes.
The high byte should be 0, followed by 2-byte network number, followed by
1-byte node number.
The previous code was assuming that the high two bytes were the network number,
followed by the 1-byte node number, followed by 0.
Change-Id: I467ec6edac353796db0b96fbac65658d5c5491d3
Reviewed-on: https://code.wireshark.org/review/5968
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-aarp.c')
-rw-r--r-- | epan/dissectors/packet-aarp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-aarp.c b/epan/dissectors/packet-aarp.c index 9970f18618..e2f942c4a2 100644 --- a/epan/dissectors/packet-aarp.c +++ b/epan/dissectors/packet-aarp.c @@ -108,8 +108,8 @@ tvb_atalkid_to_str(tvbuff_t *tvb, gint offset) gchar *cur; cur=(gchar *)wmem_alloc(wmem_packet_scope(), 16); - node=tvb_get_guint8(tvb, offset)<<8|tvb_get_guint8(tvb, offset+1); - g_snprintf(cur, 16, "%d.%d",node,tvb_get_guint8(tvb, offset+2)); + node=tvb_get_guint8(tvb, offset+1)<<8|tvb_get_guint8(tvb, offset+2); + g_snprintf(cur, 16, "%d.%d",node,tvb_get_guint8(tvb, offset+3)); return cur; } |