summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-dhcpv6.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-05-10 22:07:27 -0400
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2014-05-11 07:28:43 +0000
commitd13e1394b3793d8a7dbb1ea31766e2ee5091da97 (patch)
tree0a17f15cb8cc4de2bf68068d1cb1ce1b63f740f7 /epan/dissectors/packet-dhcpv6.c
parent43bb76a720656a9d06a5b6ee7ad68f7692d91d2b (diff)
downloadwireshark-d13e1394b3793d8a7dbb1ea31766e2ee5091da97.tar.gz
Interpret DHCPv6 option 18 as a byte array. RFC 3315, section 22.18 strongly suggests that any other such interpretation is inappropriate:
The Interface-ID SHOULD be considered an opaque value, with policies based on exact match only; that is, the Interface-ID SHOULD NOT be internally parsed by the server. This reverts the "Cable Lab specific" functionality added in SVN rev 32928, git rev a541950ca80207eb50ad0cb7cee29a384e76d2b0. bug:9877 Change-Id: Id4a8cbd01ab3cd6d5a0a44aa2066ea395190f51a Reviewed-on: https://code.wireshark.org/review/1579 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-dhcpv6.c')
-rw-r--r--epan/dissectors/packet-dhcpv6.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/epan/dissectors/packet-dhcpv6.c b/epan/dissectors/packet-dhcpv6.c
index b0a75d6059..5743fabb8e 100644
--- a/epan/dissectors/packet-dhcpv6.c
+++ b/epan/dissectors/packet-dhcpv6.c
@@ -1,4 +1,4 @@
-/* packet-dhpcv6.c
+/* packet-dhcpv6.c
* Routines for DHCPv6 packet disassembly
* Copyright 2004, Nicolas DICHTEL - 6WIND - <nicolas.dichtel@6wind.com>
* Jun-ichiro itojun Hagino <itojun@iijlab.net>
@@ -114,7 +114,6 @@ static int hf_vendoropts_enterprise_option_code = -1;
static int hf_vendoropts_enterprise_option_length = -1;
static int hf_vendoropts_enterprise_option_data = -1;
static int hf_interface_id = -1;
-static int hf_interface_id_link_address = -1;
static int hf_reconf_msg = -1;
static int hf_sip_server_domain_search_fqdn = -1;
static int hf_sip_server_a = -1;
@@ -1583,24 +1582,12 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree,
break;
case OPTION_INTERFACE_ID:
{
- gint namelen;
-
if (optlen == 0) {
expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "INTERFACE_ID: malformed option");
break;
}
- namelen = tvb_strnlen(tvb, off, optlen)+1;
- if (namelen == 0) {
- proto_tree_add_item(subtree, hf_interface_id, tvb, off, optlen, ENC_ASCII|ENC_NA);
- } else {
- proto_tree_add_item(subtree, hf_interface_id, tvb, off, namelen-1, ENC_ASCII|ENC_NA);
-
- temp_optlen = optlen - namelen;
- off += namelen;
- if (temp_optlen >= 6)
- proto_tree_add_string(subtree, hf_interface_id_link_address, tvb, off, temp_optlen, tvb_arphrdaddr_to_str(tvb, off, 6, ARPHRD_ETHER));
- }
+ proto_tree_add_item(subtree, hf_interface_id, tvb, off, optlen, ENC_NA);
}
break;
case OPTION_RECONF_MSG:
@@ -2143,9 +2130,7 @@ proto_register_dhcpv6(void)
{ &hf_vendoropts_enterprise_option_data,
{ "Option data", "dhcpv6.vendoropts.enterprise.option_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
{ &hf_interface_id,
- { "Interface-ID", "dhcpv6.interface_id", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
- { &hf_interface_id_link_address,
- { "Link Address", "dhcpv6.interface_id_link_address", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
+ { "Interface-ID", "dhcpv6.interface_id", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
{ &hf_reconf_msg,
{ "Reconfigure message type", "dhcpv6.reconf_msg", FT_UINT8, BASE_DEC | BASE_EXT_STRING, &msgtype_vals_ext, 0, NULL, HFILL }},
{ &hf_sip_server_domain_search_fqdn,