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>
This commit is contained in:
Doug Brown 2014-12-21 19:30:46 -08:00 committed by Guy Harris
parent 7b721a1c0e
commit 37940ee5ad
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}