summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-dhcpv6.c
diff options
context:
space:
mode:
authorAdrian-Ken Rueegsegger <ken@codelabs.ch>2015-10-12 21:36:48 +0200
committerAnders Broman <a.broman58@gmail.com>2015-10-16 06:38:36 +0000
commitec44fbd575a0004b885415d0ba33a28237cfd052 (patch)
tree068f6fbfec81d9a815e9a2625d5d3674edcb9803 /epan/dissectors/packet-dhcpv6.c
parentf306038ef434da89dc17489c9ab0f8a7c03a829a (diff)
downloadwireshark-ec44fbd575a0004b885415d0ba33a28237cfd052.tar.gz
Interpret DHCPv6 DUID-UUID type
Dissect DUID type 4 as DUID-UUID type specified in RFC 6355. Note: The previously implemented interpretation of DUID type 4 as link-layer address (old) was according to DHCPv6 draft version 24 which was removed again in revision 26 of the document, see [1][2]. [1] - http://www.ietf.org/rfcdiff?url1=draft-ietf-dhc-dhcpv6-23&url2=draft-ietf-dhc-dhcpv6-24 [2] - http://www.ietf.org/rfcdiff?url1=draft-ietf-dhc-dhcpv6-25&url2=draft-ietf-dhc-dhcpv6-26 Change-Id: Iaa2c083b7b1fd9f5fed959d436cbe0df71b98c0b Reviewed-on: https://code.wireshark.org/review/11030 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-dhcpv6.c')
-rw-r--r--epan/dissectors/packet-dhcpv6.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/epan/dissectors/packet-dhcpv6.c b/epan/dissectors/packet-dhcpv6.c
index f2b5f58e71..25f4c2fd50 100644
--- a/epan/dissectors/packet-dhcpv6.c
+++ b/epan/dissectors/packet-dhcpv6.c
@@ -88,6 +88,7 @@ static int hf_duidll_hwtype = -1;
static int hf_duiden_enterprise = -1;
static int hf_duiden_identifier = -1;
static int hf_duidll_link_layer_addr = -1;
+static int hf_duiduuid_bytes = -1;
static int hf_iaid = -1;
static int hf_iaid_t1 = -1;
static int hf_iaid_t2 = -1;
@@ -345,7 +346,7 @@ static expert_field ei_dhcpv6_bulk_leasequery_bad_msg_type = EI_INIT;
#define DUID_LLT 1
#define DUID_EN 2
#define DUID_LL 3
-#define DUID_LL_OLD 4
+#define DUID_UUID 4
static const value_string msgtype_vals[] = {
{ SOLICIT, "Solicit" },
@@ -483,10 +484,10 @@ static value_string_ext statuscode_vals_ext = VALUE_STRING_EXT_INIT(statuscode_v
static const value_string duidtype_vals[] =
{
- { DUID_LLT, "link-layer address plus time" },
- { DUID_EN, "assigned by vendor based on Enterprise number" },
- { DUID_LL, "link-layer address" },
- { DUID_LL_OLD, "link-layer address (old)" },
+ { DUID_LLT, "link-layer address plus time" },
+ { DUID_EN, "assigned by vendor based on Enterprise number" },
+ { DUID_LL, "link-layer address" },
+ { DUID_UUID, "Universally Unique IDentifier (UUID)" },
{ 0, NULL }
};
@@ -1364,7 +1365,6 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree,
}
break;
case DUID_LL:
- case DUID_LL_OLD:
if (optlen < 4) {
expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "DUID: malformed option");
break;
@@ -1376,6 +1376,13 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree,
optlen - 4, tvb_arphrdaddr_to_str(tvb, off+4, optlen-4, hwtype));
}
break;
+ case DUID_UUID:
+ if (optlen != 18) {
+ expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "DUID: malformed option");
+ break;
+ }
+ proto_tree_add_item(subtree, hf_duiduuid_bytes, tvb, off + 2, 16, ENC_NA);
+ break;
}
break;
case OPTION_NTP_SERVER:
@@ -2124,6 +2131,8 @@ proto_register_dhcpv6(void)
{ "Identifier", "dhcpv6.duiden.identifier", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
{ &hf_duidll_link_layer_addr,
{ "Link-layer address", "dhcpv6.duidll.link_layer_addr", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ { &hf_duiduuid_bytes,
+ { "UUID", "dhcpv6.duiduuid.bytes", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_iaid,
{ "IAID", "dhcpv6.iaid", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
{ &hf_iaid_t1,