diff options
author | Jaap Keuter <jaap.keuter@xs4all.nl> | 2008-11-04 17:50:13 +0000 |
---|---|---|
committer | Jaap Keuter <jaap.keuter@xs4all.nl> | 2008-11-04 17:50:13 +0000 |
commit | b8d2338f94ecc360c5f518fc2cc5c1b621e97c94 (patch) | |
tree | fe49c2aa1f5988ea23d3fc2be35ad9c64ddd1ab6 /epan/dissectors/packet-xdmcp.c | |
parent | 30991af2f12f9cba8e327ff600ff3747165eb9a4 (diff) |
From Ernst Oudhof:
XDMCP dissector has no support for IPv6 addresses in the connection field.
Attached patch adds this.
svn path=/trunk/; revision=26686
Diffstat (limited to 'epan/dissectors/packet-xdmcp.c')
-rw-r--r-- | epan/dissectors/packet-xdmcp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/epan/dissectors/packet-xdmcp.c b/epan/dissectors/packet-xdmcp.c index 0bd6bb4143..0be134558a 100644 --- a/epan/dissectors/packet-xdmcp.c +++ b/epan/dissectors/packet-xdmcp.c @@ -77,6 +77,7 @@ static const value_string family_vals[] = { { 0, "Internet" }, { 1, "DECnet" }, { 2, "Chaos" }, + { 6, "InternetV6" }, { 0, NULL } }; @@ -242,6 +243,11 @@ static void dissect_xdmcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) "Client address: %s", ip_to_str(tvb_get_ptr(tvb, offset+2, 4))); offset += 6; + } else if (alen == 16) { + proto_tree_add_text(xdmcp_tree, tvb, offset, alen+2, + "Client address: %s", + ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset+2, 16))); + offset += 18; } else { offset += xdmcp_add_bytes(xdmcp_tree, "Client address", tvb, offset); } @@ -324,6 +330,8 @@ static void dissect_xdmcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if ((ctype == 0) && (alen == 4)) { ip_string = ip_to_str(tvb_get_ptr(tvb, caddrs_offset, 4)); + } else if ((ctype == 6) && (alen == 16)) { + ip_string = ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, caddrs_offset, 16)); } else { ip_string = NULL; } @@ -339,7 +347,7 @@ static void dissect_xdmcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) "Type: %s", val_to_str(ctype, family_vals, "Unknown (0x%04x)")); - if ((ctype == 0) && (alen == 4)) { + if (ip_string) { proto_tree_add_text(connection_tree, tvb, caddrs_offset-2, alen+2, "Address: %s", ip_string); } else { |