aboutsummaryrefslogtreecommitdiffstats
path: root/packet-x25.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-05-09 05:49:28 +0000
committerGuy Harris <guy@alum.mit.edu>2002-05-09 05:49:28 +0000
commitcbad622d0eea2ddc0f663c03fd1c8383d3bf0dd7 (patch)
treeca7ebe12c330b0613e66029bf1af32a8490a1686 /packet-x25.c
parente932bc78a985bdde38550935eeb9c334e52ebb6a (diff)
From Martin Thomas: handle address lengths based on TOA bit in X.25.
svn path=/trunk/; revision=5423
Diffstat (limited to 'packet-x25.c')
-rw-r--r--packet-x25.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/packet-x25.c b/packet-x25.c
index 953a9fbe97..06a96a552b 100644
--- a/packet-x25.c
+++ b/packet-x25.c
@@ -2,7 +2,7 @@
* Routines for x25 packet disassembly
* Olivier Abad <oabad@cybercable.fr>
*
- * $Id: packet-x25.c,v 1.65 2002/04/09 08:15:02 guy Exp $
+ * $Id: packet-x25.c,v 1.66 2002/05/09 05:49:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1313,6 +1313,13 @@ x25_ntoa(proto_tree *tree, int *offset, tvbuff_t *tvb,
byte = tvb_get_guint8(tvb, *offset);
len1 = (byte >> 4) & 0x0F;
len2 = (byte >> 0) & 0x0F;
+
+ if (!toa) { /* then switch the length indicators.. */
+ i = len1;
+ len1 = len2;
+ len2 = i;
+ }
+
if (tree) {
proto_tree_add_text(tree, tvb, *offset, 1,
decode_numeric_bitfield(byte, 0xF0, 1*8,